/* ============================================================
   صفوة أمينة – نظام إدارة المستندات  (V3 Styles)
   ============================================================ */

/* ---- Root Variables ---- */
:root {
    --bg-deep: #fdfaf5;
    /* Creamy off-white (sugar/creamy color) */
    --bg-dark: #f8f4ed;
    /* Softer secondary background */
    --bg-card: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(100, 160, 255, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.55);
    --primary: #DAA520;
    --primary-d: #C0901F;
    --secondary: #B8860B;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #222222;
    --text-muted: #555555;
    --sidebar-w: 260px;
    --header-h: 64px;
    --radius: 14px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.25s ease;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

body {
    background: var(--bg-deep);
    color: var(--text);
    overflow: hidden;
}

a {
    color: var(--secondary);
    text-decoration: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 160, 255, 0.25);
    border-radius: 3px;
}

/* ---- Animated background blobs ---- */
.blob-bg {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    pointer-events: none;
    animation: blobMove 12s ease-in-out infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    top: -150px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #06b6d4;
    bottom: -100px;
    left: -80px;
    animation-delay: -5s;
}

@keyframes blobMove {
    0% {
        transform: translate(0, 0) scale(1)
    }

    100% {
        transform: translate(40px, 40px) scale(1.1)
    }
}

/* ============================================================
   GLASS PANEL
   ============================================================ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ============================================================
   SCREEN & LAYOUT
   ============================================================ */
.screen {
    width: 100%;
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* ---- Login ---- */
.login-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: 95vw;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.logo-container {
    display: flex;
    justify-content: center;
}

.brand-logo {
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.3));
}

.main-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.subtitle {
    font-size: .875rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---- App Layout ---- */
#app-screen {
    display: flex;
    height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-right: none;
    border-top: none;
    border-bottom: none;
    flex-shrink: 0;
    border-left: 1px solid var(--glass-border);
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    justify-content: center;
}

.brand-logo-small {
    height: 46px;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    position: relative;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 10px 8px;
}

.sidebar-footer {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    /* Add gap between elements */
    border-top: 1px solid var(--glass-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    /* Allow profile to take remaining space but shrink if needed */
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar svg {
    width: 18px;
    height: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    /* Prevent name from Pushing buttons out */
}

.user-role {
    font-size: .75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 0;
}

.top-header {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-radius: 0;
    border-top: none;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    position: relative;
    z-index: 999;
    overflow: visible;
}

.top-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sys-time {
    font-size: .8rem;
    color: var(--text-muted);
    direction: ltr;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
}

input,
select,
textarea {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text);
    padding: 10px 14px;
    font-family: 'Cairo', sans-serif;
    font-size: .9rem;
    transition: var(--transition);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.07);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

select option {
    background: var(--bg-dark);
    color: var(--text);
}

.form-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.full-width {
    width: 100%;
}

.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    grid-column: 1/-1;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.search-actions {
    grid-column: 1/-1;
    display: flex;
    gap: 10px;
}

.w-full {
    width: 100%;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-d);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-warning:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
    padding: 5px 12px;
    font-size: .8rem;
    border-radius: 8px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
    font-family: 'Cairo', sans-serif;
    font-size: .8rem;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notifications-wrapper {
    position: relative;
}

.notify-btn {
    position: relative;
}

.notify-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 4px;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 9999;
    backdrop-filter: blur(20px);
}

.notify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.notify-header h4 {
    font-size: .9rem;
}

.notify-list {
    max-height: 320px;
    overflow-y: auto;
}

.notify-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.notify-item.unread {
    background: rgba(59, 130, 246, 0.07);
}

.notify-item svg {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.notify-item svg.success {
    color: var(--success);
}

.notify-content p {
    font-size: .83rem;
}

.notify-time {
    font-size: .73rem;
    color: var(--text-muted);
}

.notify-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    overflow-x: auto;
    padding: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table th {
    text-align: right;
    padding: 10px 12px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.04);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 30px !important;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-pending2 {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-returned {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    width: 16px;
    height: 16px;
    font-size: .68rem;
    font-weight: 700;
    margin-right: 4px;
}

/* ============================================================
   STATS GRID (Director Dashboard)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.stat-label {
    font-size: .8rem;
    color: var(--text-muted);
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
}

.stat-pending svg {
    color: #fbbf24;
}

.stat-pending .stat-val {
    color: #fbbf24;
}

.stat-approved svg {
    color: #34d399;
}

.stat-approved .stat-val {
    color: #34d399;
}

.stat-rejected svg {
    color: #f87171;
}

.stat-rejected .stat-val {
    color: #f87171;
}

.stat-returned svg {
    color: #c4b5fd;
}

.stat-returned .stat-val {
    color: #c4b5fd;
}

/* ============================================================
   FILE MANAGER
   ============================================================ */
.fm-filters {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    align-items: flex-end;
}

.fm-filters .form-group {
    flex: 1;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}

.file-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
    cursor: default;
}

.file-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.3);
}

.file-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.file-name {
    font-weight: 600;
    font-size: .9rem;
    word-break: break-all;
}

.file-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-sm {
    font-size: .8rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-lg {
    max-width: 860px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
    gap: 10px;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.modal-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.doc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.doc-info-grid label {
    font-size: .75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.info-val {
    font-weight: 600;
    font-size: .9rem;
}

/* ============================================================
   AUDIT TRAIL
   ============================================================ */
.audit-trail {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 8px 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border-right: 3px solid var(--primary);
}

.audit-action {
    grid-column: 1;
    font-weight: 600;
    font-size: .85rem;
    white-space: nowrap;
}

.audit-meta {
    grid-column: 2;
    font-size: .82rem;
    color: var(--text-muted);
}

.audit-date {
    grid-column: 3;
    font-size: .75rem;
    color: var(--text-muted);
    white-space: nowrap;
    direction: ltr;
}

.audit-notes {
    grid-column: 1/-1;
    font-size: .8rem;
    color: var(--accent);
    font-style: italic;
}

/* ============================================================
   WORKFLOW PROGRESS BAR
   ============================================================ */
.workflow-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    padding: 16px 0;
}

.wp-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.wp-step span {
    font-size: .72rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 6px 8px;
    white-space: nowrap;
}

.wp-step.done span {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.wp-line {
    height: 2px;
    flex: 1;
    min-width: 20px;
    background: var(--glass-border);
}

/* ============================================================
   SIGNATURES
   ============================================================ */
.sig-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sig-tab-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: .85rem;
    transition: var(--transition);
}

.sig-tab-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-color: var(--primary);
}

.sig-tab-panel {
    display: block;
}

.canvas-wrapper {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.sig-preview-img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #fff;
}

.sigs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sig-stamp {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    text-align: center;
    min-width: 130px;
}

.sig-stamp img {
    max-width: 120px;
    max-height: 70px;
    background: #fff;
    border-radius: 6px;
}

.sig-stamp p {
    margin-top: 4px;
    font-size: .8rem;
}

.flex-actions {
    display: flex;
    gap: 10px;
}

.flex-header {
    margin-bottom: 16px;
}

/* ============================================================
   NOTES / MESSAGES
   ============================================================ */
.note-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-card .note-meta {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--text-muted);
}

.note-card p {
    font-size: .9rem;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 22px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--success);
    color: #fff;
}

.toast-error {
    background: var(--danger);
    color: #fff;
}

.toast-info {
    background: var(--primary);
    color: #fff;
}

/* ============================================================
   VIEW CONTAINER
   ============================================================ */
.view-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h4 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

h4 svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

h5 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .grid-form {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 220px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.3s;
    }

    .content-area {
        padding: 12px;
    }
}

/* ---- Inline table editing (sysadmin) ---- */
.edit-inline-input {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--text);
    padding: 4px 8px;
    font-family: 'Cairo', sans-serif;
    font-size: .85rem;
    width: 100%;
    min-width: 80px;
}

.edit-inline-input:focus {
    outline: none;
    border-color: var(--secondary);
}

/* ---- Dark Theme Overrides ---- */
[data-theme="dark"] {
    --bg-deep: #0a0a0a;
    --bg-dark: #151515;
    --bg-card: rgba(30, 30, 30, 0.6);
    --glass-bg: rgba(30, 30, 30, 0.55);
    --text: #e2e8f0;
    --text-muted: #a1a1a1;
    --primary: #DAA520;
    /* gold accent */
    --primary-d: #C0901F;
    --secondary: #B8860B;
    --glass-border: rgba(255, 255, 255, 0.12);
}

/* ---- Cloud Sync Status ---- */
.sync-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.sync-status i {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.sync-status i.sync-syncing {
    animation: spin 2s linear infinite;
    color: #3b82f6;
    /* Bright Blue */
}

.sync-status i.sync-synced {
    color: #10b981;
    /* Bright Green */
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.4));
}

.sync-status i.sync-error {
    color: #ef4444;
    /* Bright Red */
    animation: pulse 2s infinite;
}

.sync-status i.sync-offline {
    color: var(--text-muted);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* ---- Action Buttons Explicit Colors ---- */
#logout-btn i {
    color: #ef4444;
    /* Red color for logout to be clear */
    transition: transform 0.2s, color 0.2s;
}

#logout-btn:hover i {
    color: #b91c1c;
    /* Darker red on hover */
    transform: translateX(-3px);
    /* Small nudge left for RTL logout */
}

#drive-connect-btn i {
    color: #3b82f6;
    /* Google Drive blue */
}

#drive-connect-btn:hover i {
    color: #2563eb;
    transform: scale(1.1);
}