/* ============================================
   Bhajan Planner - Shared Design System
   ============================================ */

/* --- CSS Custom Properties (Theme Tokens) --- */
:root {
    /* Primary palette - saffron/spiritual warmth */
    --primary: #F78C1F;
    --primary-dark: #D96B0A;
    --primary-light: #FFB366;
    --accent: #D62227;
    --accent-light: #FF6B6B;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #F78C1F, #D62227);
    --gradient-subtle: linear-gradient(135deg, #FFF5EB, #FFF0F0);
    --gradient-header: linear-gradient(135deg, #1a1a2e, #16213e);

    /* Neutrals */
    --bg: #F5F3EF;
    --bg-card: #FFFFFF;
    --bg-hover: #F8F6F2;
    --bg-muted: #F0EDE8;
    --border: #E5E0D8;
    --border-light: #F0EDE8;

    /* Text */
    --text: #2D2A26;
    --text-secondary: #6B6560;
    --text-muted: #9B9590;
    --text-on-primary: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 24px rgba(247, 140, 31, 0.2);

    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    /* Typography */
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Segoe UI', system-ui, sans-serif;

    /* Nav */
    --nav-height: 64px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
    --bg: #1a1a2e;
    --bg-card: #222244;
    --bg-hover: #2a2a4e;
    --bg-muted: #1e1e38;
    --border: #333366;
    --border-light: #2a2a50;
    --text: #E8E6E3;
    --text-secondary: #A8A4A0;
    --text-muted: #777370;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --gradient-subtle: linear-gradient(135deg, #1e1e38, #222244);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

a:hover {
    color: var(--primary-dark);
}

/* --- Navigation Bar --- */
.pmb-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(26, 26, 46, 0.85);
    /* Glassmorphism base */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pmb-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.15em;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.pmb-nav-brand .nav-icon {
    font-size: 1.4em;
}

.pmb-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pmb-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.pmb-nav-links a:hover,
.pmb-nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.pmb-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dark mode toggle button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Login nav button */
.nav-login-btn {
    background: var(--gradient-primary);
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    transition: all var(--transition-fast) !important;
    box-shadow: 0 2px 8px rgba(247, 140, 31, 0.3);
}

.nav-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 140, 31, 0.4) !important;
    background: linear-gradient(135deg, #e07b1c, #c01f23) !important;
}

/* Hamburger menu */
.pmb-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.pmb-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* --- Main Container --- */
.container {
    margin: 40px auto;
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    width: 95%;
    max-width: 680px;
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.container-wide {
    max-width: 800px;
}

/* --- Typography --- */
h1 {
    font-family: var(--font-display);
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

h2 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.92em;
    margin: 0 0 4px 0;
    letter-spacing: 0.03em;
}

/* --- Decorative Line --- */
.elegant-line {
    margin: 0 auto 24px;
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), var(--accent), transparent);
    opacity: 0.5;
    max-width: 300px;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    text-align: left;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateY(-2px);
}

.card-header {
    font-weight: 700;
    font-size: 1.05em;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header .card-icon {
    font-size: 1.2em;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.5;
    min-height: 48px;
    /* Mobile touch target */
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    box-shadow: 0 2px 8px rgba(247, 140, 31, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(247, 140, 31, 0.35);
}

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

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-on-primary);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.25);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.35);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
    background: #1DA851;
    transform: translateY(-1px);
}

.btn-icon {
    padding: 8px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
    min-height: 40px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* --- Forms --- */
fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-bottom: 16px;
    background: var(--bg-card);
    transition: border-color var(--transition-fast);
}

fieldset:hover {
    border-color: var(--primary-light);
}

legend {
    font-weight: 700;
    color: var(--text);
    padding: 4px 12px;
    font-size: 1.1em;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    margin-bottom: 16px;
    background: transparent;
    text-decoration: none;
}

.form-group {
    margin-bottom: 16px;
    text-align: center;
}

label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95em;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    /* Prevents iOS auto-zoom */
    color: var(--text);
    background-color: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    min-height: 48px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(247, 140, 31, 0.15);
}

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

.help-block {
    color: var(--text-muted);
    font-size: 0.88em;
    margin-top: 6px;
    margin-bottom: 6px;
}

/* --- Tables --- */
table {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    background-color: var(--bg-card);
    font-family: var(--font-body);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th,
td {
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.93em;
}

th {
    background: var(--gradient-header);
    color: #fff;
    font-weight: 600;
    font-size: 0.88em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr {
    transition: background-color var(--transition-fast);
}

tr:nth-child(even) {
    background-color: var(--bg-hover);
}

tr:hover {
    background-color: var(--bg-muted);
}

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    gap: 0;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.93em;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-body);
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Today's Bhajans Widget --- */
.todays-widget {
    background: var(--gradient-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.todays-widget h2 {
    font-size: 1.25em;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.todays-widget .bhajan-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    gap: 12px;
}

.todays-widget .bhajan-row:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.todays-widget .bhajan-deity {
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.8em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 24px;
    white-space: nowrap;
    min-width: 76px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(247, 140, 31, 0.2);
}

.todays-widget .bhajan-name {
    flex: 1;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95em;
}

.todays-widget .bhajan-singers {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 500;
}

.todays-widget .empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.95em;
}

.todays-widget .widget-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

/* --- Quick Stats --- */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    /* responsive flex */
}

.quick-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-muted);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95em;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.quick-stats .stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--bg-hover);
}

.quick-stats .stat-value {
    font-weight: 800;
    font-size: 1.1em;
    color: var(--primary);
}

/* --- Checkbox / Toggle Pills --- */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.pill-group input[type="checkbox"],
.pill-group input[type="radio"] {
    display: none;
}

.pill-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.88em;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    user-select: none;
}

.pill-label:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

input[type="checkbox"]:checked+.pill-label,
input[type="radio"]:checked+.pill-label {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(247, 140, 31, 0.25);
}

input[type="checkbox"]:disabled+.pill-label {
    background: var(--bg-muted);
    color: var(--text-muted);
    border-color: var(--border-light);
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.modal-box .form-group {
    text-align: left;
    margin-bottom: 14px;
}

.modal-box input[type="text"],
.modal-box input[type="password"] {
    width: 100%;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    min-width: 260px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease;
    font-size: 0.9em;
}

.toast.success {
    border-left: 4px solid #27ae60;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 600;
}

.badge-primary {
    background: rgba(247, 140, 31, 0.12);
    color: var(--primary-dark);
}

.badge-success {
    background: rgba(39, 174, 96, 0.12);
    color: #1e8449;
}

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

/* --- Autocomplete Dropdown --- */
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-items table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.autocomplete-items th,
.autocomplete-items td {
    border: none;
    padding: 8px 12px;
    font-size: 0.88em;
}

.autocomplete-items th {
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: 0.8em;
    text-transform: uppercase;
}

.autocomplete-item {
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--bg-hover);
}

/* --- Admin Cards Grid --- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
}

@media (min-width: 500px) {
    .admin-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: all var(--transition-fast);
    cursor: default;
}

.admin-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.admin-card h3 {
    font-size: 1em;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.admin-card p {
    font-size: 0.87em;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    :root {
        --nav-height: 56px;
    }

    .pmb-nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--gradient-header);
        flex-direction: column;
        padding: 10px 16px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
    }

    .pmb-nav-links.open {
        display: flex;
    }

    .pmb-nav-links a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        width: 100%;
        text-align: left;
    }

    .pmb-hamburger {
        display: flex;
    }

    .container {
        width: 94%;
        padding: 18px;
        margin: 16px auto;
    }

    h1 {
        font-size: 1.7em;
    }

    .todays-widget .bhajan-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .todays-widget .bhajan-singers {
        width: 100%;
        text-align: right;
        font-size: 0.82em;
    }

    .quick-stats {
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        padding: 10px 14px;
        font-size: 0.88em;
        flex-shrink: 0;
    }

    .modal-box {
        width: 94%;
        padding: 22px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .container {
        max-width: 650px;
    }
}

@media (min-width: 901px) {
    .container {
        max-width: 700px;
    }

    .container-wide {
        max-width: 900px;
    }
}

/* --- Print Styles --- */
@media print {
    body {
        padding-top: 0;
        background: #fff;
        color: #000;
    }

    .pmb-nav,
    .toast-container,
    .modal-overlay,
    .btn,
    .theme-toggle,
    .nav-login-btn,
    .widget-actions,
    .no-print {
        display: none !important;
    }

    .container {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .todays-widget {
        border: 1px solid #ccc;
        background: #fff;
    }

    .todays-widget .bhajan-row {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .todays-widget .bhajan-deity {
        background: #eee;
        color: #333;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
    }

    th {
        background: #333 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    h1 {
        background: none;
        -webkit-text-fill-color: #333;
        color: #333;
    }
}

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

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

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

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

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

.fw-bold {
    font-weight: 700;
}

.mt-0 {
    margin-top: 0;
}

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

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

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

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

.mb-3 {
    margin-bottom: 24px;
}

.p-0 {
    padding: 0;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

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

.hidden {
    display: none;
}

.w-100 {
    width: 100%;
}

.w-auto {
    width: auto;
}

/* --- jQuery UI Overrides --- */
.ui-datepicker {
    font-family: var(--font-body) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border) !important;
}

.ui-datepicker-header {
    background: var(--gradient-header) !important;
    color: #fff !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    border: none !important;
}

.ui-state-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}