/* ==========================================================================
   CHECK NET - MODERN ADMIN DASHBOARD DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #1E3A8A;
    --primary-dark: #172554;
    --primary-light: #DBEAFE;
    --accent: #2563EB;
    --background: #F8FAFC;
    --card: #FFFFFF;
    --table-header: #EFF4FA;
    --border: #E2E8F0;
    --text: #1E293B;
    --text-secondary: #64748B;
    --success: #16A34A;
    --warning: #F59E0B;
    --danger: #DC2626;

    /* Extended System Tokens */
    --success-bg: #DCFCE7;
    --success-border: #BBF7D0;
    --warning-bg: #FEF3C7;
    --warning-border: #FDE68A;
    --danger-bg: #FEE2E2;
    --danger-border: #FECACA;
    
    /* Layout & Geometry */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-width: 270px;
    
    /* Elevation Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Base Resets & Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Visibility Control for Authentication */
html.not-logged-in .app-layout {
    display: none !important;
}

html.logged-in #loginModal,
.login-modal-overlay.hidden,
#loginModal.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
   1. SIMPLE CENTERED LOGIN DESIGN
   -------------------------------------------------------------------------- */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #F0F4FB;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.login-center-card {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.login-center-title {
    font-size: 18px;
    font-weight: 800;
    color: #1A3280;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.login-center-subtitle {
    font-size: 12.5px;
    color: #475569;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.login-center-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-center-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.login-center-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1A3280;
}

.login-center-field input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #C0C8D8;
    border-radius: 4px;
    font-size: 13.5px;
    color: #1E293B;
    outline: none;
    background: #FFFFFF;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.login-center-field input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.login-center-field input::placeholder {
    color: #A0AEC0;
}

.login-center-btn {
    width: 100%;
    height: 40px;
    background: #1A3280;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    margin-top: 4px;
    transition: background 0.15s;
}

.login-center-btn:hover {
    background: #1D4ED8;
}

.login-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #DC2626;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
/* --------------------------------------------------------------------------
   2. MAIN APPLICATION LAYOUT & SIDEBAR
   -------------------------------------------------------------------------- */
.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--background);
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--primary); /* #1E3A8A Sidebar background */
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Brand Section */
.brand-new, .brand {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo-img, .sidebar-logo-img {
    max-width: 215px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    object-fit: contain;
}

/* User Card in Sidebar */
.user-card-new, .user-profile-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-card-top, .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-circle, .user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--accent);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-card-info, .user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-card-name, .user-name {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-role, .user-role-pill, .user-role-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-light);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}

.user-card-quota, .user-quota-badge {
    font-size: 12px;
    color: var(--primary-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn-new, .logout-icon-btn, .logout-btn-sidebar {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}

.logout-btn-new:hover, .logout-icon-btn:hover, .logout-btn-sidebar:hover {
    background: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
}

/* Navigation Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.tab-btn .icon {
    font-size: 16px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.tab-btn.active {
    background: var(--accent); /* #2563EB Active menu background */
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

/* Sidebar Footer & Status */
.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.status-widget {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--primary-light);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-secondary);
}

.dot.online {
    background-color: #22C55E;
    box-shadow: 0 0 6px #22C55E;
}

/* --------------------------------------------------------------------------
   3. MAIN WORKSPACE & TOP HEADER
   -------------------------------------------------------------------------- */
.main-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--background); /* #F8FAFC */
}

.top-header {
    background-color: var(--card); /* #FFFFFF */
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-title-box h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.quota-header-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #BFDBFE;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}



.logout-btn-header:hover {
    background-color: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
}

/* Workspace Body & Tabs */
.workspace-body {
    padding: 24px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.2s ease-in-out;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   4. CARDS, FORMS & INPUTS
   -------------------------------------------------------------------------- */
.card {
    background: var(--card); /* #FFFFFF Card Background */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.search-card-brand-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.search-brand-logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.15);
    border: 1.5px solid #DBEAFE;
    background: #FFFFFF;
    padding: 2px;
    flex-shrink: 0;
}

/* Forms & Input Groups */
.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: #94A3B8;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#singleUrlInput {
    flex: 1;
    min-width: 320px;
}

textarea {
    width: 100%;
    resize: vertical;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.primary-btn {
    background-color: var(--primary); /* #1E3A8A Primary Button */
    color: #FFFFFF;
}

.primary-btn:hover {
    background-color: var(--primary-dark); /* #172554 Primary Hover */
    box-shadow: 0 2px 6px rgba(23, 37, 84, 0.2);
}

.secondary-btn {
    background-color: var(--table-header); /* #EFF4FA */
    color: var(--primary);
    border-color: var(--border);
}

.secondary-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.danger-btn {
    background-color: var(--danger);
    color: #FFFFFF;
}

.danger-btn:hover {
    background-color: #B91C1C;
}

.block-btn {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Action Buttons in tables */
.action-btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   5. TABLES & DATA DISPLAYS
   -------------------------------------------------------------------------- */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.fullscreen-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.fullscreen-table thead tr {
    background-color: var(--table-header); /* #EFF4FA Table Header */
}

.fullscreen-table th {
    padding: 13px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text); /* #1E293B */
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.fullscreen-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.fullscreen-table tbody tr:last-child td {
    border-bottom: none;
}

.fullscreen-table tbody tr:hover {
    background-color: #F1F5F9;
}

.fullscreen-table a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.fullscreen-table a:hover {
    text-decoration: underline;
}

.empty-msg {
    text-align: center;
    color: var(--text-secondary);
    padding: 32px 16px !important;
    font-style: italic;
}

.batch-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.batch-export-btns {
    display: flex;
    gap: 10px;
}

/* Unified Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.badge-success, .badge-success, .badge.unclaimed {
    background-color: var(--success-bg);
    color: var(--success); /* #16A34A */
    border: 1px solid var(--success-border);
}

.badge.badge-warning, .badge-warning, .badge.error {
    background-color: var(--warning-bg);
    color: var(--warning); /* #F59E0B */
    border: 1px solid var(--warning-border);
}

.badge.badge-danger, .badge-danger, .badge.claimed {
    background-color: var(--danger-bg);
    color: var(--danger); /* #DC2626 */
    border: 1px solid var(--danger-border);
}

.badge.badge-admin {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid #BFDBFE;
}

.badge.badge-user {
    background-color: #F1F5F9;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Result Box in Single Tab */
.result-card-box {
    margin-top: 20px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.result-grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.result-item-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-item-block label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.result-item-block span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Cookie Box */
.cookie-status-box {
    background: var(--table-header);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 13.5px;
    color: var(--text);
}

/* --------------------------------------------------------------------------
   6. USER GUIDE PAGE STYLES
   -------------------------------------------------------------------------- */
.guide-hero {
    background: linear-gradient(135deg, #1E3A8A 0%, #172554 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.guide-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.guide-hero-logo {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}

.guide-hero-text h2 {
    font-size: 23px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.guide-hero-text p {
    font-size: 13px;
    color: var(--primary-light);
}

.guide-version-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.guide-hero-stats {
    display: flex;
    gap: 16px;
}

.guide-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    text-align: center;
    min-width: 95px;
}

.guide-stat-icon { font-size: 18px; margin-bottom: 2px; }
.guide-stat-label { font-size: 11px; color: var(--primary-light); font-weight: 500; }
.guide-stat-val { font-size: 12.5px; font-weight: 700; color: #FFFFFF; margin-top: 2px; }

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.guide-step-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
}

.guide-step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.guide-step-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.guide-step-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.guide-step-card h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.guide-step-card p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-step-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 11.5px;
    color: var(--text);
    font-weight: 500;
    margin-top: 12px;
}

.guide-ref-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 8px;
}

.guide-ref-row {
    display: grid;
    grid-template-columns: 180px 1fr 220px;
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.guide-ref-row:last-child { border-bottom: none; }

.guide-ref-row > span {
    padding: 12px 16px;
    font-size: 13px;
    border-right: 1px solid var(--border);
}

.guide-ref-row > span:last-child { border-right: none; }

.guide-ref-row.header-row > span {
    background: var(--table-header);
    color: var(--text);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.ref-field { font-weight: 600; color: var(--primary); }
.ref-desc { color: var(--text-secondary); }
.ref-example { color: var(--accent); font-family: monospace; font-size: 12px; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .sidebar {
        width: 230px;
        min-width: 230px;
    }
    .guide-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .guide-hero-stats {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        min-width: 100%;
    }
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .workspace-body {
        padding: 16px;
    }
    .guide-ref-row {
        grid-template-columns: 1fr;
    }
    .guide-ref-row > span {
        border-right: none;
    }
}

/* Sidebar Role Banner */
.sidebar-role-banner {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Clean table borders and column cell separation */
.fullscreen-table th {
    padding: 13px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid #E2E8F0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.fullscreen-table th:last-child {
    border-right: none;
}

.fullscreen-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    border-right: 1px solid #E2E8F0;
    vertical-align: middle;
}

.fullscreen-table td:last-child {
    border-right: none;
}

.val-uc-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
    display: inline-block;
}

.val-uc-link:hover {
    text-decoration: underline;
}

.val-owner {
    font-weight: 600;
    color: var(--primary);
}

.val-email {
    color: var(--text);
}

/* Action Buttons in Table */
.action-btn-group {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.btn-table-action {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-copy {
    background: #F1F5F9;
    color: #1E293B;
    border-color: #CBD5E1;
}
.btn-copy:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-edit {
    background: #EFF6FF;
    color: #1E3A8A;
    border-color: #BFDBFE;
}
.btn-edit:hover {
    background: #DBEAFE;
    color: #172554;
}

.btn-delete {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
}
.btn-delete:hover {
    background: #DC2626;
    color: #FFFFFF;
}

/* 3-Second Smooth Table Loading Animation */
.table-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #E2E8F0;
    border-top: 3px solid #2563EB;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #1E3A8A;
}

.loading-bar-wrap {
    width: 240px;
    height: 6px;
    background: #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 100%);
    animation: loadBarFill 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadBarFill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Toast Notice Notification */
.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1E293B;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.toast-notice.show {
    opacity: 1;
    transform: translateY(0);
}

/* Bảng Khởi Tạo Tài Khoản Mới (Create Account Table) */
.create-account-table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.create-table thead tr {
    background-color: var(--table-header);
}

.create-table th {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    padding: 12px 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.create-row td {
    background-color: #F8FAFC;
    padding: 12px 14px;
    border-bottom: none;
    vertical-align: middle;
}

.create-input, .create-select {
    width: 100%;
    padding: 9px 12px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: all 0.15s ease;
}

.create-input:focus, .create-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #FFFFFF;
}

.create-btn-submit {
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

/* Single Check Pulse & Smooth Loading Animation */
.check-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 0;
}

.check-pulse-ring {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseRing 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-inner {
    font-size: 24px;
    animation: pulseBounce 0.8s ease-in-out infinite alternate;
}

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes pulseBounce {
    0% { transform: scale(0.9); }
    100% { transform: scale(1.15); }
}

.check-loading-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.check-loading-text strong {
    font-size: 14px;
    color: var(--primary);
}

.check-loading-text span {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.check-progress-fill {
    animation: checkProgress 1.6s ease-in-out infinite;
}

@keyframes checkProgress {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 100%; }
}

.fade-in-row {
    animation: fadeInRow 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Framed Sidebar Menu Buttons */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}

.tab-btn {
    width: 100%;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    color: #DBEAFE;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    transform: translateX(2px);
}

.tab-btn.active {
    background: #2563EB;
    border-color: #60A5FA;
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Framed Sidebar Role Banner */
.sidebar-role-banner {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

/* ─── Sidebar Bottom (logout + user) ─── */
.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar-bottom {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 9px 12px;
}
.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #3B82F6);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}
.sidebar-username {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}
.sidebar-logout-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 9px;
    border: 1px solid rgba(255, 80, 80, 0.45);
    background: rgba(220, 38, 38, 0.12);
    color: #FCA5A5;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    letter-spacing: 0.4px;
    text-align: center;
}
.sidebar-logout-btn:hover {
    background: rgba(220, 38, 38, 0.30);
    border-color: rgba(255, 80, 80, 0.75);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.25);
}
.sidebar-logout-btn:active {
    transform: translateY(0);
}
.modal-overlay.hidden { display: none !important; }


/* Global Strict Hidden Rules */
.hidden,
.admin-only.hidden,
.tab-btn.hidden,
#cookieErrorAlertBanner.hidden {
    display: none !important;
}


/* ==========================================================================
   ULTRA-CRISP HIGH-CONTRAST VISUAL ENHANCEMENTS
   ========================================================================== */

/* Cards & Headers */
.card {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

.card h3 {
    color: #0F172A !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.card-desc {
    color: #475569 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
}

/* Single Check Input & Button */
.input-with-btn input[type="text"],
.single-input-box {
    border: 1.5px solid #94A3B8 !important;
    color: #0F172A !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: #FFFFFF !important;
}

.input-with-btn input[type="text"]:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.input-with-btn input[type="text"]::placeholder {
    color: #64748B !important;
}

.btn-search,
.primary-btn {
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    font-size: 14.5px !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3) !important;
}

.btn-search:hover,
.primary-btn:hover {
    background: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 100%) !important;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.4) !important;
}

/* Tables - High Contrast & Sharp Borders */
.table-container {
    border: 1.5px solid #CBD5E1 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
}

.fullscreen-table thead tr,
.create-table thead tr {
    background-color: #F1F5F9 !important;
}

.fullscreen-table th,
.create-table th {
    color: #0F172A !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #CBD5E1 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 14px 16px !important;
}

.fullscreen-table td,
.create-table td {
    color: #1E293B !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    border-bottom: 1px solid #E2E8F0 !important;
    padding: 13px 16px !important;
}

.fullscreen-table tbody tr:hover {
    background-color: #F8FAFC !important;
}

.fullscreen-table a {
    color: #2563EB !important;
    font-weight: 600 !important;
}

/* Order Code Badge */
.order-code-badge {
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE !important;
    color: #1D4ED8 !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-family: monospace !important;
}

/* Top Header & Quota Badge */
.top-header h2 {
    color: #0F172A !important;
    font-weight: 800 !important;
}

.quota-header-badge {
    background: #EFF6FF !important;
    border: 1.5px solid #BFDBFE !important;
    color: #1D4ED8 !important;
    font-weight: 800 !important;
    padding: 7px 16px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1) !important;
}

/* ==========================================================================
   PAGINATION CONTROL SYSTEM (PREMIUM DESIGN)
   ========================================================================== */
.pagination-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    border-top: none !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    font-size: 13.5px !important;
    color: #475569 !important;
}

.pagination-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
}

.page-size-select {
    padding: 6px 12px !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    font-weight: 700 !important;
    color: #1E3A8A !important;
    outline: none !important;
    cursor: pointer !important;
    font-size: 13.5px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.page-size-select:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.pagination-count-summary {
    color: #475569 !important;
    font-weight: 600 !important;
    margin-left: 6px !important;
}

.pagination-nav {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

button.pg-btn {
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #FFFFFF !important;
    color: #1E293B !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.15s ease-in-out !important;
    user-select: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
    margin: 0 !important;
}

button.pg-btn:hover:not(:disabled):not(.active) {
    background: #EFF6FF !important;
    border-color: #3B82F6 !important;
    color: #1D4ED8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15) !important;
}

button.pg-btn.active {
    background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
    border-color: #1D4ED8 !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
}

button.pg-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
    color: #94A3B8 !important;
    box-shadow: none !important;
}

.pg-ellipsis {
    padding: 0 6px !important;
    color: #64748B !important;
    font-weight: 800 !important;
    font-size: 14px !important;
}

/* Super Admin Only Hiding Rule */
body.not-super-admin .super-admin-only {
    display: none !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE & DRAWER SIDEBAR DESIGN SYSTEM
   ========================================================================== */

/* Mobile Navigation Toggle Button */
.mobile-toggle-btn {
    display: none;
    background: #F1F5F9;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.mobile-toggle-btn:hover, .mobile-toggle-btn:active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile Responsive Breakpoints (< 768px) */
@media screen and (max-width: 768px) {
    /* Header Adjustments */
    .mobile-toggle-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 40px !important;
        height: 40px !important;
        padding: 6px !important;
        background: #EFF6FF !important;
        border: 1.5px solid #93C5FD !important;
        color: #1E3A8A !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
    }

    .top-header {
        padding: 10px 14px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .header-left-group {
        gap: 10px !important;
    }

    .page-title-box h2 {
        font-size: 15px !important;
        line-height: 1.3 !important;
    }

    .page-subtitle {
        font-size: 11px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .quota-header-badge {
        font-size: 11px !important;
        padding: 4px 10px !important;
        white-space: nowrap !important;
    }

    /* HIDE SIDEBAR COMPLETELY ON MOBILE BY DEFAULT (ZERO SPACE TAKEN) */
    .sidebar {
        display: none !important;
    }

    /* WHEN USER CLICKS MENU ☰ -> DISPLAY SIDEBAR AS FIXED DRAWER OVERLAY */
    .sidebar.mobile-open {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 285px !important;
        min-width: 0 !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 99999 !important;
        box-shadow: 6px 0 25px rgba(0, 0, 0, 0.5) !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    /* Full Width Viewport Workspace */
    .app-layout {
        flex-direction: column !important;
        width: 100% !important;
        height: 100vh !important;
        overflow: hidden !important;
    }

    .main-workspace {
        width: 100% !important;
        min-width: 100% !important;
        height: 100vh !important;
        overflow-y: auto !important;
    }

    .workspace-body {
        padding: 14px 12px !important;
        gap: 16px !important;
    }

    /* Cards & Input Form Responsiveness */
    .card {
        padding: 16px 14px !important;
        margin-bottom: 16px !important;
    }

    .card h3 {
        font-size: 15.5px !important;
    }

    .input-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #singleUrlInput {
        min-width: 100% !important;
        width: 100% !important;
        font-size: 14px !important;
        height: 42px !important;
    }

    .primary-btn, .btn {
        width: 100% !important;
        justify-content: center !important;
        height: 42px !important;
        font-size: 14px !important;
    }

    /* Table Touch Horizontal Scroll */
    .table-container {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-top: 12px !important;
        border-radius: 8px !important;
    }

    .fullscreen-table th,
    .fullscreen-table td {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    .batch-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .batch-export-btns {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .batch-export-btns .btn {
        flex: 1 !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
        height: auto !important;
    }

    /* Pagination Bar Adjustments */
    .pagination-bar {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
    }

    .pagination-info {
        flex-wrap: wrap !important;
        justify-content: center !important;
        font-size: 12px !important;
    }

    /* Dialog Modals Mobile Fit */
    .login-center-card {
        max-width: 92vw !important;
        padding: 24px 18px !important;
    }

    .modal-content {
        width: 94% !important;
        padding: 18px 16px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* Extra Small Mobile Devices (< 480px) */
@media screen and (max-width: 480px) {
    .page-subtitle {
        display: none !important;
    }

    .page-title-box h2 {
        font-size: 14px !important;
    }

    .fullscreen-table th,
    .fullscreen-table td {
        font-size: 11.5px !important;
        padding: 8px 10px !important;
    }
}

