/*
Theme Name: MK Travel Advisor Portal
Description: A minimalist, high-security portal theme for MK Travel Advisor.
Author: Theme Architect
Version: 2.1.35
Text Domain: mk-travel-advisor-portal
*/

/* --- ACCESSIBILITY & BASE POLISH --- */

:root {
    --portal-focus: #2563eb;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
}

.skip-link:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    width: auto;
    left: 1rem;
    top: 1rem;
    z-index: 9999;
    background: #ffffff;
    color: #0f172a;
    border: 2px solid var(--portal-focus);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

.tracking-tighter {
    letter-spacing: 0 !important;
}

/* --- CORE ANIMATIONS --- */

/* Smooth entrance for main containers */
.fade-in { 
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* Shake effect for login error feedback and security alerts */
.animate-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* Dynamic border glow for the Live Status box based on status tone */
@keyframes dynamic-pulse-border {
    0% { box-shadow: 0 0 0 0 var(--glow-color, rgba(59, 130, 246, 0.3)); }
    70% { box-shadow: 0 0 0 15px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* --- UI COMPONENTS --- */

/* Professional minimalist scrollbar for all browsers */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Global transitions for interactive elements including the new status select */
button, a, input, textarea, select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-login-spinner {
    width: 3.25rem;
    height: 3.25rem;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 999px;
    animation: portal-spin 0.85s linear infinite;
}

@keyframes portal-spin {
    to { transform: rotate(360deg); }
}

.portal-date-field {
    position: relative;
}

.portal-date-input {
    padding-right: 3.4rem !important;
}

.portal-date-trigger {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.9rem;
    color: #2563eb;
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    width: 2.35rem;
    z-index: 3;
}

.portal-date-trigger:hover,
.portal-date-trigger:focus-visible {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.portal-date-trigger svg {
    height: 1rem;
    width: 1rem;
}

.portal-date-picker {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    left: 0;
    margin-top: 0.55rem;
    padding: 0.9rem;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 75;
}

.portal-date-picker.hidden {
    display: none;
}

.portal-date-picker-header {
    align-items: center;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 2.25rem 1fr 2.25rem;
}

.portal-date-controls {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 1fr 1fr;
}

.portal-date-nav,
.portal-date-month,
.portal-date-year {
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    min-height: 2.25rem;
}

.portal-date-nav {
    background: #f8fafc;
}

.portal-date-nav:hover {
    background: #eff6ff;
    color: #2563eb;
}

.portal-date-month,
.portal-date-year {
    background: #ffffff;
    padding: 0.35rem 0.45rem;
}

.portal-date-weekdays,
.portal-date-grid {
    display: grid;
    gap: 0.28rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.portal-date-weekdays {
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    margin: 0.8rem 0 0.35rem;
    text-align: center;
}

.portal-date-empty,
.portal-date-day {
    min-height: 2rem;
}

.portal-date-day {
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
}

.portal-date-day:hover,
.portal-date-day.is-selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

@media (max-width: 480px) {
    .portal-date-picker {
        left: -0.75rem;
        right: -0.75rem;
    }

    .portal-date-day {
        min-height: 2.25rem;
    }
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
}

input, textarea, select {
    min-height: 44px;
}

/* Custom styling for the Select Dropdown in Admin Terminal to match inputs */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Backdrop blur for modals */
.backdrop-blur-sm {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.admin-mobile-only {
    display: none !important;
}

@media (max-width: 1023px) {
    #admin-lock-btn,
    .admin-mobile-only {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .admin-mobile-only {
        display: none !important;
    }
}

.portal-multi-field {
    position: relative;
}

.portal-native-multi {
    height: 1px !important;
    min-height: 1px !important;
    width: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

.portal-select {
    position: relative;
}

.portal-select-control {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    color: #334155;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 48px;
    padding: 0.55rem 0.75rem;
}

.portal-select-control:hover {
    border-color: #bfdbfe;
}

.portal-select.is-open .portal-select-control,
.portal-select-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(219, 234, 254, 0.85);
    outline: none;
}

.portal-select-values {
    align-items: center;
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 5.5rem;
    min-width: 0;
    overflow-y: auto;
}

.portal-select-placeholder {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
}

.portal-select-caret {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #94a3b8;
    flex: 0 0 auto;
    height: 0;
    width: 0;
}

.portal-select.is-open .portal-select-caret {
    transform: rotate(180deg);
}

.portal-select-chip,
.portal-custom-chip {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    font-size: 0.56rem;
    font-weight: 900;
    gap: 0.35rem;
    letter-spacing: 0;
    line-height: 1.2;
    max-width: calc(100% - 0.25rem);
    padding: 0.3rem 0.4rem 0.3rem 0.65rem;
    text-transform: uppercase;
}

.portal-select-chip-text,
.portal-custom-chip-text {
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-select-chip-remove,
.portal-custom-chip-remove {
    align-items: center;
    background: #dbeafe;
    border: 0;
    border-radius: 999px;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 900;
    height: 1rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1rem;
}

.portal-select-chip-remove:hover,
.portal-custom-chip-remove:hover {
    background: #2563eb;
    color: #ffffff;
}

.portal-select-menu {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    left: 0;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.4rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 80;
}

.portal-select-option {
    background: transparent;
    border: 0;
    border-radius: 0.75rem;
    color: #475569;
    cursor: pointer;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    padding: 0.7rem 0.75rem;
    text-align: left;
    width: 100%;
}

.portal-select-option:hover {
    background: #f8fafc;
    color: #1d4ed8;
}

.portal-select-option.is-selected {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}

/* --- MOBILE SPECIFIC OVERRIDES --- */

@media (max-width: 768px) {
    /* Ensure status text stays clean on one line */
    .whitespace-nowrap {
        white-space: nowrap !important;
    }

    /* Refine container spacing for mobile to account for 3 login fields */
    .rounded-\[40px\], .rounded-\[3rem\], .rounded-\[48px\] {
        border-radius: 32px !important;
    }
    
    .p-12, .p-10, .p-14 {
        padding: 2rem 1.25rem !important;
    }

    /* Tighten grid spacing */
    .grid-cols-1.md\:grid-cols-2 {
        gap: 1.25rem !important;
    }

    /* Adjust the minimalist login button for smaller screens */
    button[type="submit"] span {
        letter-spacing: 0.15em !important;
        font-size: 10px !important;
    }

    /* Adjust font sizes for the dynamic status text on small phones */
    .status-box h3 {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }

    .portal-select-chip-text,
    .portal-custom-chip-text {
        max-width: 14rem;
    }
}

/* Table cell vertical alignment for activity logs */
#logs-tbody tr td {
    vertical-align: middle;
}

#modal-logs table {
    line-height: 1.55;
}

.admin-terminal-shell {
    max-width: none !important;
    width: calc(100vw - 2rem);
}

@media (min-width: 768px) {
    .admin-terminal-shell {
        width: calc(100vw - 3rem);
    }
}

.admin-terminal-sticky-top {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    margin: -0.25rem -0.25rem 2rem;
    padding: 1rem;
    position: sticky;
    top: 0.75rem;
    z-index: 45;
}

@media (min-width: 768px) {
    .admin-terminal-sticky-top {
        margin: -0.25rem -0.25rem 2rem;
        padding: 1.25rem;
    }
}

.admin-terminal-sticky-top > .mb-8:last-child {
    margin-bottom: 0 !important;
}

.admin-terminal-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.admin-header-left {
    align-items: center;
    display: flex;
    flex: 1 1 30rem;
    gap: 1rem;
    min-width: 18rem;
}

.admin-terminal-title {
    color: #1e293b;
    flex: 0 0 auto;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
}

.admin-header-search {
    flex: 1 1 18rem;
    max-width: 26rem;
    min-width: 14rem;
    position: relative;
}

.admin-search-icon {
    color: #94a3b8;
    height: 1rem;
    left: 0.9rem;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
}

.admin-search-input {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    height: 2.75rem;
    outline: none;
    padding: 0 1rem 0 2.45rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
}

.admin-search-input:focus {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

@media (max-width: 1279px) {
    .admin-terminal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header-left,
    .admin-header-actions {
        width: 100%;
    }

    .admin-header-actions {
        justify-content: flex-start;
    }
}

.admin-summary-card {
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.admin-summary-card:hover,
.admin-summary-card:focus-visible {
    border-color: #bfdbfe;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.admin-summary-card.is-active {
    border-color: #2563eb !important;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
}

.admin-card-filter-label {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 1rem;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 0.7rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.9rem;
}

.admin-card-filter-label.hidden {
    display: none;
}

.admin-card-filter-label strong {
    color: #2563eb;
}

.admin-card-filter-label button {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #2563eb;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.75rem;
    text-transform: uppercase;
}

.admin-card-filter-label button:hover {
    background: #2563eb;
    color: #ffffff;
}

.admin-collapsible-section {
    overflow: hidden;
}

.admin-collapsible-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-collapsible-toggle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    width: 2.5rem;
}

.admin-collapsible-toggle:hover,
.admin-collapsible-toggle:focus-visible {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    outline: none;
}

.admin-collapsible-toggle-dark {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #dbeafe;
}

.admin-collapsible-toggle-dark:hover,
.admin-collapsible-toggle-dark:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(191, 219, 254, 0.45);
    color: #ffffff;
}

.admin-collapse-arrow {
    height: 1.05rem;
    transition: transform 0.22s ease;
    width: 1.05rem;
}

.admin-collapsible-section.is-collapsed .admin-collapse-arrow {
    transform: rotate(180deg);
}

.admin-collapsible-panel {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.24s ease, opacity 0.2s ease;
}

.admin-collapsible-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.admin-collapsible-section.is-collapsed .admin-collapsible-panel {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

.admin-collapsible-status {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    padding: 0.42rem 0.7rem;
}

.admin-collapsible-status.is-on {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.admin-collapsible-status.is-off {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

.admin-ip-control .admin-collapsible-status.is-off {
    color: #dc2626;
}

.admin-spam-location-watchlist {
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.admin-spam-location-watchlist table {
    min-width: 980px;
}

.admin-suspicious-behavior table {
    min-width: 1320px;
}

.spam-location-table td,
.spam-match-table td,
.suspicious-behavior-table td {
    vertical-align: middle;
}

.spam-match-table {
    min-width: 1440px !important;
}

.spam-location-table a,
.spam-match-table a {
    white-space: nowrap;
}

.admin-spam-location-watchlist input[type="search"],
.admin-spam-location-watchlist input[type="text"],
.admin-spam-location-watchlist input[type="number"] {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spam-zone-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.spam-zone-form {
    align-items: flex-end;
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.spam-zone-field {
    display: block;
    flex: 1 1 9rem;
    min-width: 8.25rem;
}

.spam-zone-field-note {
    flex: 1.6 1 14rem;
}

.spam-zone-field-radius,
.spam-zone-field-status {
    flex-basis: 8rem;
}

.spam-zone-input {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
    height: 2.9rem;
    outline: none;
    padding: 0 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
}

.spam-zone-input:focus {
    border-color: #fecaca;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.spam-zone-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-left: auto;
}

.spam-zone-submit-btn,
.spam-zone-cancel-btn {
    align-items: center;
    border-radius: 0.85rem;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 900;
    height: 2.9rem;
    justify-content: center;
    letter-spacing: 0.1em;
    line-height: 1;
    padding: 0 1.15rem;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.spam-zone-submit-btn {
    background: #0f172a;
    border: 1px solid #0f172a;
    color: #ffffff;
}

.spam-zone-submit-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.spam-zone-cancel-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.spam-zone-cancel-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

.spam-zone-cancel-btn.hidden {
    display: none;
}

.spam-zone-report-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 1279px) {
    .spam-zone-form {
        flex-wrap: wrap;
    }

    .spam-zone-actions {
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .spam-zone-form,
    .spam-zone-actions,
    .spam-zone-report-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .spam-zone-field,
    .spam-zone-actions,
    .spam-zone-submit-btn,
    .spam-zone-cancel-btn,
    .spam-zone-report-actions > * {
        width: 100%;
    }

    .spam-zone-actions {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .admin-collapsible-header {
        align-items: flex-start;
    }

    .admin-collapsible-toggle {
        height: 2.25rem;
        width: 2.25rem;
    }
}

.admin-ip-control {
    position: relative;
}

.admin-ip-control input::placeholder {
    color: #94a3b8;
}

.admin-ip-table {
    min-width: 940px;
}

.admin-ip-table th,
.admin-ip-table td {
    vertical-align: middle;
}

.admin-ip-table tbody tr {
    transition: background 0.18s ease;
}

.admin-ip-table tbody tr:hover {
    background: #f8fafc;
}

.admin-ip-table .hidden,
#ip-block-no-results.hidden {
    display: none;
}

.login-report-modal-panel {
    max-height: min(92vh, 900px) !important;
    max-width: 1800px !important;
    min-width: 0;
    padding: clamp(1rem, 1.2vw, 1.4rem) !important;
    width: 96vw !important;
}

#modal-login-report,
#modal-login-page-visitor-report,
#modal-spam-location-report,
#modal-suspicious-behavior-report {
    padding-left: clamp(0.4rem, 1vw, 1rem);
    padding-right: clamp(0.4rem, 1vw, 1rem);
}

.login-report-preview-content {
    min-height: 16rem;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
}

.login-report-empty {
    align-items: center;
    color: #94a3b8;
    display: flex;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: center;
    min-height: 14rem;
    padding: 2rem;
    text-align: center;
}

.login-report-client-card {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.8rem;
}

.login-report-client-card:last-child {
    border-bottom: 0;
}

.login-report-client-header {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0.9rem;
}

@media (min-width: 768px) {
    .login-report-client-header {
        grid-template-columns: minmax(10rem, 0.9fr) minmax(12rem, 1.4fr) auto;
    }
}

.login-report-count-pill {
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    border-radius: 999px;
    color: #4f46e5;
    font-size: 0.68rem;
    font-weight: 900;
    justify-self: start;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.75rem;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .login-report-count-pill {
        justify-self: end;
    }
}

.login-report-preview-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 0;
    table-layout: fixed;
    width: 100%;
}

.visitor-report-preview-table,
.spam-report-preview-table {
    font-size: 11.5px;
    min-width: 0;
}

.suspicious-report-preview-table {
    font-size: 12px;
    min-width: 1320px;
}

.login-report-preview-table thead {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0;
    text-align: left;
    text-transform: uppercase;
}

.login-report-preview-table th,
.login-report-preview-table td {
    border-right: 1px solid #f8fafc;
    box-sizing: border-box;
    line-height: 1.35;
    padding: 0.65rem 0.5rem !important;
    word-break: normal;
    overflow-wrap: break-word;
    vertical-align: top;
    white-space: normal;
}

.login-report-preview-table th:last-child,
.login-report-preview-table td:last-child {
    border-right: 0;
}

.login-report-preview-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.report-col-number {
    width: 3.5%;
}

.report-col-datetime {
    width: 13%;
}

.report-col-duration {
    width: 10%;
}

.report-col-ip {
    width: 10%;
}

.report-col-device {
    width: 18%;
}

.report-col-city {
    width: 13%;
}

.report-col-network {
    width: 16%;
}

.report-col-location {
    width: 10.5%;
}

.report-col-map {
    width: 6%;
}

.report-col-small {
    width: 4.5%;
}

.report-col-status {
    width: 8%;
}

.report-col-user-agent {
    width: 10%;
}

.visitor-report-preview-table .report-col-number {
    width: 2.8%;
}

.visitor-report-preview-table .report-col-datetime {
    width: 9%;
}

.visitor-report-preview-table .report-col-ip {
    width: 8%;
}

.visitor-report-preview-table .report-col-device {
    width: 12%;
}

.visitor-report-preview-table .report-col-city {
    width: 9%;
}

.visitor-report-preview-table .report-col-network {
    width: 8.5%;
}

.visitor-report-preview-table .report-col-vpn {
    width: 7.5%;
}

.visitor-report-preview-table .report-col-location {
    width: 7.5%;
}

.visitor-report-preview-table .report-col-map {
    width: 3.5%;
}

.visitor-report-preview-table .report-col-small {
    width: 4%;
}

.visitor-report-preview-table .report-col-status {
    width: 7.5%;
}

.visitor-report-preview-table .report-col-user-agent {
    width: 9.2%;
}

.report-cell-number,
.report-cell-nowrap,
.report-cell-map {
    white-space: nowrap;
}

.report-cell-number {
    text-align: center;
}

.report-cell-wrap,
.report-cell-datetime,
.report-cell-ip,
.report-cell-location,
.report-cell-user-agent {
    white-space: normal;
}

.report-cell-ip,
.report-cell-location,
.report-cell-user-agent {
    overflow-wrap: anywhere;
}

.report-cell-map .login-report-map-link {
    display: inline-flex;
    min-width: 38px;
}

.login-report-client-card > .overflow-x-auto,
#login-report-preview-content > .overflow-x-auto,
#visitor-report-preview-content > .overflow-x-auto,
#spam-report-preview-content > .overflow-x-auto,
#suspicious-report-preview-content > .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.login-report-client-card > .overflow-x-auto {
    border-radius: 1rem;
}

.login-report-preview-table tbody tr {
    border-top: 1px solid #f1f5f9;
}

.login-report-preview-table tbody tr:hover {
    background: #f8fafc;
}

.login-report-map-link {
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-report-map-link:hover {
    color: #1d4ed8;
}

.login-report-modal-panel > .flex:first-child,
.login-report-modal-panel > .grid {
    flex-shrink: 0;
}

@media (min-width: 1536px) {
    .login-report-modal-panel {
        width: min(96vw, 1800px) !important;
    }
}

@media (max-width: 1023px) {
    .login-report-modal-panel {
        max-height: 90vh !important;
        min-width: 0;
        width: 95vw !important;
    }

    .login-report-preview-table {
        min-width: 1180px;
    }

    .visitor-report-preview-table,
    .spam-report-preview-table,
    .suspicious-report-preview-table {
        min-width: 1520px;
    }
}

@media (max-width: 640px) {
    #modal-login-report,
    #modal-login-page-visitor-report,
    #modal-spam-location-report,
    #modal-suspicious-behavior-report {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .login-report-modal-panel {
        border-radius: 1.35rem !important;
        max-height: 92vh !important;
        padding: 1rem !important;
        width: 95vw !important;
    }

    .login-report-preview-content {
        min-height: 18rem;
    }

    .login-report-preview-table {
        min-width: 1180px;
    }

    .visitor-report-preview-table,
    .spam-report-preview-table,
    .suspicious-report-preview-table {
        min-width: 1520px;
    }
}

.visitor-report-status-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.65rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.visitor-report-vpn-pill {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #dc2626;
    display: inline-flex;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
    padding: 0.28rem 0.45rem;
    text-transform: uppercase;
    white-space: normal;
}

.visitor-report-vpn-pill.is-clear {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.admin-header-actions {
    align-items: center;
    display: flex;
    flex: 2 1 48rem;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-left: auto;
}

.admin-header-group {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-header-group-data,
.admin-header-group-reports,
.admin-header-group-primary,
.admin-session-actions {
    border-left: 1px solid #e2e8f0;
    padding-left: 0.75rem;
}

.admin-toolbar-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.85rem;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 900;
    height: 2.75rem;
    justify-content: center;
    letter-spacing: 0.08em;
    line-height: 1.05;
    padding: 0 1rem;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.admin-toolbar-btn:hover {
    transform: translateY(-1px);
}

.admin-toolbar-btn-emerald {
    background: #ecfdf5;
    border-color: #d1fae5;
    color: #059669;
}

.admin-toolbar-btn-emerald:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.admin-toolbar-btn-amber {
    background: #fffbeb;
    border-color: #fef3c7;
    color: #d97706;
}

.admin-toolbar-btn-amber:hover {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
}

.admin-toolbar-btn-indigo {
    background: #eef2ff;
    border-color: #e0e7ff;
    color: #4f46e5;
}

.admin-toolbar-btn-indigo:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.admin-toolbar-btn-cyan {
    background: #ecfeff;
    border-color: #cffafe;
    color: #0e7490;
}

.admin-toolbar-btn-cyan:hover {
    background: #0891b2;
    border-color: #0891b2;
    color: #ffffff;
}

.admin-toolbar-btn-red {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #dc2626;
}

.admin-toolbar-btn-red:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.admin-toolbar-btn-rose {
    background: #fff1f2;
    border-color: #ffe4e6;
    color: #e11d48;
}

.admin-toolbar-btn-rose:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
}

.admin-toolbar-btn-primary {
    background: #2563eb;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
    color: #ffffff;
    font-size: 0.78rem;
    letter-spacing: 0;
    padding: 0 1.15rem;
    text-transform: none;
}

.admin-toolbar-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.admin-toolbar-badge {
    background: #dc2626;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
    color: #ffffff;
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.22rem 0.42rem;
    position: absolute;
    right: -0.45rem;
    top: -0.45rem;
}

.admin-toolbar-badge-rose {
    background: #e11d48;
}

.admin-toolbar-badge.hidden {
    display: none;
}

.admin-table-size-control {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    color: #64748b;
    display: inline-flex;
    gap: 0.45rem;
    height: 2.75rem;
    padding: 0.25rem 0.35rem 0.25rem 0.75rem;
    white-space: nowrap;
}

.admin-table-size-control span {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-table-size-control select {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 900;
    height: 2rem;
    padding: 0.25rem 1.9rem 0.25rem 0.55rem;
    text-transform: uppercase;
}

.admin-filter-clear-all {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    color: #2563eb;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    height: 2.75rem;
    padding: 0 0.95rem;
    text-transform: uppercase;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    white-space: nowrap;
}

.admin-filter-clear-all:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.admin-filter-clear-all.hidden {
    display: none;
}

.admin-session-actions {
    margin-left: 0;
}

.admin-header-link {
    align-items: center;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    display: inline-flex;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    height: 2.75rem;
    padding: 0 0.9rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-header-link-secondary {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

.admin-header-link-secondary:hover {
    border-color: #bfdbfe;
    color: #2563eb;
}

.admin-header-link-danger {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #dc2626;
}

.admin-header-link-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 767px) {
    .admin-terminal-header,
    .admin-header-left,
    .admin-header-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-header-left,
    .admin-header-search {
        min-width: 0;
    }

    .admin-header-search {
        max-width: none;
    }

    .admin-header-group {
        align-items: stretch;
        width: 100%;
    }

    .admin-header-group-data,
    .admin-header-group-reports,
    .admin-header-group-primary,
    .admin-session-actions {
        border-left: 0;
        padding-left: 0;
    }

    .admin-toolbar-btn,
    .admin-header-link,
    .admin-table-size-control,
    .admin-filter-clear-all {
        flex: 1 1 100%;
        width: 100%;
    }

    .admin-table-size-control {
        justify-content: space-between;
    }
}

.admin-table-wrap {
    width: 100%;
}

#admin-records-table {
    min-width: 1080px;
    width: 100%;
}

.admin-filter-heading {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    white-space: nowrap;
}

.admin-column-filter-btn {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #94a3b8;
    display: inline-flex;
    font-size: 0.62rem !important;
    font-weight: 900;
    height: 1.55rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.55rem;
    padding: 0;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.admin-column-filter-btn:hover,
.admin-column-filter-btn.is-active,
.admin-column-filter-btn.is-sorted {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    color: #ffffff;
}

.admin-column-filter-btn.is-sorted {
    background: #0f172a;
    border-color: #0f172a;
}

.admin-column-filter-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    max-height: min(440px, calc(100vh - 6rem));
    overflow: hidden;
    padding: 0.85rem;
    position: fixed;
    width: 280px;
    z-index: 80;
}

.admin-column-sort-section {
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
}

.admin-column-sort-title {
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.admin-column-sort-options {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 1fr 1fr;
}

.admin-column-sort-option,
.admin-column-sort-clear {
    border-radius: 0.72rem;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.15;
    padding: 0.62rem 0.5rem;
    text-align: center;
    text-transform: uppercase;
}

.admin-column-sort-option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.admin-column-sort-option:hover,
.admin-column-sort-option.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.admin-column-sort-clear {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
    margin-top: 0.5rem;
    width: 100%;
}

.admin-column-sort-clear.hidden {
    display: none;
}

.admin-column-sort-clear:hover {
    background: #ea580c;
    color: #ffffff;
}

.admin-column-filter-search {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    outline: none;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.admin-column-filter-search:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}

.admin-column-filter-select-all,
.admin-column-filter-option {
    align-items: center;
    border-radius: 0.7rem;
    color: #475569;
    display: flex;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    padding: 0.58rem 0.5rem;
}

.admin-column-filter-select-all {
    border-bottom: 1px solid #f1f5f9;
    margin-top: 0.55rem;
}

.admin-column-filter-option:hover {
    background: #f8fafc;
}

.admin-column-filter-select-all input,
.admin-column-filter-option input {
    accent-color: #2563eb;
    flex: 0 0 auto;
}

.admin-column-filter-list {
    margin: 0.35rem 0;
    max-height: 210px;
    overflow: auto;
    padding-right: 0.15rem;
}

.admin-column-filter-empty {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 800;
    margin: 0.8rem 0 0.4rem;
    text-align: center;
}

.admin-column-filter-option.hidden,
.admin-column-filter-empty.hidden {
    display: none;
}

.admin-column-filter-actions {
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.55rem;
    padding-top: 0.7rem;
}

.admin-column-filter-clear,
.admin-column-filter-apply {
    border-radius: 0.75rem;
    flex: 1 1 0;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.72rem 0.55rem;
    text-transform: uppercase;
}

.admin-column-filter-clear {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.admin-column-filter-apply {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: #ffffff;
}

.admin-column-filter-clear:hover {
    background: #f1f5f9;
    color: #334155;
}

.admin-column-filter-apply:hover {
    background: #1d4ed8;
}

@media (max-width: 767px) {
    .admin-column-filter-panel {
        left: 12px !important;
        width: calc(100vw - 24px);
    }
}

#admin-records-table th,
#admin-records-table td {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

#admin-records-table th,
#admin-records-table td,
#admin-records-table span,
#admin-records-table button {
    transition: font-size 0.18s ease, padding 0.18s ease, line-height 0.18s ease;
}

#admin-records-table.table-size-small th {
    font-size: 13px !important;
    padding-bottom: 0.85rem !important;
    padding-top: 0.85rem !important;
}

#admin-records-table.table-size-small td {
    font-size: 13px !important;
    padding-bottom: 0.9rem !important;
    padding-top: 0.9rem !important;
}

#admin-records-table.table-size-medium th {
    font-size: 14.5px !important;
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
}

#admin-records-table.table-size-medium td {
    font-size: 14.5px !important;
    padding-bottom: 1rem !important;
    padding-top: 1rem !important;
}

#admin-records-table.table-size-large th {
    font-size: 16px !important;
    padding-bottom: 1.1rem !important;
    padding-top: 1.1rem !important;
}

#admin-records-table.table-size-large td {
    font-size: 16px !important;
    padding-bottom: 1.15rem !important;
    padding-top: 1.15rem !important;
}

#admin-records-table.table-size-small td:nth-child(7) span,
#admin-records-table.table-size-small td:nth-child(8) button {
    font-size: 11px !important;
}

#admin-records-table.table-size-medium td:nth-child(7) span,
#admin-records-table.table-size-medium td:nth-child(8) button {
    font-size: 12px !important;
}

#admin-records-table.table-size-large td:nth-child(7) span,
#admin-records-table.table-size-large td:nth-child(8) button {
    font-size: 13px !important;
}

@media (max-width: 767px) {
    #admin-records-table {
        min-width: 980px;
    }

    #admin-records-table th,
    #admin-records-table td {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

.admin-row-drag-handle {
    align-items: center;
    border-radius: 0.5rem;
    color: #94a3b8;
    cursor: grab;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    padding: 0.3rem 0.38rem;
    user-select: none;
}

.admin-row-drag-handle:hover {
    background: #eff6ff;
    color: #2563eb;
}

#admin-records-table tbody tr {
    transition: background-color 0.18s ease, opacity 0.18s ease;
}

#admin-records-table tbody tr.admin-row-dragging {
    background: #eff6ff;
    opacity: 0.55;
}

#admin-records-table tbody tr.admin-row-dragging .admin-row-drag-handle {
    cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
