/* CSS Design System for Aura Gold & Jewels Billing System */

:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #121620;
    --bg-card: #1a1f2c;
    --bg-input: #0f121a;
    
    --color-gold: #d4af37;
    --color-gold-hover: #e6c24a;
    --color-gold-light: #f5e4ab;
    --color-gold-dim: rgba(212, 175, 55, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    --border-color: #2e3748;
    --border-focus: #d4af37;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.25);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-input-focus: rgba(26, 31, 44, 0.8);
}

body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-input-focus: #ffffff;
    
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    
    --border-color: #e2e8f0;
    --border-focus: #d4af37;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

body.light-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #f1f5f9 0%, #cbd5e1 90%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover {
    color: var(--color-gold-hover);
}

/* Container & Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar navigation */
.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-normal);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 56px;
    height: 56px;
    color: var(--color-gold);
}

.brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.brand-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-gold);
    font-weight: 400;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.menu-item a svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: var(--transition-fast);
}

.menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--color-text-primary);
}

.menu-item.active a {
    background-color: var(--color-gold-dim);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--color-gold-dim);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-meta .username {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.user-meta .role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.btn-logout {
    color: var(--color-text-secondary);
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    color: var(--color-danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 70px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.page-title h2 {
    font-size: 1.5rem;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gold-rates-ticker {
    display: flex;
    gap: 16px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.rate-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rate-label {
    color: var(--color-text-secondary);
}

.rate-value {
    color: var(--color-gold);
    font-weight: 600;
}

.content-wrapper {
    padding: 32px;
    flex-grow: 1;
}

/* Login Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at 10% 20%, rgba(26, 31, 44, 0.8) 0%, rgba(10, 12, 16, 1) 90%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #b8860b, var(--color-gold), #fff8dc);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon-container {
    width: 96px;
    height: 96px;
    background-color: var(--color-gold-dim);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.gold-logo {
    width: 64px;
    height: 64px;
    color: var(--color-gold);
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
}

.input-wrapper input, 
.input-wrapper select, 
.input-wrapper textarea,
input.form-control,
select.form-control,
textarea.form-control {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

/* Multi-input text areas / select fields in other forms with no icon */
input.form-control,
select.form-control,
textarea.form-control {
    padding: 12px 16px;
}

.input-wrapper input:focus, 
.input-wrapper select:focus, 
.input-wrapper textarea:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background-color: var(--bg-input-focus);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    outline: none;
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--color-gold-hover);
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-secondary);
}

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

.btn-danger:hover {
    opacity: 0.9;
}

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

.btn-success:hover {
    opacity: 0.9;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.alert-icon {
    width: 20px;
    height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.login-footer code {
    color: var(--color-gold);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Dashboard Statistics Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: var(--shadow-md), var(--shadow-gold);
}

.metric-details span {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.metric-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 6px;
    color: var(--color-text-primary);
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    border: 1px solid var(--border-color);
}

.metric-icon-box.gold {
    background-color: var(--color-gold-dim);
    border-color: rgba(212, 175, 55, 0.3);
}

.metric-icon-box svg {
    width: 24px;
    height: 24px;
}

/* Dashboard Layout Splits */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--color-gold);
}

/* Filter Bar */
.filters-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex-grow: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table-custom th {
    background-color: rgba(0, 0, 0, 0.15);
    color: var(--color-text-secondary);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text-primary);
    vertical-align: middle;
}

.table-custom tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-gold {
    background-color: var(--color-gold-dim);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Action buttons in tables */
.actions-cell {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.btn-icon:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background-color: var(--color-gold-dim);
}

.btn-icon-danger:hover {
    color: var(--color-danger);
    border-color: var(--color-danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Invoice Creation Form specific */
.billing-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.billing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.customer-info-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.items-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.items-table-container {
    margin-top: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text-secondary);
    padding: 12px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.items-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.item-row input, 
.item-row select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    padding: 8px 10px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: var(--transition-fast);
}

.item-row input:focus, 
.item-row select:focus {
    border-color: var(--border-focus);
}

.item-row input.readonly-rate {
    background-color: var(--bg-primary) !important;
    color: var(--color-text-secondary) !important;
    cursor: not-allowed;
    border-color: var(--border-color) !important;
}

.item-row input.readonly-rate:focus {
    box-shadow: none !important;
    border-color: var(--border-color) !important;
}

.col-desc { width: 18%; }
.col-type { width: 12%; }
.col-purity { width: 10%; }
.col-weight { width: 12%; }
.col-wastage { width: 12%; }
.col-making { width: 16%; }
.col-stone { width: 10%; }
.col-total { width: 11%; }

.item-row input[type="number"] {
    text-align: right;
}

.rate-display,
.calculated-total-display {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}


.making-charge-wrapper {
    display: flex;
    gap: 4px;
}

.making-charge-wrapper input {
    flex-grow: 1;
}

.making-charge-wrapper select {
    width: 60px;
    padding: 8px 4px;
    font-size: 0.8rem;
}

.calculated-total-display {
    font-weight: 700;
    color: var(--color-gold);
    text-align: right;
    padding-right: 8px;
}

/* Calculation summary section */
.billing-summary-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .billing-summary-row {
        grid-template-columns: 1fr;
    }
}

.notes-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.totals-area {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.summary-line.grand-total-line {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-gold);
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: 4px;
}

/* Search bar on Invoices page */
.filters-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Settings Forms */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

/* Invoice Printing Styles */
.invoice-view-container {
    max-width: 850px;
    margin: 0 auto 40px auto;
}

.invoice-actions-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 24px;
}

/* Invoice Paper Styling (Screen presentation vs Print presentation) */
.invoice-paper {
    background-color: #ffffff;
    color: #1e293b;
    padding: 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    font-family: 'Inter', -apple-system, sans-serif;
}

.invoice-paper h1,
.invoice-paper h2,
.invoice-paper h3,
.invoice-paper h4,
.invoice-paper h5,
.invoice-paper h6,
.invoice-paper th,
.invoice-paper td,
.invoice-paper p,
.invoice-paper span {
    color: #1e293b;
}

.invoice-header-block {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.shop-info-left h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.shop-info-left p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 4px;
}

.invoice-info-right {
    text-align: right;
}

.invoice-info-right h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.invoice-info-right p {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 4px;
}

.invoice-details-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.meta-box h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.meta-box p {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 4px;
    line-height: 1.4;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-items-table th {
    background-color: #f8fafc;
    border-top: 1px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    padding: 10px 12px;
    text-align: left;
}

.invoice-items-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #334155;
}

.invoice-items-table th.align-right,
.invoice-items-table td.align-right {
    text-align: right;
}

.invoice-summary-block {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 30px;
}

.invoice-terms-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #475569;
}

.invoice-terms-box p {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
    white-space: pre-line;
}

.invoice-totals-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invoice-totals-box .totals-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #475569;
}

.invoice-totals-box .totals-line.grand-total {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    border-top: 2px solid #94a3b8;
    padding-top: 10px;
    margin-top: 5px;
}

.invoice-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 10px;
}

.signature-space {
    text-align: center;
    width: 200px;
}

.signature-line {
    border-top: 1px solid #94a3b8;
    margin-bottom: 8px;
}

.signature-space p {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Print Overrides */
@media print {
    @page {
        size: auto;
        margin: 0 !important; /* strictly hides browser headers & footers */
    }
    
    html, body {
        background-color: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .sidebar,
    .top-bar,
    .invoice-actions-panel,
    .btn,
    .btn-icon,
    .alert,
    .alert-success,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-wrapper {
        padding: 0 !important;
    }
    
    .invoice-view-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.4cm 0.8cm !important; /* Move margins here to prevent browsers from printing headers/footers */
    }
    
    .invoice-paper {
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background-color: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        height: 26.5cm !important;
        box-sizing: border-box !important;
    }
    
    /* Avoid breaking inside table rows */
    .invoice-items-table tr {
        page-break-inside: avoid;
    }
    
    /* Compress print spacing to fit on a single page */
    .invoice-header-block {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px !important;
    }
    .shop-info-left {
        text-align: left !important;
    }
    .invoice-info-right {
        text-align: right !important;
    }
    .invoice-header-block h2 {
        font-size: 1.5rem !important;
    }
    .invoice-header-block h3 {
        font-size: 1.3rem !important;
    }
    .invoice-header-block p {
        font-size: 0.8rem !important;
        margin-bottom: 2px !important;
    }
    .invoice-details-meta {
        display: grid !important;
        grid-template-columns: 1.25fr 0.75fr !important;
        margin-bottom: 12px !important;
        gap: 15px !important;
    }
    .meta-box h4 {
        font-size: 0.75rem !important;
        margin-bottom: 6px !important;
        padding-bottom: 4px !important;
    }
    .meta-box p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    .invoice-items-table {
        margin-bottom: 10px !important;
    }
    .invoice-items-table th, 
    .invoice-items-table td {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
    .invoice-summary-block {
        display: grid !important;
        grid-template-columns: 1.25fr 0.75fr !important;
        margin-bottom: 10px !important;
        gap: 15px !important;
        border-bottom: 1px dashed #cbd5e1 !important;
        padding-bottom: 10px !important;
    }
    .invoice-terms-box h4 {
        font-size: 0.75rem !important;
        margin-bottom: 4px !important;
    }
    .invoice-terms-box p {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    .invoice-totals-box {
        gap: 6px !important;
    }
    .invoice-totals-box .totals-line {
        font-size: 0.85rem !important;
    }
    .invoice-totals-box .totals-line.grand-total {
        font-size: 1.1rem !important;
        padding-top: 6px !important;
        margin-top: 4px !important;
    }
    .invoice-signatures {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        margin-top: auto !important;
        margin-bottom: auto !important;
        padding-top: 10px !important;
        border-top: none !important;
    }
    .signature-space {
        width: 180px !important;
        text-align: center !important;
    }
    .signature-space p {
        font-size: 0.75rem !important;
    }
}

/* Responsive Layout overrides for mobile viewports */
@media (max-width: 768px) {
    #sidebar-toggle-btn {
        display: inline-flex !important;
    }

    .sidebar {
        left: -260px;
        box-shadow: var(--shadow-lg);
        height: 100vh;
    }

    .sidebar.sidebar-open {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .gold-rates-ticker {
        display: none !important;
    }

    .top-bar {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px !important;
    }

    /* Invoice viewing responsiveness */
    .invoice-header-block {
        flex-direction: column;
        gap: 20px;
    }

    .invoice-info-right {
        text-align: left;
    }

    .invoice-details-meta {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .invoice-summary-block {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .invoice-signatures {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .invoice-actions-panel {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    .invoice-actions-panel .actions-left,
    .invoice-actions-panel .actions-right {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Tables horizontal scroll */
    .items-table-container {
        overflow-x: auto;
    }
    
    .items-table {
        min-width: 900px;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .table-custom {
        min-width: 600px;
    }
}

/* Vibrant Theme */
body.vibrant-theme {
    --bg-primary: #1e1b4b;
    --bg-secondary: #2e1065;
    --bg-card: rgba(49, 46, 129, 0.4);
    --bg-input: rgba(67, 56, 202, 0.2);
    --bg-input-focus: rgba(79, 70, 229, 0.3);
    
    --color-gold: #fbbf24;
    --color-gold-hover: #f59e0b;
    --color-gold-light: #fcd34d;
    --color-gold-dim: rgba(251, 191, 36, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #c7d2fe;
    --color-text-muted: #818cf8;
    
    --border-color: rgba(99, 102, 241, 0.3);
    --border-focus: #fbbf24;
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 0 20px rgba(251, 191, 36, 0.4);
}

body.vibrant-theme .panel-card, body.vibrant-theme .stat-card, body.vibrant-theme .metric-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(251, 191, 36, 0.2);
    background: linear-gradient(145deg, rgba(49, 46, 129, 0.4) 0%, rgba(67, 56, 202, 0.1) 100%);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Savings Section (Reference Image Replica) */
.savings-container-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 20px auto 35px auto;
    font-family: 'Outfit', sans-serif;
}

/* Today's Gold Rate Header Card */
.rate-section-header {
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
}

.rate-section-header h3 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.rate-row-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: 20px;
    padding: 16px 20px;
}

.rate-col {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.rate-coin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gold-coin {
    background: linear-gradient(135deg, #f5c542 0%, #d4af37 100%);
    color: #591330;
    border: 2px solid #f5c542;
}

.silver-coin {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    color: #334155;
    border: 2px solid #cbd5e1;
}

.rate-col-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.rate-col-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.rate-col-val {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Make values highlight properly in themes */
.gold-theme-val {
    color: var(--color-gold);
}

.rate-divider-line {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
    margin: 0 10px;
}

/* 3 Quick Action Buttons Grid */
.quick-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 25px;
}

.action-btn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 16px 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.action-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    transition: transform 0.2s ease;
}

.action-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.action-btn-label {
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-align: center;
}

.action-btn-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-md);
}

.action-btn-card.active {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
}

/* My Savings Section Title */
.savings-title-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.savings-title-header h3 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* Maroon Premium Savings Card */
.savings-maroon-card {
    width: 100%;
    background-color: #591330;
    border-radius: 28px;
    padding: 24px 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.card-id-name {
    display: flex;
    flex-direction: column;
}

.card-cust-id {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.card-cust-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffd700;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.card-scheme-type {
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    color: #ffd700;
}

/* Grid columns & rows */
.card-middle-grid,
.card-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1.1fr;
    align-items: center;
    gap: 8px;
}

.grid-item {
    display: flex;
    flex-direction: column;
}

.grid-item-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-item-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
}

.grid-col-divider {
    width: 1px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
}

.card-horizontal-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 16px 0;
}

.flex-end-item {
    align-items: flex-end;
}

/* 2-col bottom grid (no Pay button) */
.card-bottom-grid-simple {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 8px;
}

/* Pay Button inside card */
.btn-pay-gold {
    background-color: #fff6eb;
    color: #591330;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.btn-pay-gold:hover {
    background-color: #ffe8d1;
    transform: scale(1.03);
}

.btn-pay-gold svg {
    stroke: #591330;
}

/* Footer row in card */
.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-footer-left {
    font-size: 0.78rem;
    color: #ffd700;
    font-weight: 500;
}

.card-footer-right {
    display: flex;
    align-items: center;
}

/* Indicators under card */
.card-indicators-dots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.dot-pill {
    height: 6px;
    width: 16px;
    background-color: var(--color-gold);
    border-radius: 3px;
    opacity: 0.9;
}

.dot-circle {
    height: 6px;
    width: 6px;
    background-color: var(--color-text-secondary);
    border-radius: 50%;
    opacity: 0.4;
}

/* Custom Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.custom-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    color: var(--color-text-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-gold);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--color-gold);
}

/* Mobile responsive fixes */
@media (max-width: 540px) {
    .card-middle-grid,
    .card-bottom-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }
    
    .grid-col-divider {
        display: none;
    }
    
    .flex-end-item {
        align-items: center;
    }
    
    .quick-actions-row {
        gap: 8px;
    }
    
    .action-btn-card {
        padding: 10px 4px;
    }
    
    .rate-row-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .rate-divider-line {
        width: 80%;
        height: 1px;
    }
}

/* ===================================
   ROYAL GOLD THEME
   Colors: #591330, #530A28, #FFD700,
           #F8FAFC, #E5E7EB, #A0A0A0, #F3EDE3
   =================================== */
body.royal-gold-theme {
    --bg-primary:        #F3EDE3;
    --bg-secondary:      #E5E7EB;
    --bg-card:           #FFFFFF;
    --bg-input:          #F8FAFC;
    --bg-input-focus:    rgba(89, 19, 48, 0.06);

    --color-gold:        #591330;
    --color-gold-hover:  #530A28;
    --color-gold-light:  #7a1a40;
    --color-gold-dim:    rgba(89, 19, 48, 0.1);

    --color-success:     #16a34a;
    --color-danger:      #dc2626;
    --color-info:        #0284c7;

    --color-text-primary:   #1a0a0f;
    --color-text-secondary: #530A28;
    --color-text-muted:     #A0A0A0;

    --border-color:  rgba(89, 19, 48, 0.2);
    --border-focus:  #FFD700;

    --shadow-sm: 0 1px 3px rgba(89, 19, 48, 0.08);
    --shadow-md: 0 4px 12px rgba(89, 19, 48, 0.12), 0 2px 4px rgba(89, 19, 48, 0.06);
    --shadow-lg: 0 10px 25px rgba(89, 19, 48, 0.15), 0 4px 8px rgba(89, 19, 48, 0.08);
    --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.35);

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
}

/* Body + App background */
body.royal-gold-theme {
    background: linear-gradient(160deg, #F3EDE3 0%, #E5E7EB 100%);
    color: var(--color-text-primary);
}

/* Sidebar */
body.royal-gold-theme .sidebar {
    background: linear-gradient(180deg, #591330 0%, #530A28 100%);
    border-right: 1px solid rgba(255, 215, 0, 0.2);
}

body.royal-gold-theme .sidebar-brand,
body.royal-gold-theme .brand-text,
body.royal-gold-theme .brand-text span {
    color: #FFD700;
}

body.royal-gold-theme .sidebar-logo {
    color: #FFD700;
}

body.royal-gold-theme .menu-item a {
    color: rgba(255, 255, 255, 0.75);
}

body.royal-gold-theme .menu-item a:hover,
body.royal-gold-theme .menu-item.active a {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.12);
}

body.royal-gold-theme .menu-item.active a {
    border-right: 3px solid #FFD700;
}

body.royal-gold-theme .sidebar-user {
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

body.royal-gold-theme .user-avatar {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

body.royal-gold-theme .username,
body.royal-gold-theme .role {
    color: rgba(255, 255, 255, 0.8);
}

body.royal-gold-theme .btn-logout {
    color: rgba(255, 255, 255, 0.6);
}

body.royal-gold-theme .btn-logout:hover {
    color: #FFD700;
}

/* Top bar */
body.royal-gold-theme .top-bar {
    background: #FFFFFF;
    border-bottom: 1px solid rgba(89, 19, 48, 0.12);
    box-shadow: 0 1px 6px rgba(89, 19, 48, 0.08);
}

body.royal-gold-theme .page-title h2 {
    color: #591330;
}

body.royal-gold-theme .gold-rates-ticker {
    background: rgba(89, 19, 48, 0.05);
    border: 1px solid rgba(89, 19, 48, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
}

body.royal-gold-theme .rate-label {
    color: #A0A0A0;
}

body.royal-gold-theme .rate-value {
    color: #591330;
    font-weight: 700;
}

/* Cards & Panels */
body.royal-gold-theme .panel-card,
body.royal-gold-theme .stat-card,
body.royal-gold-theme .metric-card {
    background: #FFFFFF;
    border: 1px solid rgba(89, 19, 48, 0.1);
    box-shadow: 0 2px 8px rgba(89, 19, 48, 0.07);
}

body.royal-gold-theme .panel-header {
    border-bottom: 1px solid rgba(89, 19, 48, 0.1);
}

body.royal-gold-theme .panel-title {
    color: #591330;
}

body.royal-gold-theme .metric-icon-box.gold {
    background-color: rgba(89, 19, 48, 0.08);
    border-color: rgba(89, 19, 48, 0.18);
    color: #591330;
}

/* Buttons */
body.royal-gold-theme .btn-primary {
    background: linear-gradient(135deg, #591330 0%, #530A28 100%);
    border-color: #591330;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(89, 19, 48, 0.25);
}

body.royal-gold-theme .btn-primary:hover {
    background: linear-gradient(135deg, #6e1a3d 0%, #591330 100%);
    box-shadow: 0 4px 14px rgba(89, 19, 48, 0.35);
}

body.royal-gold-theme .btn-secondary {
    background: #F8FAFC;
    border-color: rgba(89, 19, 48, 0.25);
    color: #591330;
}

body.royal-gold-theme .btn-secondary:hover {
    background: rgba(89, 19, 48, 0.06);
    border-color: #591330;
}

/* Inputs */
body.royal-gold-theme input,
body.royal-gold-theme select,
body.royal-gold-theme textarea,
body.royal-gold-theme .form-control {
    background: #F8FAFC;
    border-color: rgba(89, 19, 48, 0.2);
    color: #1a0a0f;
}

body.royal-gold-theme input:focus,
body.royal-gold-theme select:focus,
body.royal-gold-theme textarea:focus,
body.royal-gold-theme .form-control:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Table */
body.royal-gold-theme .table-custom thead tr {
    background: rgba(89, 19, 48, 0.05);
}

body.royal-gold-theme .table-custom th {
    color: #591330;
}

body.royal-gold-theme .table-custom tbody tr:hover {
    background: rgba(89, 19, 48, 0.03);
}

body.royal-gold-theme .table-custom td {
    border-bottom-color: rgba(89, 19, 48, 0.08);
}

/* Badges */
body.royal-gold-theme .badge-gold {
    background-color: rgba(89, 19, 48, 0.1);
    color: #591330;
    border-color: rgba(89, 19, 48, 0.25);
}

/* Savings card rate row */
body.royal-gold-theme .rate-row-card {
    background: #FFFFFF;
    border-color: rgba(89, 19, 48, 0.12);
}

body.royal-gold-theme .rate-col-val {
    color: #591330;
}

/* Action buttons */
body.royal-gold-theme .action-btn-card {
    background: #FFFFFF;
    border-color: rgba(89, 19, 48, 0.15);
}

body.royal-gold-theme .action-btn-card:hover,
body.royal-gold-theme .action-btn-card.active {
    border-color: #591330;
    background: rgba(89, 19, 48, 0.04);
}

body.royal-gold-theme .action-icon-wrapper {
    color: #591330;
}

body.royal-gold-theme .action-btn-label {
    color: #530A28;
}

/* Savings maroon card stays as-is (it IS maroon by design) */
body.royal-gold-theme .savings-maroon-card {
    background: linear-gradient(135deg, #591330 0%, #530A28 100%);
    box-shadow: 0 12px 32px rgba(89, 19, 48, 0.35);
}

/* Alert icons */
body.royal-gold-theme .btn-icon:hover {
    color: #591330;
    border-color: #591330;
    background-color: rgba(89, 19, 48, 0.07);
}

/* Metric card gold values */
body.royal-gold-theme .metric-val {
    color: #591330 !important;
}

/* Dot indicators */
body.royal-gold-theme .dot-pill {
    background-color: #591330;
}

body.royal-gold-theme .savings-title-header h3,
body.royal-gold-theme .rate-section-header h3 {
    color: #530A28;
}

/* Purple Light Theme */
body.purple-light-theme {
    --bg-primary: #faf5ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f3e8ff;
    --bg-input-focus: #ffffff;
    
    --color-gold: #9333ea;
    --color-gold-hover: #7e22ce;
    --color-gold-light: #d8b4fe;
    --color-gold-dim: rgba(147, 51, 234, 0.15);
    
    --color-text-primary: #1e1b4b;
    --color-text-secondary: #4c1d95;
    --color-text-muted: #6b21a8;
    
    --border-color: #e9d5ff;
    --border-focus: #9333ea;
    
    --shadow-sm: 0 1px 3px rgba(147, 51, 234, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(147, 51, 234, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(147, 51, 234, 0.05);
}

body.purple-light-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #f3e8ff 0%, #d8b4fe 90%);
}

/* Purple Gold Theme */
body.purple-gold-theme {
    --bg-primary: #150b24;
    --bg-secondary: #211236;
    --bg-card: #2e1a4a;
    --bg-input: #1a0e2d;
    --bg-input-focus: #2d184e;
    
    --color-gold: #d4af37;
    --color-gold-hover: #e6c24a;
    --color-gold-light: #f5e4ab;
    --color-gold-dim: rgba(212, 175, 55, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #e9d5ff;
    --color-text-muted: #b8860b;
    
    --border-color: #442866;
    --border-focus: #d4af37;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.25);
}

body.purple-gold-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #211236 0%, #150b24 90%);
}

/* Purple Gold Light Theme */
body.purple-gold-light-theme {
    --bg-primary: #faf5ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f3e8ff;
    --bg-input-focus: #ffffff;
    
    --color-gold: #9333ea;
    --color-gold-hover: #7e22ce;
    --color-gold-light: #d8b4fe;
    --color-gold-dim: rgba(147, 51, 234, 0.15);
    
    --color-text-primary: #1e1b4b;
    --color-text-secondary: #4c1d95;
    --color-text-muted: #b8860b; /* Gold highlights */
    
    --border-color: #e9d5ff;
    --border-focus: #d4af37;
    
    --shadow-sm: 0 1px 3px rgba(147, 51, 234, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(147, 51, 234, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(147, 51, 234, 0.05);
}

body.purple-gold-light-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #f3e8ff 0%, #faf5ff 90%);
}

/* Emerald Luxury Theme */
body.emerald-luxury-theme {
    --bg-primary: #062f21;
    --bg-secondary: #042419;
    --bg-card: #093c2c;
    --bg-input: #031c13;
    --bg-input-focus: #074734;
    
    --color-gold: #d4af37;
    --color-gold-hover: #e6c24a;
    --color-gold-light: #f5e4ab;
    --color-gold-dim: rgba(212, 175, 55, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #a7f3d0;
    --color-text-muted: #10b981;
    
    --border-color: #0d5c44;
    --border-focus: #d4af37;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.25);
}

body.emerald-luxury-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #042419 0%, #062f21 90%);
}

/* Rose Gold Theme */
body.rose-gold-theme {
    --bg-primary: #fffbfb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #fdf5f3;
    --bg-input-focus: #ffffff;
    
    --color-gold: #e49383;
    --color-gold-hover: #d38070;
    --color-gold-light: #F4C1B7;
    --color-gold-dim: rgba(244, 193, 183, 0.25);
    
    --color-text-primary: #2e2523;
    --color-text-secondary: #665551;
    --color-text-muted: #b3a09d;
    
    --border-color: #f5dbd6;
    --border-focus: #e49383;
    
    --shadow-sm: 0 1px 3px rgba(244, 193, 183, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(244, 193, 183, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(244, 193, 183, 0.05);
}

body.rose-gold-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #fdf5f3 0%, #fffbfb 90%);
}

/* Midnight Sapphire Theme */
body.midnight-sapphire-theme {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: #1f2937;
    --bg-input: #0e131f;
    --bg-input-focus: #1a2333;
    
    --color-gold: #3b82f6;
    --color-gold-hover: #2563eb;
    --color-gold-light: #60a5fa;
    --color-gold-dim: rgba(59, 130, 246, 0.15);
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    
    --border-color: #374151;
    --border-focus: #3b82f6;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 15px rgba(59, 130, 246, 0.25);
}

body.midnight-sapphire-theme.login-body {
    background-image: radial-gradient(circle at 10% 20%, #111827 0%, #0b0f19 90%);
}
