:root {
    --bg-color: #0d0e12;
    --sidebar-bg: #14141a;
    --card-bg: #1b1b24;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent: #7e3af2;
    --accent-glow: rgba(126, 58, 242, 0.5);
    --border-color: #2d2d3a;
    --success-color: #00c853;
    --warning-color: #ffab00;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100%;
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 40px;
    text-decoration: none;
    text-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
    /* Soft initial neon */
}

.brand-logo span {
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--accent),
        0 0 40px var(--accent),
        0 0 80px var(--accent);
}

.brand-logo img {
    height: 30px;
    filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 10px var(--accent-glow));
}

.menu-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 10px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(90deg, rgba(126, 58, 242, 0.2) 0%, rgba(126, 58, 242, 0) 100%);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.nav-links a i {
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    /* Sidebar width */
    padding: 30px;
    width: calc(100% - 250px);
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.page-title p {
    color: var(--text-secondary);
    margin: 5px 0 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.create-btn {
    background-color: var(--card-bg);
    color: var(--text-primary);
    /* Changed to white/primary for visibility on dark */
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.create-btn:hover {
    background-color: var(--border-color);
}

/* Search Bar (Global) */
.search-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
}

.search-box input:focus {
    outline: none;
}

.search-box i {
    color: var(--text-secondary);
}

/* Content Area */
.content-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    /* margin-top: 20px; */
    /* Removed spacing */
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-tab:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: normal;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

td {
    background-color: #202028;
    padding: 15px;
    color: var(--text-primary);
}

tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}

.status-badge.purple {
    background-color: rgba(126, 58, 242, 0.2) !important;
    color: #d6bcfa !important;
}

.status-badge.orange {
    background-color: rgba(255, 171, 0, 0.2) !important;
    color: #ffab00 !important;
}

.status-badge.blue {
    background-color: rgba(33, 150, 243, 0.2) !important;
    color: #64b5f6 !important;
}

.status-badge.pink {
    background-color: rgba(233, 30, 99, 0.2) !important;
    color: #f48fb1 !important;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.action-btn:hover {
    color: var(--text-primary);
}

/* Modal Customization (Override Materialize) */
.modal {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    max-height: 80% !important;
    border-radius: 12px !important;
}

.modal .modal-content {
    background-color: transparent !important;
}

.modal h5,
.modal h4 {
    color: var(--text-primary);
}

.input-field input,
.input-field textarea {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.input-field input:focus {
    border-bottom: 1px solid var(--accent) !important;
    box-shadow: 0 1px 0 0 var(--accent) !important;
}

.input-field label {
    color: var(--text-secondary) !important;
}

.input-field label.active {
    color: var(--accent) !important;
}

/* Tags in Modal */
.drop-zone {
    border: 2px dashed var(--border-color) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-secondary);
}

.chip {
    background-color: #2d2d3a !important;
    color: var(--text-primary) !important;
}

.chip.blue.lighten-3 {
    background-color: rgba(33, 150, 243, 0.2) !important;
    color: #90caf9 !important;
}

.chip.pink.lighten-3 {
    background-color: rgba(233, 30, 99, 0.2) !important;
    color: #f48fb1 !important;
}

.example-tag {
    opacity: 0.5;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.example-tag:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-style: solid;
}

/* Materialize Icons override */
.material-icons {
    vertical-align: middle;
}

.material-tooltip {
    z-index: 2000 !important;
}

/* Date Picker override (basic) */
input[type="date"] {
    color-scheme: dark;
}

/* Help Modal Styling */
.help-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.help-list li {
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.help-list li i {
    color: var(--accent);
    margin-top: 3px;
}

.help-list li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 5px;
}

.btn-primary-glow {
    background-color: var(--accent) !important;
    box-shadow: 0 4px 15px var(--accent-glow);
    color: white !important;
    border-radius: 8px;
    padding: 0 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    height: 40px;
    line-height: 40px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Premium Page Styles */
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.price-block button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(224, 64, 251, 0.6);
}


/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        /* display: none;  Don't hide, move off-screen */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    #menu-toggle {
        display: block !important;
    }

    /* Or hamburger menu */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        /* Reduced padding */
    }

    /* Stack Header */
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    #filter-form {
        margin-right: 0 !important;
        width: 100%;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        padding: 10px;
        border-radius: 8px;
    }

    /* Responsive Tables */
    .content-card {
        padding: 15px;
        overflow-x: auto;
        /* Enable scroll */
    }

    table {
        min-width: 600px;
        /* Force scroll */
    }

    /* Adjust Status Badges for mobile */
    .status-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}

/* Premium Sidebar Block */
.premium-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: auto;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    /* Clean frame style */
}

.premium-rocket-icon {
    font-size: 3rem;
    background: -webkit-linear-gradient(45deg, #FF6B6B, #FFD93D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.5)) drop-shadow(0 0 10px rgba(255, 217, 61, 0.5));
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

.premium-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.premium-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.premium-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    width: 100%;
    display: block;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(126, 58, 242, 0.2);
    transition: all 0.3s ease;
}

.premium-btn:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.premium-icon-small {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    background: -webkit-linear-gradient(45deg, #FF6B6B, #FFD93D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(255, 107, 107, 0.5));
    animation: float 3s ease-in-out infinite;
    pointer-events: none;
    /* Don't block clicks */
    z-index: 10;
}