/* ================================
   ROOT VARIABLES
================================ */

:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e5e7eb;
    --accent: #ff6b2c;
    --accent-light: #fff3eb;
    --sidebar-w: 80px;
    --radius: 16px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, .06);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .09);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .12);
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}


/* ================================
   RESET
================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
}


/* ================================
   DARK MODE
================================ */

body.dark {
    --bg: #0b0f1a;
    --card: #1e2535;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #2d3748;
    --accent-light: #2a1a0f;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, .3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .4);
}


/* ================================
   LAYOUT
================================ */

.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}


/* ================================
   SIDEBAR
================================ */

.sidebar {
    width: var(--sidebar-w);
    background: var(--card);
    border-radius: var(--radius);
    margin: 12px 0 12px 12px;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: width var(--transition), background var(--transition);
    flex-shrink: 0;
    z-index: 100;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    margin-left: 0;
    padding: 0;
    border: none;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-image: url('/OrbitX/assets/ok8.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
    margin-bottom: 8px;
}


/* ================================
   NAV BUTTONS
================================ */

nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
}

.nav-btn {
    width: 46px;
    height: 46px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    color: var(--muted);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 107, 44, .2);
}

.logout-btn {
    margin-top: auto;
    margin-bottom: 4px;
}

.logout-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}


/* TOOLTIP */

.nav-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-w) - 4px);
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 999;
}

.nav-btn:hover::after {
    opacity: 1;
}


/* ================================
   MAIN CONTENT
================================ */

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}


/* ================================
   TOPBAR
================================ */

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    padding: 12px 20px;
    margin: 12px 12px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition);
}

.topbar-left {
    display: flex;
    align-items: center;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    max-width: 360px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 44, .1);
}

.search-bar i {
    color: var(--muted);
    font-size: 14px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    width: 100%;
}

.search-bar input::placeholder {
    color: var(--muted);
}


/* ================================
   ICON BUTTONS
================================ */

.circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    position: relative;
    flex-shrink: 0;
}

.circle-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.circle-btn .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--accent);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card);
}

.top-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}


/* ================================
   PROFILE
================================ */

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: var(--transition);
}

.profile:hover {
    background: var(--bg);
}

.profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.profile-info span {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.profile .fa-chevron-down {
    font-size: 11px;
    color: var(--muted);
    transition: var(--transition);
}

.profile.open .fa-chevron-down {
    transform: rotate(180deg);
}


/* ================================
   DROPDOWN
================================ */

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    width: 240px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
    animation: dropIn .2s ease;
}

.dropdown.show {
    display: flex;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.dropdown-user img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-user strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.dropdown-user span {
    font-size: 11px;
    color: var(--muted);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 13px;
    color: var(--text);
    transition: var(--transition);
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: #fee2e2;
}


/* ================================
   TOGGLE SWITCH
================================ */

.switch {
    margin-left: auto;
    position: relative;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    background: #d1d5db;
    border-radius: 20px;
    inset: 0;
    cursor: pointer;
    transition: .3s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: .3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

input:checked+.slider {
    background: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(18px);
}


/* ================================
   PAGE CONTENT
================================ */

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    margin: 12px 12px 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.content::-webkit-scrollbar {
    width: 6px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}


/* ================================
   PAGES
================================ */

.page {
    display: none;
    animation: pageIn .3s ease;
}

.page.active {
    display: block;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--muted);
    font-size: 14px;
}

h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
}

p {
    color: var(--muted);
    font-size: 14px;
}

.section-title {
    margin: 32px 0 16px;
    font-size: 18px;
    font-weight: 600;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* ================================
   STAT CARDS
================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text) !important;
    margin-bottom: 2px;
}

.stat-card span {
    font-size: 12px;
    color: var(--muted);
}


/* ================================
   CHART CARDS
================================ */

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chart-card h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}


/* ================================
   ACTIVITY
================================ */

.activity {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.activity-item:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

.activity-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.activity-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text);
}

.activity-item p {
    font-size: 12px;
    color: var(--muted);
}

.activity-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}


/* ================================
   PLANET GRID
================================ */

.planet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.planet-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.planet-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.planet-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.planet-card p {
    font-size: 12px;
}


/* ================================
   MISSIONS
================================ */

.mission-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.mission-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.mission-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.active-status {
    background: #10b981;
}

.planned-status {
    background: #f59e0b;
    animation: none;
}

.complete-status {
    background: #3b82f6;
    animation: none;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, .4);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }
}

.mission-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mission-card p {
    font-size: 13px;
    margin-bottom: 8px;
}

.mission-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: #dcfce7;
    color: #16a34a;
    letter-spacing: .5px;
}

.planned-tag {
    background: #fef9c3;
    color: #b45309;
}

.complete-tag {
    background: #dbeafe;
    color: #2563eb;
}


/* ================================
   MESSAGES
================================ */

.message {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.message:hover {
    transform: translateX(4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.msg-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.message strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.message p {
    font-size: 12px;
}

.msg-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}


/* ================================
   REPORTS
================================ */

.report {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.report:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.report strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report p {
    font-size: 12px;
}

.dl-btn {
    margin-left: auto;
    padding: 6px 14px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.dl-btn:hover {
    background: var(--accent);
    color: white;
}


/* ================================
   DOCUMENTS
================================ */

.doc {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.doc:hover {
    transform: translateX(4px);
    border-color: #f59e0b;
    box-shadow: var(--shadow-md);
}

.doc strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.doc p {
    font-size: 12px;
}

.doc-size {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}


/* ================================
   ACHIEVEMENTS
================================ */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.achievement-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.achievement-card.unlocked {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--card) 60%, var(--accent-light));
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.achievement-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.achievement-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.achievement-card p {
    font-size: 12px;
    margin-bottom: 12px;
}

.badge-label {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    background: #dcfce7;
    color: #16a34a;
    letter-spacing: .5px;
}

.locked-badge {
    background: var(--bg);
    color: var(--muted);
}


/* ================================
   SETTINGS
================================ */

.settings-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.settings-group h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.settings-row i {
    color: var(--accent);
    width: 16px;
}

.danger-zone {
    border-color: #fecaca;
}

.danger-zone h2 {
    color: #ef4444;
}

.delete-account-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #fef2f2;
    border: 1px dashed #fca5a5;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #ef4444;
    font-weight: 500;
}

.delete-account-container input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ef4444;
}

#deleteConfirmBox {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff1f2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#deletePassword {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #fca5a5;
    outline: none;
    font-size: 14px;
    background: white;
    color: #1e293b;
    transition: var(--transition);
}

#deletePassword:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

#confirmDeleteBtn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

#confirmDeleteBtn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

#deleteMessage {
    font-size: 13px;
    font-weight: 500;
}


/* ================================
   MODAL
================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    padding: 16px;
}

.modal.show {
    display: flex;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card);
    padding: 28px;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: modalIn .25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.modal-avatar-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-avatar-row img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.modal-avatar-row>div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-content label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.modal-content input,
.modal-content textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 44, .1);
}

.modal-content textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.btn-cancel,
.btn-save {
    padding: 9px 18px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-save {
    background: var(--accent);
    color: white;
}

.btn-save:hover {
    background: #e85a1e;
    transform: translateY(-1px);
}


/* ================================
   TOAST
================================ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: .3s ease;
    pointer-events: none;
    max-width: 320px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}


/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        margin: 0;
        border-radius: 0;
        z-index: 200;
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-w);
    }
    .main {
        width: 100%;
    }
    .search-bar {
        display: none;
    }
    .profile-info {
        display: none;
    }
    .topbar {
        margin: 8px;
    }
    .content {
        padding: 16px 12px;
        margin: 8px 8px 8px 0;
    }
}

.nav-btn_AI {
    width: 46px;
    height: 46px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    color: black;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-btn_AI:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-btn_AI.active {
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 107, 44, .2);
}