/* Whitelist Page Specific Styles */
:root {
    --sidebar-width: 280px;
    --header-height: 80px;
}

/* Layout */
.whitelist-layout {
    display: flex;
    max-width: 1400px;
    margin: 120px auto 40px;
    padding: 0 20px;
    gap: 30px;
    position: relative;
    z-index: 10;
}

/* Sidebar */
.whitelist-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-card {
    background: rgba(17, 17, 17, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-dark);
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    padding: 15px 20px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.sidebar-nav li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.sidebar-nav li.active {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.sidebar-nav li i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.whitelist-content {
    flex-grow: 1;
    min-width: 0;
}

.content-card {
    background: rgba(17, 17, 17, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-dark);
    box-shadow:
        var(--shadow-xl),
        0 0 0 1px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 40px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary) 20%,
            var(--accent) 50%,
            var(--primary) 80%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Header */
.whitelist-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.whitelist-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Status Banner */
.status-banner {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--primary-light);
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-banner::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2em;
}

/* Forms */
.form-section {
    margin-bottom: 40px;
}

.form-subtitle {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-subtitle::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.3;
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.3;
    color: var(--primary);
}

.empty-state p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state small {
    display: block;
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.6;
    max-width: 400px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .whitelist-layout {
        gap: 20px;
        padding: 0 16px;
    }

    .whitelist-sidebar {
        width: 260px;
    }
}

@media (max-width: 900px) {
    .whitelist-layout {
        flex-direction: column;
        margin-top: 100px;
        gap: 20px;
    }

    .whitelist-sidebar {
        width: 100%;
        position: static;
    }

    .sidebar-card {
        padding: 12px;
        overflow-x: auto;
        position: static;
        top: auto;
    }

    .sidebar-nav {
        display: flex;
        padding-bottom: 0;
        min-width: max-content;
        gap: 8px;
    }

    .sidebar-nav li {
        margin-bottom: 0;
        margin-right: 0;
        white-space: nowrap;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 12px 16px;
        flex-shrink: 0;
    }

    .sidebar-nav li.active {
        border-left: 1px solid var(--primary);
        border-color: var(--primary);
    }

    .content-card {
        padding: 24px;
    }

    .whitelist-header h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .whitelist-layout {
        margin-top: 80px;
        padding: 0 12px;
    }

    .sidebar-card {
        padding: 10px;
        border-radius: 10px;
    }

    .sidebar-nav li {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .content-card {
        padding: 20px;
        border-radius: 10px;
    }

    .whitelist-header {
        margin-bottom: 30px;
        padding-bottom: 16px;
    }

    .whitelist-header h1 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }

    .status-banner {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .whitelist-layout {
        margin-top: 70px;
        padding: 0 8px;
    }

    .sidebar-nav li {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .sidebar-nav li i {
        width: 16px;
        font-size: 0.9rem;
    }

    .content-card {
        padding: 16px;
    }

    .whitelist-header h1 {
        font-size: 1.25rem;
    }

    .status-banner {
        padding: 10px 14px;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
}

/* History Tab Styles - Premium Redesign */
.history-content {
    max-width: 600px;
    margin: 0 auto;
}

.history-search-container {
    margin-bottom: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.history-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.search-form-premium {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.search-wrapper {
    flex: 1;
}

/* Redefine input styles for proper inheritance/overrides */
.search-input-premium {
    background: transparent !important;
    /* Let input-wrapper background show */
    border: none !important;
    color: var(--text-primary);
    width: 100%;
    /* Parent input-wrapper handles visual style */
}

/* Premium Button Style matching .submit-btn from style.css */
.premium-search-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 0 32px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 14px rgba(220, 38, 38, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.6s;
}

.premium-search-btn:hover::before {
    left: 100%;
}

.premium-search-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(220, 38, 38, 0.5),
        0 0 30px rgba(220, 38, 38, 0.3);
}

.premium-search-btn:active {
    transform: translateY(0);
}

.premium-search-btn.loading .btn-text {
    display: none;
}

.premium-search-btn:not(.loading) .btn-loader {
    display: none;
}

.premium-search-btn.loading .btn-loader {
    display: flex;
}

/* Result Cards - Enhanced */
.result-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 24px;
    animation: fadeIn 0.4s ease;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.result-card.success {
    border-left: 4px solid #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
}

.result-card.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

.result-card.pending {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-surface-light);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.success .result-icon {
    color: #10b981;
}

.error .result-icon {
    color: #ef4444;
}

.pending .result-icon {
    color: #f59e0b;
}

.result-meta h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.result-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 1rem;
}

.result-body small {
    color: var(--text-disabled);
    display: block;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: monospace;
}

@media (max-width: 768px) {
    .history-content {
        max-width: 100%;
    }

    .history-search-container {
        padding: 24px 20px;
    }

    .history-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .search-form-premium {
        flex-direction: column;
        gap: 12px;
    }

    .premium-search-btn {
        width: 100%;
        padding: 14px 24px;
    }

    .history-search-container {
        padding: 20px 16px;
    }

    .history-description {
        font-size: 0.95rem;
    }

    .result-card {
        padding: 20px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .result-meta h3 {
        font-size: 1.1rem;
    }

    .result-body p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .history-search-container {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .history-description {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .premium-search-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .result-card {
        padding: 16px;
        border-radius: 12px;
    }

    .result-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .result-meta h3 {
        font-size: 1rem;
    }

    .result-date {
        font-size: 0.8rem;
    }

    .result-body p {
        font-size: 0.9rem;
    }
}

/* Style for number input spinners to be white */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    filter: invert(1);
    cursor: pointer;
}

/* Secondary Button (Deja WL) */
.separator-text {
    text-align: center;
    color: var(--text-muted);
    margin: 16px 0;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    opacity: 0.7;
}

.separator-text::before,
.separator-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.separator-text::before {
    left: 0;
}

.separator-text::after {
    right: 0;
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    margin-top: 8px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: none;
    color: var(--text-primary);
}