:root {
    --sidebar-width: 260px;
}

body {
    background-color: #f8f9fa;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #fff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #111;
    text-decoration: none;
    display: block;
    flex: 1;
}

.sidebar-brand img {
    max-height: 24px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

[data-theme="dark"] .logo-light {
    display: block;
}

[data-theme="dark"] .logo-dark {
    display: none;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-user strong {
    display: block;
    color: #111;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.sidebar-select {
    padding: 0 1rem 1rem;
}

.sidebar-select label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.sidebar-select select {
    font-size: 0.85rem;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    color: #495057;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-nav .nav-link:hover {
    background: #f8f9fa;
}

.sidebar-nav .nav-link.active {
    color: #10b981;
    background: #ecfdf5;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.8rem;
}

.sidebar-footer .brand-icon {
    width: 32px;
    height: 32px;
    background: #10b981;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        height: 100%;
        min-height: 100dvh;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .mobile-header {
        display: flex !important;
    }
}

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    z-index: 1030;
    margin: -1rem;
    margin-bottom: 1rem;
    width: calc(100% + 2rem);
}


[data-theme="dark"] body {
    background-color: #1a1a1a;
}

[data-theme="dark"] .sidebar {
    background: #212529;
    border-color: #343a40;
}

[data-theme="dark"] .sidebar-header,
[data-theme="dark"] .sidebar-footer,
[data-theme="dark"] .sidebar-user {
    border-color: #343a40;
}

[data-theme="dark"] .sidebar-brand,
[data-theme="dark"] .sidebar-user strong {
    color: #fff;
}

[data-theme="dark"] .sidebar-user {
    color: #6c757d;
}

[data-theme="dark"] .sidebar-nav .nav-link {
    color: #adb5bd;
}

[data-theme="dark"] .sidebar-nav .nav-link:hover {
    background: #343a40;
}

[data-theme="dark"] .sidebar-nav .nav-link.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .card {
    background: #212529;
    color: #fff;
}

[data-theme="dark"] .form-select,
[data-theme="dark"] .mobile-header {
    background: #212529;
    color: #fff;
    border-color: #343a40;
}

[data-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] label {
    color: #fff;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #495057;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #343a40;
    color: #fff;
}

[data-theme="dark"] .dropdown-menu {
    background: #212529;
    border-color: #343a40;
}

[data-theme="dark"] .dropdown-item {
    color: #adb5bd;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #343a40;
    color: #fff;
}

/* Custom Mint Button */
.btn-mint {
    background-color: #b8d4c8;
    border-color: #b8d4c8;
    color: #2d3436;
    font-weight: 600;
}

.btn-mint:hover {
    background-color: #a3c4b5;
    border-color: #9bbdad;
    color: #2d3436;
}

.btn-mint:focus,
.btn-mint:active {
    background-color: #9bbdad;
    border-color: #93b5a5;
    color: #2d3436;
    box-shadow: 0 0 0 0.25rem rgba(184, 212, 200, 0.5);
}

.btn-mint:disabled {
    background-color: #b8d4c8;
    border-color: #b8d4c8;
    opacity: 0.65;
}

.btn-outline-mint {
    color: #2d3436;
    border-color: #b8d4c8;
    font-weight: 600;
}

.btn-outline-mint:hover {
    background-color: #b8d4c8;
    border-color: #b8d4c8;
    color: #2d3436;
}

[data-theme="dark"] .btn-mint {
    color: #1a1a1a;
}

[data-theme="dark"] .btn-mint:hover {
    color: #1a1a1a;
}

[data-theme="dark"] .btn-outline-mint {
    color: #b8d4c8;
}

[data-theme="dark"] .btn-outline-mint:hover {
    color: #1a1a1a;
}

/* Platform Icons Dark Theme */
[data-theme="dark"] .bi-tiktok {
    color: #fff !important;
}

[data-theme="dark"] .bi-file-text,
[data-theme="dark"] .bi-play-circle {
    color: #adb5bd !important;
}

/* Dashboard Cards */
.card h3 {
    font-weight: 700;
    margin-bottom: 0;
}

.card .text-muted.small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Mint Badge */
.badge-mint {
    background-color: #b8d4c8;
    color: #2d3436;
    font-weight: 600;
}

[data-theme="dark"] .badge-mint {
    color: #1a1a1a;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.loading-overlay.show { opacity: 1; visibility: visible; }
.loading-content { text-align: center; }
.loading-overlay .spinner-border { border-width: 0.25rem; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
