:root {
    --primary: #ffffff;
    --primary-hover: #e5e5e5;
    --bg-dark: #000000;
    --bg-light: #f4f4f5;
    --card-bg: rgba(20, 20, 20, 0.8);
    --text-white: #ffffff;
    --text-black: #18181b;
    --text-dim: #a1a1aa;
    --accent: #ffffff;
    --danger: #ef4444;
    --glass: rgba(255, 255, 255, 0.1);
}

body.light-mode {
    --primary: #000000;
    --primary-hover: #333333;
    --bg-dark: #f4f4f5;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-white: #18181b;
    --text-dim: #71717a;
    --glass: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #18181b 0%, #000000 100%);
    z-index: -1;
}

body.light-mode .glass-bg {
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f4f4f5 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 4rem 0 2rem;
    text-align: center;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

header h1 span {
    font-weight: 400;
}

header p {
    color: var(--text-dim);
    font-size: 1.2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass);
    padding-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.section-actions .btn-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.section-actions button.btn-secondary {
    height: 38px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

/* Logout button — contrast color (inverse) */
.btn-logout {
    height: 38px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--text-white);
    color: var(--bg-dark);
    border: 1px solid var(--text-white);
    font-family: inherit;
}

.btn-logout:hover {
    background: transparent;
    color: var(--text-white);
}

body.light-mode .btn-logout {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

body.light-mode .btn-logout:hover {
    background: transparent;
    color: #000000;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.card-header {
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

/* Brand Badges */
.badge-brighty {
    background: #0ea5e9;
    color: #ffffff;
}

.badge-jiera {
    background: #ef4444;
    color: #ffffff;
}

.badge-ciara {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.badge-herbikids {
    background: #ffa556;
    color: #ffffff;
}

.badge-brand-default {
    background: var(--glass);
    color: var(--text-white);
}

/* Platform Badges */
.badge-tiktok {
    background: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.badge-ig {
    background: #e1306c;
    color: #ffffff;
}

.badge-platform-default {
    background: var(--glass);
    color: var(--text-white);
}

body.light-mode .badge-tiktok {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

.listing-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.listing-card .username {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.listing-details {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    flex: 1 1 45%;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.detail-item.full-width {
    flex: 1 1 100%;
}

.detail-item .label {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.detail-item .value {
    color: var(--text-white);
    font-weight: 500;
}

.btn-primary {
    background: var(--text-white);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

body.light-mode .btn-primary {
    background: #000000;
    color: #ffffff;
}

body.light-mode .btn-primary:hover {
    background: #333333;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* Generating State Animation */
.btn-primary.generating {
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    opacity: 0.85;
    transform: none !important;
}

.btn-primary.generating::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.15) 60%,
            transparent 100%);
    animation: shimmer 1.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === LOGIN PAGE STYLES === */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    perspective: 1000px;
}

.login-card {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1.25rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.input-wrapper input:focus+i {
    color: #fff;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.login-footer {
    text-align: center;
    margin-top: 2.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.login-footer i {
    color: #888;
}

#login-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    border-radius: 12px;
}


.btn-secondary {
    display: inline-block;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

button.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-white);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

button.btn-secondary:hover {
    background: var(--text-white);
    color: var(--bg-dark);
}

body.light-mode button.btn-secondary {
    border-color: #000000;
    color: #000000;
}

body.light-mode button.btn-secondary:hover {
    background: #000000;
    color: #ffffff;
}

a.btn-secondary {
    background: white;
    color: #000000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0.8rem;
}

a.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: 5% auto;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

/* Custom scrollbar inside modal */
.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

body.light-mode .modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-dim);
}

.spk-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.spk-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass);
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.spk-option label:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Existing SPK Box */
.existing-spk-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.existing-spk-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for list */
.existing-spk-list::-webkit-scrollbar {
    width: 4px;
}

.existing-spk-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

body.light-mode .existing-spk-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.existing-spk-info .status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
    text-align: center;
    font-weight: 700;
}

.existing-link-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .existing-link-box {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.divider {
    position: relative;
    text-align: center;
    margin-top: 1.5rem;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    position: relative;
    background: #181123;
    padding: 0 1rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 700;
}

body.light-mode .divider span {
    background: #ffffff;
}

body.light-mode .existing-spk-info {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

.spk-option input {
    accent-color: #ffffff;
}

body.light-mode .spk-option input {
    accent-color: #000000;
}

/* Header Actions & Search */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container input {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    color: var(--text-white);
    width: 300px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--text-white);
    width: 350px;
    background: rgba(255, 255, 255, 0.15);
}

.btn-icon {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--text-white);
    color: var(--bg-dark);
}

.spk-result {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease;
}

.spk-result p {
    color: #10b981;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Card Specific Success Notification */
.spk-card-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.spk-card-success span {
    color: #10b981;
    font-size: 0.8rem;
    font-weight: 700;
}

body.light-mode .spk-card-success {
    background: rgba(0, 43, 6, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .spk-card-success span {
    color: #000000;
}

/* Floating Filter Sidebar */
.filter-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.9rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: none;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-white);
    cursor: pointer;
    border-radius: 0 0.8rem 0.8rem 0;
    box-shadow: 2px 4px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
    font-family: inherit;
    opacity: 1;
    pointer-events: auto;
}

.filter-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    padding-left: 0.9rem;
}

/* Hide toggle when sidebar is open */
body.filter-sidebar-open .filter-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-110%);
}

.filter-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.filter-toggle-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-top: 0.25rem;
}

.filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    z-index: 95;
    padding: 1.5rem 1.25rem;
    background: #0f0f10;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

body.light-mode .filter-sidebar {
    background: #ffffff;
    border-right-color: rgba(0, 0, 0, 0.08);
}

.filter-sidebar.open {
    transform: translateX(0);
}

/* Sidebar is docked as part of layout on desktop */
@media (min-width: 900px) {
    header,
    main {
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body.filter-sidebar-open header,
    body.filter-sidebar-open main {
        margin-left: 300px;
    }
}

/* On small screens: sidebar becomes overlay with backdrop */
@media (max-width: 899px) {
    .filter-sidebar {
        z-index: 101;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }
    body.filter-sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 94;
        background: rgba(0, 0, 0, 0.45);
        animation: fadeIn 0.25s ease;
    }
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.filter-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    transition: all 0.2s ease;
}

.filter-close::before {
    content: '‹';
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.filter-close:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

body.light-mode .filter-close {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}
body.light-mode .filter-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-black);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.filter-label-hint {
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0;
    opacity: 0.85;
    font-size: 0.68rem;
}

.filter-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 25rem;
    overflow-y: auto;
    padding: 0.5rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.82rem;
}

body.light-mode .filter-checkbox-list {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
}

.filter-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.3;
}

.filter-checkbox-row input {
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.filter-checkbox-hint {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 0;
    padding: 0 0.25rem;
}

.ktp-photo-hint {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin: 1rem 0 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-filter-search {
    margin-bottom: 0.35rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
}

.filter-full {
    width: 100%;
    box-sizing: border-box;
}

.filter-sidebar input[type="text"],
.filter-sidebar input[type="date"],
.filter-sidebar select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--glass);
    color: var(--text-white);
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.filter-sidebar input[type="text"]:focus,
.filter-sidebar input[type="date"]:focus,
.filter-sidebar select:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.12);
}

body.light-mode .filter-sidebar input[type="text"],
body.light-mode .filter-sidebar input[type="date"],
body.light-mode .filter-sidebar select {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-black);
}

/* Date Filter */
.date-preset,
.date-input {
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--glass);
    color: var(--text-white);
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
}

.date-preset option {
    color: black;
}

.date-input {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    color-scheme: dark;
}

body.light-mode .date-input {
    color-scheme: light;
}

.date-custom-inputs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.date-separator {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-align: center;
}

.btn-small {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 2rem;
    cursor: pointer;
}

.filter-info-daterange {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
}

body.light-mode .filter-info-daterange {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-black);
}

/* PIC Select in SPK Modal */
.label-optional {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-left: 0.3rem;
}

.pic-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--glass);
    color: var(--text-white);
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pic-select:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.12);
}

.pic-select option,
.pic-select optgroup {
    color: black;
    background: white;
}

body.light-mode .pic-select {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-black);
}

.pic-preview {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-left: 3px solid #22c55e;
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
    margin: 0.25rem 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-white);
    animation: fadeIn 0.25s ease;
}

.pic-preview strong {
    font-weight: 700;
    color: #22c55e;
}

.pic-preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 0.35rem;
}

body.light-mode .pic-preview {
    background: rgba(34, 197, 94, 0.08);
    color: var(--text-black);
}

/* Filter Info Banner */
.filter-info {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-left: 3px solid #94a3b8;
    border-radius: 0.6rem;
    margin: 1rem 0 1.25rem;
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.5;
    transition: all 0.25s ease;
}

.filter-info.filter-info-active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
    border-left-color: #3b82f6;
    color: var(--text-white);
}

.filter-info-icon {
    font-size: 1rem;
    color: #94a3b8;
    flex-shrink: 0;
    line-height: 1.4;
}

.filter-info.filter-info-active .filter-info-icon {
    color: #3b82f6;
}

.filter-info strong {
    color: var(--text-white);
    font-weight: 700;
}

.filter-info em {
    font-style: normal;
    font-weight: 600;
    color: var(--accent);
    padding: 0 0.2rem;
}

body.light-mode .filter-info strong,
body.light-mode .filter-info em {
    color: var(--text-black);
}

/* Listing Status Badge (non-approved) */
.badge-status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

body.light-mode .badge-status-pending {
    background: rgba(180, 130, 0, 0.1);
    color: #b45309;
    border-color: rgba(180, 130, 0, 0.3);
}

/* Missing Data Warning */
.listing-card-incomplete {
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}

.missing-warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 3px solid #ef4444;
    padding: 0.75rem 0.9rem;
    border-radius: 0.6rem;
    margin: 0.75rem 0 1rem 0;
    animation: fadeIn 0.3s ease;
}

.missing-warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.missing-warning-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.missing-warning-title {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
}

.missing-warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.45;
}

.missing-warning-list li {
    position: relative;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.missing-warning-list li::before {
    content: '•';
    position: absolute;
    left: 0.2rem;
    color: #ef4444;
    font-weight: bold;
}

.missing-warning-list li strong {
    color: var(--text-white);
    font-weight: 600;
}

body.light-mode .missing-warning {
    background: rgba(239, 68, 68, 0.06);
}

.btn-disabled {
    opacity: 0.55;
    cursor: not-allowed !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.history-btn {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.history-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

body.light-mode .history-modal-content {
    color: var(--text-black);
}

body.light-mode .history-modal-content th {
    color: var(--text-black);
}

body.light-mode .history-modal-content td {
    color: var(--text-black);
}

.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

td {
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 0.5rem;
    background: var(--primary);
    color: rgb(255, 65, 65);
    font-weight: 600;
}

.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    background: var(--card-bg);
    border-left: 4px solid var(--primary);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: var(--accent);
}

.notification.error {
    border-color: var(--danger);
}

.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-dim);
}

/* === PAGINATION === */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 3rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.6rem;
    color: var(--text-white);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--text-white);
    color: var(--bg-dark);
    border-color: var(--text-white);
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-dim);
    font-size: 0.875rem;
    padding: 0 0.25rem;
    user-select: none;
}

/* Light mode pagination */
body.light-mode .page-btn {
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .page-btn:hover:not(.disabled):not(.active) {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.25);
}

body.light-mode .page-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}