/* Zakat Recording System - Mobile First (tema zakat) */

:root {
    --primary: #00a86b;
    --primary-dark: #008f5a;
    --primary-light: #e8f5ef;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --text: #1a1a1a;
    --text-muted: #6c757d;
    --border: #e0e0e0;
    --bg: #f5f5f5;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
}

/* -----------------------------------------------------------------------------
   App layout (header & main)
----------------------------------------------------------------------------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--primary);
    border-bottom: 1px solid var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-back {
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    line-height: 1;
    padding: 4px;
}

.btn-back:hover {
    color: rgba(255, 255, 255, 0.9);
}

.app-header h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.app-header .btn-sm {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.app-header .btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
}

.app-main {
    padding: 16px;
    min-height: calc(100vh - 56px);
}

/* -----------------------------------------------------------------------------
   Auth / Login - Mobile-first
----------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #0d4f2b 0%, #1a7a47 100%);
}

/* Login - blank screen lalu fade in + zoom in */
.auth-page-animate {
    opacity: 0;
    animation: authPageFadeIn 0.6s ease-out forwards;
}

.auth-card-animate {
    opacity: 0;
    transform: scale(0.85);
    animation: authCardZoomIn 0.7s ease-out 0.15s forwards;
}

@keyframes authPageFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes authCardZoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-card {
    width: 100%;
    max-width: 360px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    padding: 2rem 1.5rem;
    text-align: center;
    background: #f8faf8;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--primary);
}

.auth-header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-form {
    padding: 1.5rem;
}

.auth-error {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--danger-light);
    color: #721c24;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

.form-group input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding: 1rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-height: 36px;
    background: var(--bg);
    color: var(--text);
}

.btn-sm:hover {
    background: var(--border);
}

/* -----------------------------------------------------------------------------
   User Management - Card layout
----------------------------------------------------------------------------- */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-inactive {
    opacity: 0.7;
}

.card-body {
    padding: 1rem 1.25rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111;
}

.card-meta {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.card-badges {
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-muted {
    background: #f3f4f6;
    color: #6b7280;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.form-inline {
    display: inline;
}

.form-inline button {
    margin: 0;
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-state a {
    color: var(--primary);
    font-weight: 500;
}

.dashboard-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.back-link {
    margin-top: 1.5rem;
}

.back-link a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* -----------------------------------------------------------------------------
   App Footer
----------------------------------------------------------------------------- */
.app-footer {
    padding: 1rem 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.app-footer .copyright {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   About Page
----------------------------------------------------------------------------- */
.about-page {
    padding-bottom: 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-logo {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.about-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.about-tagline {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.about-card {
    margin-bottom: 1.5rem;
}

.about-section-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--primary);
}

.about-description {
    margin: 0 0 1rem;
    line-height: 1.6;
}

.about-description:last-of-type {
    margin-bottom: 0;
}

.about-features {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.8;
}

.copyright-inline {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* -----------------------------------------------------------------------------
   Splash Screen
----------------------------------------------------------------------------- */
.splash-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d4f2b 0%, #1a7a47 50%, #00a86b 100%);
}

.splash-content {
    text-align: center;
    padding: 2rem;
    animation: splashFadeIn 0.8s ease-out;
}

.splash-text-wrap {
    color: var(--white);
}

.splash-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.splash-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.splash-subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.splash-image {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius);
}

@keyframes splashFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* User form */
.user-form .form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-group select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-height: 48px;
    background: #fff;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-check {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Event form */
.event-form .form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-section {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.form-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.form-section h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #374151;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 480px) {
    .form-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .form-row .form-group {
        flex: 1;
        min-width: 120px;
    }
}

.form-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
}

.placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.placeholder-list code {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
}

.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-height: 120px;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* -----------------------------------------------------------------------------
   Transaction Input Form
----------------------------------------------------------------------------- */
.transaction-form-page .page-header {
    flex-direction: column;
    align-items: stretch;
}

.event-select-form {
    margin-top: 0.5rem;
}

.event-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.form-card {
    margin-bottom: 1rem;
}

.form-section-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: var(--primary);
}

.form-section-title .checkbox-label {
    font-weight: 600;
}

.payer-detail-fields {
    margin-top: 1rem;
}

.autocomplete-list {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--primary-light);
}

.autocomplete-empty {
    padding: 0.75rem 1rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.payer-search-group {
    position: relative;
}

.person-row {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-label input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.optional-fields {
    margin-top: 1rem;
}

.maal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 360px) {
    .maal-detail-grid {
        grid-template-columns: 1fr;
    }
}

.maal-total-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.maal-total-row input[readonly] {
    background: #f3f4f6;
}

.btn-lg {
    min-height: 52px;
    font-size: 1.05rem;
}

/* -----------------------------------------------------------------------------
   Transaction Confirm Page
----------------------------------------------------------------------------- */
.confirm-page {
    padding-bottom: 2rem;
}

.confirm-hint {
    color: #6b7280;
    margin: 0 0 1.5rem;
}

.confirm-card {
    margin-bottom: 1rem;
}

.confirm-section-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--primary);
}

.confirm-dl {
    margin: 0;
}

.confirm-dl dt {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.confirm-dl dt:first-child {
    margin-top: 0;
}

.confirm-dl dd {
    margin: 0.15rem 0 0;
    font-weight: 500;
}

.confirm-totals dd {
    font-size: 1.1rem;
}

.confirm-people-list {
    margin: 0;
    padding-left: 1.25rem;
}

.confirm-people-list li {
    margin-bottom: 0.5rem;
}

.confirm-form {
    margin-top: 1.5rem;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-whatsapp {
    background: #25d366;
}

.btn-whatsapp:hover {
    background: #20bd5a;
}

.btn-whatsapp.btn-wa-icon {
    padding: 0.5rem;
    color: #fff;
}

.btn-whatsapp.btn-wa-icon svg {
    display: block;
}

/* -----------------------------------------------------------------------------
   Dashboard
----------------------------------------------------------------------------- */
.dashboard-page {
    padding-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-header h1 {
    margin: 0;
}

.dashboard-welcome {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-subtitle {
    color: var(--text-muted);
    margin: 0 0 1rem;
}

/* Filter tabs (Hari Ini / Pilih Tanggal) */
.dashboard-filters.card {
    margin-bottom: 20px;
    padding: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.filter-tab:hover {
    color: var(--text);
}

.filter-tab.active {
    background: var(--primary);
    color: var(--white);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.filter-form input[type="date"] {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dashboard-date-range-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dashboard-date-range {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-date-range label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-date-range input {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 36px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
}

.stat-card:nth-child(1) .stat-value {
    font-size: 0.9rem;
}

/* Stat cards - warna warni */
.stat-card-rice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.stat-card-cash {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.stat-card-fidyah {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #6366f1;
}

.stat-card-infaq {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #ec4899;
}

.stat-card-maal {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.stat-card-rice .stat-label,
.stat-card-rice .stat-value,
.stat-card-cash .stat-label,
.stat-card-cash .stat-value,
.stat-card-fidyah .stat-label,
.stat-card-fidyah .stat-value,
.stat-card-infaq .stat-label,
.stat-card-infaq .stat-value,
.stat-card-maal .stat-label,
.stat-card-maal .stat-value {
    color: #1f2937;
}

.dashboard-meta {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dashboard-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-actions .btn {
    text-decoration: none;
}

.dashboard-actions-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.dashboard-actions-inline .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.action-sep {
    color: var(--text-muted);
    font-size: 0.8rem;
    user-select: none;
}

/* -----------------------------------------------------------------------------
   Dashboard Menu - 4 style options
----------------------------------------------------------------------------- */

/* Opsi 1: Grid dengan Ikon */
.dashboard-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 1.5rem;
}

.dashboard-menu-grid .menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    min-height: 80px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.dashboard-menu-grid .menu-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dashboard-menu-grid .menu-item-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.dashboard-menu-grid .menu-item-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.dashboard-menu-grid .menu-icon {
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.dashboard-menu-grid .menu-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Opsi 2: Chips / Pills */
.dashboard-menu-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.5rem;
}

.dashboard-menu-chips .menu-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.2s;
}

.dashboard-menu-chips .menu-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dashboard-menu-chips .menu-chip-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.dashboard-menu-chips .menu-chip-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Opsi 3: Menu Sheet */
.dashboard-menu-sheet {
    margin-top: 1.5rem;
}

.menu-sheet-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
}

.menu-sheet-trigger-icon {
    font-size: 1.25rem;
}

.menu-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.25s;
}

.menu-sheet-overlay[aria-hidden="false"] {
    display: block;
    opacity: 1;
}

.menu-sheet-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 301;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.menu-sheet-panel[aria-hidden="false"] {
    transform: translateY(0);
}

.menu-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.menu-sheet-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.menu-sheet-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.menu-sheet-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
}

.menu-sheet-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.menu-sheet-item:hover {
    background: var(--primary-light);
}

.menu-sheet-item-primary {
    font-weight: 600;
    color: var(--primary);
}

/* Opsi 4: FAB + Grid */
.dashboard-menu-fab {
    margin-top: 1.5rem;
}

.menu-fab-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    margin-bottom: 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.menu-fab-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.menu-fab-icon {
    font-size: 1.5rem;
}

.menu-fab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.dashboard-menu-fab .menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    min-height: 70px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.dashboard-menu-fab .menu-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dashboard-menu-fab .menu-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.dashboard-menu-fab .menu-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* -----------------------------------------------------------------------------
   Transactions List
----------------------------------------------------------------------------- */
.transactions-list-page.container {
    max-width: 720px;
}

.transactions-filters {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
}

.filter-search {
    margin-bottom: 0.75rem;
}

.filter-search label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.filter-search input[type="search"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.filter-date-range {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-date-range label {
    font-size: 0.85rem;
    color: #6b7280;
}

.filter-date-range input {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    min-height: 36px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Desktop: table */
.transactions-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.transactions-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.transactions-table th,
.transactions-table td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.transactions-table th {
    background: #f8faf8;
    font-weight: 600;
    color: #374151;
}

.transactions-table tbody tr:hover {
    background: #f9fafb;
}

.transactions-table .tx-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Mobile: cards - show on small screens, hide table */
.transactions-cards {
    display: none;
}

@media (max-width: 639px) {
    .transactions-table-wrap {
        display: none;
    }

    .transactions-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .tx-card {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .tx-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        gap: 0.75rem;
        flex-wrap: wrap;
        background: #f8faf8;
        border-bottom: 1px solid #e5e7eb;
    }

    .tx-card-meta {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .tx-card-date {
        font-weight: 600;
        font-size: 0.95rem;
        color: #374151;
        flex-shrink: 0;
    }


    .tx-card-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-left: auto;
    }

    .tx-card-body {
        margin: 0;
        padding: 1rem;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.35rem 1rem;
        font-size: 0.9rem;
    }

    .tx-card-body dt {
        color: #6b7280;
        font-weight: 500;
    }

    .tx-card-body dd {
        margin: 0;
        color: #111;
    }
}

@media (min-width: 640px) {
    .transactions-cards {
        display: none;
    }
}

.trx-code {
    font-size: 0.85rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.receipt-trx-code {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.receipt-trx-code code {
    font-size: 0.9rem;
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.text-muted {
    color: #9ca3af;
    font-size: 0.85rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.pagination-nav {
    margin-top: 1.5rem;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.pagination-current {
    font-size: 0.9rem;
    color: #6b7280;
}

/* -----------------------------------------------------------------------------
   Settings Page
----------------------------------------------------------------------------- */
.settings-page .form-section-title {
    margin-bottom: 0.5rem;
}

.menu-style-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 1rem 0 1.5rem;
}

.menu-style-option {
    display: block;
    cursor: pointer;
}

.menu-style-option input {
    position: absolute;
    opacity: 0;
}

.option-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.menu-style-option:hover .option-preview {
    border-color: var(--primary);
    background: var(--primary-light);
}

.menu-style-option.selected .option-preview,
.menu-style-option input:checked + .option-preview {
    border-color: var(--primary);
    background: var(--primary-light);
}

.option-preview .preview-icon {
    font-size: 1.5rem;
}

.option-preview .preview-label {
    font-weight: 600;
    flex: 1;
}

.option-preview .preview-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .option-preview {
        flex-wrap: wrap;
    }
    .option-preview .preview-desc {
        width: 100%;
        margin-top: 4px;
        padding-left: 2.25rem;
    }
}

.splash-fields {
    margin-top: 1rem;
}

.settings-form .radio-label {
    margin-right: 1rem;
}

/* -----------------------------------------------------------------------------
   Petugas Performance / Rekap Petugas
----------------------------------------------------------------------------- */
.petugas-performance-page.container {
    max-width: 900px;
}

.petugas-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.petugas-performance-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.petugas-performance-table th,
.petugas-performance-table td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.petugas-performance-table th {
    background: var(--primary-light);
    font-weight: 600;
    color: var(--text);
}

.petugas-performance-table tbody tr:hover {
    background: #f9fafb;
}

.petugas-performance-table .rekap-total-row {
    background: var(--primary-light);
    font-weight: 600;
}

.petugas-performance-table .rekap-total-row td {
    border-top: 2px solid var(--primary);
    padding-top: 0.75rem;
}

.petugas-performance-table .total-nominal-cell {
    color: var(--primary);
}

.petugas-cards {
    display: none;
}

@media (max-width: 639px) {
    .petugas-table-wrap {
        display: none;
    }

    .petugas-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .petugas-card {
        margin-bottom: 0;
    }

    .petugas-card-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }

    .petugas-card-num {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--primary);
        color: var(--white);
        border-radius: 50%;
        font-weight: 600;
        font-size: 0.875rem;
    }

    .petugas-card-dl {
        margin: 0;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.35rem 1rem;
        font-size: 0.9rem;
    }

    .petugas-card-dl dt {
        color: var(--text-muted);
        font-weight: 500;
    }

    .petugas-card-dl dd {
        margin: 0;
        text-align: right;
    }
}
