/* Modern Clean Dashboard Theme with Tabs */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --bg-page: #f0fdf4;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

/* ... (Previous Styles) ... */

/* ... (Keep existing root & layout) ... */

/* MEDIA GALLERY GRID */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.media-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    aspect-ratio: 16/9;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .btn-delete-media {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* SCHEDULE LIST */
.schedule-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.schedule-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.media-selection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.media-select-opt {
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.media-select-opt.selected {
    border-color: var(--primary-color);
}

.media-select-opt img,
.media-select-opt video {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
}

.media-select-opt .check-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-color);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.media-select-opt.selected .check-indicator {
    display: flex;
}

.dashboard-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: flex-start;
}

.sidebar-menu {
    width: 250px;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 100px;
    /* Below Navbar */
    flex-shrink: 0;
}

.menu-item {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.menu-item:hover {
    background-color: #ecfdf5;
    color: var(--primary-dark);
}

.menu-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.content-area {
    flex: 1;
    min-width: 0;
    /* Prevent overflow */
}

.tab-section {
    display: none;
    /* Hidden by default */
}

.tab-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SEARCH & FILTER */
.search-box {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 14px;
    height: 14px;
}

/* RUNNING TEXT LIST */
.text-list-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
}

.text-list-item input[type="text"] {
    flex: 1;
}

.btn-remove {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-remove:hover {
    background: #fca5a5;
    color: white;
}

/* UPLOAD ZONE */
.upload-zone {
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #ecfdf5;
}

.upload-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    max-height: 200px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar-menu {
        width: 100%;
        position: relative;
        top: 0;
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .menu-item {
        white-space: nowrap;
        margin-bottom: 0;
    }
}

:root {
    --primary-color: #10b981;
    /* Emerald 500 */
    --primary-dark: #059669;
    /* Emerald 600 */
    --primary-light: #d1fae5;
    /* Emerald 100 */
    --secondary-color: #3b82f6;
    /* Blue 500 */
    --bg-body: #f3f4f6;
    /* Gray 100 */
    --bg-card: #ffffff;
    --text-main: #111827;
    /* Gray 900 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --border-color: #e5e7eb;
    /* Gray 200 */
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-heading);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* LAYOUT WRAPPER */
.jam-masjid-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVIGATION */
.dashboard-nav {
    background: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.25rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: #ef4444;
}

/* MAIN LAYOUT */
.dashboard-layout {
    display: flex;
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    padding-top: 2rem;
}

/* SIDEBAR */
.sidebar-menu {
    width: 260px;
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    margin: 0 1.5rem;
    height: fit-content;
    position: sticky;
    top: 5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 1.25rem;
    padding: 0 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item:hover {
    background-color: var(--bg-body);
    color: var(--text-main);
}

.menu-item.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.menu-item .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* CONTENT AREA */
.content-area {
    flex: 1;
    padding: 0 1.5rem 2rem 0;
}

.tab-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-main);
}

.content-header p {
    margin: 0;
    color: var(--text-muted);
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* FORMS */
.form-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #f9fafb;
    box-sizing: border-box;
    /* IMPORTANT */
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* BUTTONS */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--bg-body);
    border-color: var(--text-muted);
}

/* UPLOAD ZONE */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* MEDIA GRID */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* PRAYER TABLE */
.table-responsive {
    overflow-x: auto;
}

.prayer-table {
    width: 100%;
    border-collapse: collapse;
}

.prayer-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--bg-body);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.prayer-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-suffix .suffix {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.small-input {
    width: 80px !important;
    text-align: center;
}

/* ACTION BAR */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .dashboard-layout {
        flex-direction: column;
        padding-top: 0;
        /* Nav handled separately */
    }

    .sidebar-menu {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        margin: 0;
        width: 80%;
        max-width: 300px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-radius: 0;
    }

    .sidebar-menu.open {
        transform: translateX(0);
    }

    .sidebar-header-mobile {
        display: flex;
    }

    /* Overlay when sidebar open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content-area {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .action-bar {
        padding: 1rem;
        flex-direction: column-reverse;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .nav-user span {
        display: none;
    }

    /* Hide name on mobile */
    .nav-user {
        gap: 0.5rem;
    }
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Status Messages */
.status-message {
    font-weight: 500;
}

.status-success {
    color: var(--primary-dark);
}

.status-error {
    color: #ef4444;
}

.jam-masjid-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-body);
    min-height: 100vh;
    box-sizing: border-box;
}

.jam-masjid-wrapper * {
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   ALL PAGES (Login & Dashboard)
--------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5 {
    color: var(--text-main);
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ---------------------------------------------------------
   LOGIN PAGE
--------------------------------------------------------- */
.jam-masjid-login-page {
    display: flex;
    justify_content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: #ffffff;
    /* Clean white background for login page too, or very subtle pattern */
}

.login-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    /* Subtle border instead of heavy shadow */
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* WP Login Form Styling Override */
#masjid-login-form p {
    margin-bottom: 1.25rem;
    text-align: left;
}

#masjid-login-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

#masjid-login-form input[type="text"],
#masjid-login-form input[type="password"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* Slightly smaller radius for inputs */
    font-size: 1rem;
    background-color: #f9fafb;
    /* Very light gray input bg */
    transition: all 0.2s ease;
}

#masjid-login-form input[type="text"]:focus,
#masjid-login-form input[type="password"]:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    /* Soft green glow */
}

#masjid-login-form .login-submit {
    margin-top: 2rem;
}

#masjid-login-form input[type="submit"] {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
    /* Green shadow for button */
}

#masjid-login-form input[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

#masjid-login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* ---------------------------------------------------------
   DASHBOARD LAYOUT
--------------------------------------------------------- */
.dashboard-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    display: flex;
    justify_content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-logout {
    color: #ef4444;
    /* Red for logout */
    background: #fef2f2;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-logout:hover {
    background-color: #fee2e2;
}

.dashboard-container {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 2fr 1.2fr;
    }
}

/* Cards (Clean White Look) */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    margin-bottom: 0;
    /* Handled by grid gap usually, but explicit reset */
}

.form-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #fff;
    color: var(--text-main);
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Prayer Table Refined */
.prayer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.prayer-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background-color: #f9fafb;
    /* Light header bg */
    border-bottom: 1px solid var(--border-color);
}

.prayer-table th:first-child {
    border-top-left-radius: 8px;
}

.prayer-table th:last-child {
    border-top-right-radius: 8px;
}

.prayer-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.prayer-table tr:last-child td {
    border-bottom: none;
}

.prayer-table input {
    width: 100%;
    max-width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

/* Status Messages & Chips */
.status-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

.status-success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #a7f3d0;
}

/* Action Bar */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 1rem 5%;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    z-index: 100;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    /* Pill shape for primary action */
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.5);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #ecfdf5;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    /* Controlled by JS via visibility/display */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .dashboard-nav {
        padding: 1rem;
    }

    .nav-brand span {
        display: none;
    }

    /* Show icon only on small screens if needed, or keep short */
    .dashboard-container {
        padding: 0 1rem;
        margin-top: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .action-bar {
        padding: 1rem;
        justify-content: space-between;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}