/* 
 * LDS Sacrament Meeting Speaker Tracker - Premium Style Sheet
 * Dark glassmorphism, responsive dashboard layout, and dynamic transitions.
 */

@import url('https://fonts.googleapis.com/css2?family=Georgia&family=Inter:wght@300;400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* The Church of Jesus Christ of Latter-day Saints Official Web Design System ("Eden / Unity") Palette */

    /* Official Church Brand Colors */
    --church-navy: #003057;
    /* Primary Deep Navy */
    --church-teal: #006184;
    /* Primary Church Teal / Blue */
    --church-teal-light: #007da5;
    /* Active Light Blue */
    --church-cyan: #01b6d1;
    /* Vibrant Accent Cyan */
    --church-cyan-bg: #eef8fa;
    /* Light Tint Cyan Background */

    /* Neutrals & Surfaces (Light Level Hierarchy) */
    --church-white: #ffffff;
    --church-gray-50: #f7f8f8;
    /* Page Base Background */
    --church-gray-100: #eff0f0;
    /* Hover Surfaces / Level 2 */
    --church-gray-200: #e0e2e2;
    /* Subtle Border Divider */
    --church-gray-300: #d0d3d3;
    /* Form Border */
    --church-gray-500: #878a8c;
    /* Muted Text */
    --church-gray-700: #53575b;
    /* Secondary Text */
    --church-gray-900: #212225;
    /* Primary Charcoal Body Text */

    /* Typography */
    --font-serif: "Noto Serif", Georgia, "Ensign:Serif", serif;
    --font-sans: "Inter", Roboto, Arial, "Ensign:Sans", sans-serif;

    /* Semantic Variable Mapping */
    --bg-base: var(--church-gray-50);
    --bg-surface: var(--church-white);
    --bg-surface-hover: var(--church-gray-100);
    --border-color: var(--church-gray-200);
    --border-focus: var(--church-teal);
    --UpcomingMeeting: rgba(0, 97, 132, 0.08);

    --primary: var(--church-teal);
    --primary-light: var(--church-teal-light);
    --primary-glow: rgba(0, 97, 132, 0.15);

    --secondary: var(--church-navy);
    --secondary-light: var(--church-teal);
    --secondary-glow: rgba(0, 48, 87, 0.15);

    --accent: var(--church-teal-light);
    --accent-light: var(--church-cyan-bg);
    --accent-glow: rgba(1, 182, 209, 0.15);

    --danger: #b00504;
    --danger-light: #ed3a65;

    --success: #206b3f;
    --success-light: #6db344;

    --text-primary: var(--church-gray-900);
    --text-secondary: var(--church-gray-700);
    --text-muted: var(--church-gray-500);

    /* Layout Constants */
    --sidebar-width: 280px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xg: 0 4px 16px rgba(0, 0, 0, 0.06);
    --glow-primary: 0 0 12px var(--primary-glow);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 {
    font-size: 1.85rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.01em;
    color: var(--church-navy);
}

/* Layout Framework */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--church-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
}

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

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--church-teal);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--church-white);
    font-size: 1.15rem;
    box-shadow: 0 2px 4px rgba(0, 97, 132, 0.2);
}

.sidebar-header .logo-icon {
    width: 38px;
    height: 38px;
}

.sidebar-header h1 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--church-navy);
    background: none;
    -webkit-text-fill-color: initial;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--church-gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--church-teal);
}

.nav-item:hover {
    color: var(--church-teal);
    background: var(--church-cyan-bg);
    border-color: transparent;
}

.nav-item.active {
    color: var(--church-teal);
    background: var(--church-cyan-bg);
    border-left: 3px solid var(--church-teal);
    font-weight: 600;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: none;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1400px;
    width: calc(100% - var(--sidebar-width));
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.page-header-title h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--church-navy);
    margin-bottom: 4px;
}

.page-header-title p {
    color: var(--church-gray-700);
    font-size: 0.95rem;
}

/* Panels / Cards */
.panel {
    background: var(--church-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Stats Widgets */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
}

.stat-icon.primary {
    background: var(--church-teal);
    box-shadow: 0 2px 6px rgba(0, 97, 132, 0.2);
}

.stat-icon.secondary {
    background: var(--church-navy);
    box-shadow: 0 2px 6px rgba(0, 48, 87, 0.2);
}

.stat-icon.accent {
    background: var(--church-teal-light);
    box-shadow: 0 2px 6px rgba(0, 125, 165, 0.2);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--church-gray-900);
    font-family: var(--font-serif);
    line-height: 1.2;
}

.stat-label {
    color: var(--church-gray-700);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.row {
    flex-direction: row;
    gap: 16px;
}

.form-group.row>* {
    flex: 1;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="date"],
input[type="password"],
input[type="email"],
input,
select,
textarea {
    background: var(--church-white);
    border: 1px solid var(--church-gray-300);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--church-gray-900);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--church-teal);
    box-shadow: 0 0 0 3px rgba(0, 97, 132, 0.15);
    background: var(--church-white);
}

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

select option {
    background-color: var(--church-white);
    color: var(--church-gray-900);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--church-teal);
    color: var(--church-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--church-navy);
    color: var(--church-white);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 48, 87, 0.2);
}

.btn-secondary {
    background: var(--church-cyan-bg);
    color: var(--church-teal);
    border: 1px solid rgba(0, 97, 132, 0.2);
}

.btn-secondary:hover {
    background: var(--church-teal);
    color: var(--church-white);
    transform: translateY(-1px);
}

.btn2-secondary {
    background: var(--church-navy);
    color: var(--church-white);
}

.btn2-secondary:hover {
    background: var(--church-teal);
    transform: translateY(-1px);
}

.btn3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 7px;
    margin: 4px 7px;
    font-size: 0.75rem;
    font-weight: 400;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
}

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

.btn3-secondary:hover {
    background: var(--bg-surface-hover);
    color: white;
    border-color: var(--text-muted);
}

.btn-danger {
    background: rgba(225, 29, 72, 0.2);
    color: var(--danger-light);
    border: 1px solid rgba(225, 29, 72, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

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

.btn-outline:hover {
    background: var(--bg-surface-hover);
    color: white;
    border-color: var(--text-muted);
}

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

.btn-icon-only {
    padding: 8px;
    border-radius: var(--radius-sm);
    aspect-ratio: 1;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

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

th {
    background: var(--church-cyan-bg);
    color: var(--church-gray-700);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 15px;
    border-bottom: 2px solid var(--church-gray-200);
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--church-gray-200);
    color: var(--church-gray-900);
    background: var(--church-white);
}

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

tr:hover td {
    background: var(--church-gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid transparent;
}

.badge-adult {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #bbdefb;
}

.badge-youth {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.badge-primary-group {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffe0b2;
}

.badge-active {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.badge-do-not-ask {
    background: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

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

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--success-light);
}

.alert-danger {
    background: rgba(225, 29, 72, 0.1);
    border-color: rgba(225, 29, 72, 0.25);
    color: var(--danger-light);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--secondary-light);
}

/* Tabs Panel details */
.tab-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-section.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

/* Modal and Overlays */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
    animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
    background: var(--church-white);
    border: 1px solid var(--church-gray-200);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 950px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 22px;
    position: relative;
    box-shadow: var(--shadow-xl);
    box-sizing: border-box;
    color: var(--church-gray-900);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color, #334155);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted, #64748b);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: white;
}

.modal-title {
    margin-bottom: 24px;
    font-size: 1.5rem;
}

/* Specific UI Utilities */
.search-bar-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
}

.no-data {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-style: italic;
}

/* Interactive Suggester styles */
.suggest-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.suggest-filters select {
    width: auto;
    min-width: 150px;
}

.card-theme {
    /*    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(74, 222, 128, 0.14)); */
    background: var(--church-cyan);
    /* Vibrant Accent Cyan */
    border-color: rgba(99, 102, 241, 0.3);
}

.meeting-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.meeting-date {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
}

.meeting-theme {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 4px;
}

.meeting-speakers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.speaker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.03);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}


.speaker-item:hover {
    border-color: rgba(15, 23, 42, 0.22);
    background: rgba(15, 23, 42, 0.04);
}

.speaker-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.speaker-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speaker-name {
    font-weight: 600;
    color: var(--text-primary);
}

.speaker-topic {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.talk-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.talk-badge.youth-talk {
    background: rgba(74, 222, 128, 0.2);
    color: var(--light-green);
}

.talk-badge.sacrament-talk {
    background: rgba(99, 102, 241, 0.2);
    color: var(--indigo-light);
}

.talk-badge.intermediate-talk {
    background: rgba(226, 232, 240, 0.15);
    color: var(--light-gray-soft);
}

.talk-badge.opening-prayer {
    background: rgba(74, 222, 128, 0.25);
    color: var(--light-green-hover);
}

.talk-badge.closing-prayer {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-light);
}

/* Custom file-import layout */
.import-flex-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.import-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    background: rgba(15, 23, 42, 0.2);
    transition: var(--transition-fast);
}

.import-box:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.4);
}

.import-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

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

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

/* Responsive Overrides */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .sidebar-header h1,
    .sidebar-footer,
    .nav-item span {
        display: none;
    }

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

    .sidebar-nav {
        padding: 16px 8px;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-header {
        padding: 16px 24px;
    }

    .sidebar-header h1 {
        display: block;
    }

    .sidebar-nav {
        flex-direction: row;
        padding: 8px 16px;
        overflow-x: auto;
        gap: 8px;
    }

    .nav-item span {
        display: inline;
        font-size: 0.85rem;
    }

    .sidebar-footer {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        gap: 12px;
    }

    .sidebar-footer .sidebar-user {
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
    }

    .sidebar-footer .logout-link {
        width: auto;
        flex-shrink: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }

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

    .form-group.row {
        flex-direction: column;
        gap: 0;
    }
}

/* Auth pages (login / register / logout landing) */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    overflow-x: hidden;
}

.auth-shell {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: authRise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

.auth-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.auth-brand h1 {
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--church-gray-200), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 320px;
    line-height: 1.55;
}

.auth-panel {
    padding: 32px;
}

.auth-panel-header {
    margin-bottom: 24px;
}

.auth-panel-header h2 {
    font-size: 1.45rem;
    margin-bottom: 6px;
}

.auth-panel-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon>i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 42px;
}

.auth-submit {
    width: 100%;
    padding: 13px 20px;
    margin-top: 8px;
    font-size: 1rem;
}

.auth-footer-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-footer-links a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.auth-footer-links a:hover {
    color: white;
}

.sidebar-footer .logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition-fast);
    width: 100%;
}

.sidebar-footer .logout-link:hover {
    color: var(--danger-light);
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.25);
}

.sidebar-user {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.sidebar-user strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================================================
   UPCOMING EVENT CALENDAR STYLES
   ========================================================================== */
.calendar-section {
    background: var(--bg-surface, rgba(17, 24, 39, 0.7));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 16px);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}

.calendar-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--primary-light, #14b8a6);
}

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

.month-box {
    background: var(--church-white);
    border: 1px solid var(--church-gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
}

.month-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 12px;
    color: var(--church-navy);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 0.8rem;
}

.day-header {
    font-weight: 600;
    color: var(--church-gray-700);
    padding-bottom: 6px;
    min-width: 24px;
}

.day-cell {
    min-height: 48px;
    padding: 3px;
    border-radius: 4px;
    background: var(--church-gray-50);
    border: 1px solid var(--church-gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    transition: all 0.2s ease;
}

.day-cell.other-month {
    opacity: 0.3;
}

.day-cell.is-today {
    border-color: var(--church-teal);
    background: var(--church-cyan-bg);
}

.day-cell.has-event-day {
    background: #e0f7fa;
    border: 1px solid var(--church-teal);
    box-shadow: 0 0 6px rgba(0, 97, 132, 0.25);
    cursor: pointer;
}

.day-num {
    font-size: 0.78rem;
    font-weight: 600;
    pointer-events: none;
    margin-top: 1px;
}

.day-cell.has-event-day .day-num {
    color: var(--church-navy);
    font-weight: 700;
}

.event-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    color: var(--church-teal) !important;
    font-size: 1.2rem !important;
    text-decoration: none;
    cursor: pointer;
    z-index: 100;
    width: 100%;
    padding: 2px 0;
    transition: transform 0.15s ease;
}

.event-icon-btn i {
    color: var(--church-teal) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 97, 132, 0.3));
}

.event-icon-btn:hover {
    transform: scale(1.3);
}

.calendar-popover {
    position: fixed;
    z-index: 9999;
    width: 320px;
    background: var(--church-white);
    border: 1px solid var(--church-teal);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-xl);
    color: var(--church-gray-900);
    animation: fadeIn 0.2s ease-out;
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--church-gray-200);
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--church-navy);
}

.popover-close-btn {
    background: transparent;
    border: none;
    color: var(--church-gray-500);
    font-size: 1.1rem;
    cursor: pointer;
}

.popover-close-btn:hover {
    color: var(--church-gray-900);
}

.popover-event-item {
    background: var(--church-gray-50);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--church-teal);
    font-size: 0.85rem;
    line-height: 1.4;
}

.popover-event-item:last-child {
    margin-bottom: 0;
}

.popover-event-item a {
    color: var(--church-teal);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
}

.popover-event-item a:hover {
    text-decoration: underline;
}

.date-highlight {
    background: var(--church-cyan-bg);
    color: var(--church-teal);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(0, 97, 132, 0.2);
    font-weight: 600;
}