:root {
    --primary: #b76e79;
    --primary-dark: #8f5661;
    --accent: #6c5ce7;
    --bg-body: #fdfbf7;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #2d3436;
    --text-light: #636e72;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius: 16px;
}

body.dark-mode {
    --bg-body: #1e1e2e;
    --glass-bg: rgba(30, 30, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-main: #fdfbf7;
    --text-light: #a6a6a6;
    --primary: #d4a5b1;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

/* === BACKGROUND === */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #ffeaa7;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #fab1a0;
}

body.dark-mode .blob-1 {
    background: #4b3b55;
}

body.dark-mode .blob-2 {
    background: #2d2d44;
}

/* === CUSTOM CURSOR (Desktop Only) === */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    a,
    button,
    input,
    select,
    .drop-zone {
        cursor: none !important;
    }

    .cursor-dot {
        width: 5px;
        height: 5px;
        background: var(--text-main);
        position: fixed;
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
        transform: translate(-50%, -50%);
    }

    .cursor-outline {
        width: 30px;
        height: 30px;
        border: 1px solid var(--primary);
        position: fixed;
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background 0.2s;
    }

    body.hovering .cursor-outline {
        width: 50px;
        height: 50px;
        background: rgba(183, 110, 121, 0.1);
        border-color: transparent;
    }
}

/* === LAYOUT === */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    width: 100%;
    transition: margin-left 0.3s ease;
}

/* Sidebar Elements */
.brand h2 {
    font-family: 'Playfair Display';
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.badge-pro {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    vertical-align: middle;
}

.menu {
    margin-top: 3rem;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.menu-item:hover,
.menu-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
}

.badge-count {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    position: relative;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pulse-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid var(--bg-body);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* === USER DROPDOWN === */
.user-menu-wrapper {
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.user-profile:hover,
.user-profile.active {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--glass-border);
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.arrow-icon {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: transform 0.3s;
}

.user-dropdown {
    position: absolute;
    top: 65px;
    right: 0;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    background: linear-gradient(135deg, rgba(183, 110, 121, 0.1), rgba(183, 110, 121, 0.05));
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.avatar-large img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 0.8rem;
    object-fit: cover;
}

.status-indicator {
    display: inline-block;
    padding: 2px 10px;
    background: #e6fffa;
    color: #00b894;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #b2f5ea;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--primary);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.logout-item {
    color: #d63031;
}

.logout-item:hover {
    background: #ffebee;
    color: #d63031;
}

/* === NOTIFICATIONS === */
.notif-dropdown {
    position: absolute;
    top: 60px;
    right: 80px;
    width: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.notif-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.notif-header {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.notif-item {
    padding: 0.8rem 1rem;
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* === DASHBOARD === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.purple {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.green {
    background: linear-gradient(135deg, #55efc4, #00b894);
}

.orange {
    background: linear-gradient(135deg, #fab1a0, #e17055);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display';
    display: block;
}

.stat-trend {
    font-size: 0.75rem;
    margin-top: 5px;
    display: block;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    justify-content: flex-end;
    width: 100%;
}

.bar {
    width: 20px;
    background: rgba(183, 110, 121, 0.3);
    border-radius: 4px;
    transition: height 1s;
    cursor: pointer;
    position: relative;
}

.bar:hover,
.bar.active {
    background: var(--primary);
}

.bar:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* === TABLES & TOOLBAR === */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    outline: none;
    color: var(--text-main);
}

.custom-select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    padding: 1.5rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--glass-border);
}

.modern-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.design-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.design-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-published {
    background: rgba(0, 184, 148, 0.1);
    color: #00b894;
}

.status-draft {
    background: rgba(99, 110, 114, 0.1);
    color: #636e72;
}

/* === INQUIRIES === */
.inquiry-table tr:hover {
    background: rgba(183, 110, 121, 0.05);
    cursor: pointer;
}

.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dot-unread {
    background: #e74c3c;
}

.dot-read {
    background: #00b894;
    opacity: 0.5;
}

.row-unread td {
    font-weight: 600;
    color: var(--text-main);
}

.row-read td {
    color: var(--text-light);
}

.msg-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.btn-reply {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === SETTINGS === */
.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 2rem;
    padding: 1.5rem;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    text-align: left;
}

.settings-tab:hover {
    background: rgba(183, 110, 121, 0.05);
}

.settings-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
}

.settings-panel {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.3s ease;
}

.settings-panel.active {
    display: block;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    gap: 1rem;
}

.theme-options {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.theme-option {
    cursor: pointer;
    text-align: center;
}

.theme-option .preview {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid var(--glass-border);
    margin-bottom: 0.5rem;
    transition: 0.2s;
}

.theme-option.active .preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.2);
}

.preview.light {
    background: #fdfbf7;
}

.preview.dark {
    background: #1e1e2e;
}

/* === MODALS === */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    padding: 1rem;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.glass-modal {
    background: var(--bg-body);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-radius: var(--radius);
    transform: translateY(20px);
    transition: 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-backdrop.active .glass-modal {
    transform: translateY(0);
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: var(--primary);
    transform: scale(1.02);
}

.file-preview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.file-preview-card.hidden {
    display: none;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* === RESPONSIVE UTILITIES === */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TABLET (992px and down) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .dashboard-split {
        grid-template-columns: 1fr;
    }

    /* Settings Tabs become scrollable horizontal */
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-sidebar {
        position: static;
        padding: 1rem;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .settings-tab {
        white-space: nowrap;
        padding: 0.8rem 1.2rem;
        flex-shrink: 0;
    }

    .settings-panel {
        padding: 1.5rem;
    }

    /* Mobile Table Card View */
    .modern-table thead {
        display: none;
    }

    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
    }

    .modern-table tr {
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.5);
        padding: 1rem;
        border-radius: 10px;
        border: 1px solid var(--glass-border);
        position: relative;
    }

    .modern-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }

    .modern-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        font-size: 0.85rem;
    }

    /* Action buttons in table */
    .modern-table td:last-child {
        justify-content: flex-end;
        gap: 0.5rem;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 1rem;
    }
}

/* MOBILE (576px and down) */
@media (max-width: 576px) {
    .top-bar {
        margin-bottom: 2rem;
        gap: 0.5rem;
    }

    .header-title h1 {
        font-size: 1.5rem;
    }

    .header-title p {
        display: none;
    }

    /* Hide date on small screens */

    /* Hide User Text, keep Avatar */
    .user-info,
    .arrow-icon {
        display: none;
    }

    .user-profile {
        padding: 0;
        border: none;
    }

    .user-profile:hover {
        background: transparent;
    }

    /* Stack Toolbar items */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .filter-group select {
        flex: 1;
    }

    .btn-gradient {
        flex: 1;
        justify-content: center;
    }

    /* Stats Grid 1 column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Modal adjustments */
    .glass-modal {
        padding: 1.5rem;
    }

    .row-group {
        flex-direction: column;
        gap: 0;
    }

    /* User Dropdown Alignment */
    .user-dropdown {
        width: 260px;
        right: -10px;
        top: 50px;
    }

    .notif-dropdown {
        width: 280px;
        right: -50px;
        top: 50px;
    }
}