/* GPAJ Mobile App - Styles */

:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
    --bg-color: #ffffff;
    --text-color: #212529;
    .attendance-geo-row {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr);
        gap: 10px;
        margin-top: 4px;
    }

    .attendance-geo-col {
        min-width: 0;
    }

    .place-label {
        font-size: 0.58rem;
        font-weight: 700;
        color: var(--primary);
        margin-top: 0;
        margin-bottom: 1px;
        line-height: 1;
    }

    .place-compact {
        font-size: 0.68rem;
        line-height: 1.1;
        margin-top: 1px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .attendance-geo-col .item-time.place-compact {
        margin-top: 1px;
    }
    --border-color: #dee2e6;
    --surface: #ffffff;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f8f9fa;
    --border-color: #404040;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 12px 70px;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Login */
.login-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding: 20px;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--secondary);
    font-size: 0.9rem;
}

.login-form {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.remember-me-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    margin-top: -8px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    margin: 0;
}

.remember-me-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.remember-me-text {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 400;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:active {
    background-color: #0b5ed7;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Pages */
.page-container {
    padding: 15px;
    width: min(100%, 760px);
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.card-item {
    background: linear-gradient(135deg, var(--primary) 0%, #0b5ed7 100%);
    color: white;
    padding: 14px 12px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    min-height: auto;
}

.card-item:active {
    transform: scale(0.95);
}

.card-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 6px;
}

.card-item h3 {
    font-size: 0.85rem;
    margin-bottom: 3px;
    font-weight: 600;
}

.card-item p {
    font-size: 0.7rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.2;
}

.info-section {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
}

.info-section h3 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item span:first-child {
    color: var(--secondary);
}

/* Profile */
.profile-card {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.profile-card h2 {
    margin-bottom: 5px;
}

.designation {
    color: var(--secondary);
    margin-bottom: 20px;
}

.profile-info {
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.profile-section {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
}

.profile-section h3 {
    font-size: 1rem;
    padding: 15px;
    margin: 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--secondary);
    font-weight: 500;
}

.info-row .value {
    font-weight: 600;
    text-align: right;
}

/* Attendance */
.attendance-section, .attendance-stats, .attendance-calendar, .attendance-history {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.attendance-section h2, .attendance-stats h2, .attendance-calendar h2, .attendance-history h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.attendance-form {
    background: var(--bg-color);
}

.attendance-photo-preview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

.attendance-summary-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.attendance-month-meta {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    display: grid;
    gap: 6px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.calendar-board {
    min-width: 320px;
}

.calendar-header {
    margin-bottom: 6px;
}

.calendar-cell {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 4px;
}

.header-cell {
    min-height: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--secondary);
    border-style: dashed;
    position: sticky;
    top: 0;
    z-index: 1;
}

.empty-cell {
    border-style: dashed;
    opacity: 0.45;
}

.day-cell .day-number {
    font-weight: 700;
    font-size: 0.85rem;
}

.day-cell .day-status {
    font-size: 0.68rem;
    margin-top: 2px;
    line-height: 1;
}

.day-photo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dark);
    margin-top: 3px;
}

.status-present {
    border-color: rgba(25, 135, 84, 0.45);
    background: rgba(25, 135, 84, 0.1);
}

.status-absent {
    border-color: rgba(220, 53, 69, 0.45);
    background: rgba(220, 53, 69, 0.1);
}

.status-late {
    border-color: rgba(255, 193, 7, 0.55);
    background: rgba(255, 193, 7, 0.15);
}

.status-leave {
    border-color: rgba(13, 202, 240, 0.45);
    background: rgba(13, 202, 240, 0.1);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 12px;
    font-size: 0.78rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.present {
    background: rgba(25, 135, 84, 0.8);
}

.legend-dot.absent {
    background: rgba(220, 53, 69, 0.8);
}

.legend-dot.late {
    background: rgba(255, 193, 7, 0.95);
}

.legend-dot.leave {
    background: rgba(13, 202, 240, 0.9);
}

.legend-photo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: var(--dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-card i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 5px;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* History */
.history-list {
    background: var(--bg-color);
}

.history-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 10px 10px 10px;
    margin-bottom: 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.history-card:last-child {
    margin-bottom: 6px;
}

.history-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.history-card-main {
    flex: 1 1 56%;
    min-width: 220px;
}

.history-card-meta {
    flex: 1 1 38%;
    min-width: 160px;
}

.history-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.history-card-date {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
}

.history-card-subtitle {
    color: var(--secondary);
    font-size: 0.72rem;
}

.history-record-grid {
    display: grid;
    gap: 8px;
}

.history-record-block {
    display: grid;
    gap: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 10px;
}

.history-record-label {
    font-size: 0.72rem;
    color: var(--secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.history-record-time {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.history-record-text {
    font-size: 0.82rem;
    color: var(--secondary);
    line-height: 1.4;
    max-height: 3.2em;
    overflow: hidden;
}

.history-meta-text,
.history-meta-muted {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 8px;
}

.history-meta-muted {
    color: var(--secondary);
}

.history-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.72rem;
    line-height: 1;
    border: 1px solid transparent;
}

.history-card-compact .history-card-date {
    font-size: 0.88rem;
}

.history-card-compact .history-card-subtitle {
    font-size: 0.68rem;
}

.history-card-compact .history-card-meta {
    min-width: 180px;
}

.history-card-compact .history-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
}

.history-card-compact .history-record-time {
    font-size: 0.86rem;
}

.history-card-compact .history-record-text {
    font-size: 0.78rem;
}

.history-remarks.muted {
    color: var(--secondary);
}

.history-card-screenshot {
    background: #ffffff;
    border: 1px solid rgba(13, 110, 253, 0.16);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.08);
}

.history-card-header-screenshot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

.history-card-date-screenshot {
    font-weight: 700;
    font-size: 0.86rem;
}

.history-card-subtitle-screenshot {
    color: var(--secondary);
    font-size: 0.72rem;
    margin-top: 2px;
}

.history-badge-screenshot {
    font-size: 0.7rem;
    padding: 4px 10px;
}

.history-card-pill-row-screenshot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.history-card-content-screenshot, .history-card-content-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.history-card-block-screenshot {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px;
    min-height: 112px;
}

.history-card-block-title {
    font-weight: 700;
    font-size: 0.86rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.history-card-block-text {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
    min-height: 3.5rem;
    overflow: hidden;
}

.place-pill {
    background: rgba(13, 110, 253, 0.08);
    color: var(--primary);
    border-color: rgba(13, 110, 253, 0.12);
}

.history-card-block-large {
    min-height: 130px;
}

.history-card-remark {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--secondary);
    line-height: 1.2;
    padding-top: 8px;
    border-top: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.history-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.76rem;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.time-pill {
    background: rgba(13, 110, 253, 0.08);
    color: var(--primary);
    border-color: rgba(13, 110, 253, 0.12);
}

.geo-pill {
    background: rgba(25, 135, 84, 0.08);
    color: var(--success);
    border-color: rgba(25, 135, 84, 0.12);
}

.photo-pill {
    background: rgba(33, 37, 41, 0.08);
    color: var(--dark);
    border-color: rgba(33, 37, 41, 0.12);
}

.muted-pill {
    background: rgba(108, 117, 125, 0.08);
    color: var(--secondary);
    border-color: rgba(108, 117, 125, 0.12);
}

.badge-success {
    background: rgba(25, 135, 84, 0.12);
    color: var(--success);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.14);
    color: var(--warning);
}

.badge-info {
    background: rgba(13, 110, 253, 0.12);
    color: var(--primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    border-radius: 999px;
}

/* Salary */
.salary-list {
    background: var(--bg-color);
}

.salary-list-note {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--light);
    color: var(--secondary);
    font-size: 0.78rem;
}

.salary-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.salary-card:active {
    background-color: var(--light);
}

.salary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.salary-header .month {
    font-weight: 600;
}

.salary-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--secondary);
    font-size: 0.76rem;
}

.salary-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.salary-amount .label {
    color: var(--secondary);
    font-size: 0.9rem;
}

.salary-amount .amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--success);
}

.salary-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--secondary);
}

.salary-slip-page {
    padding-bottom: 18px;
}

.salary-slip-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    padding: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.slip-company h2 {
    margin: 0;
    font-size: 1.05rem;
}

.slip-company p {
    margin: 4px 0 0;
    color: var(--secondary);
    font-size: 0.85rem;
}

.slip-meta-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.slip-meta-grid div {
    background: var(--light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.slip-meta-grid span {
    color: var(--secondary);
    font-size: 0.72rem;
}

.slip-meta-grid strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

.slip-table {
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.slip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

.slip-row:last-child {
    border-bottom: none;
}

.slip-row.total {
    background: rgba(25, 135, 84, 0.08);
    font-weight: 700;
}

.slip-footer-note {
    margin-top: 10px;
    color: var(--secondary);
    font-size: 0.76rem;
}

.slip-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.slip-actions .btn {
    font-size: 0.82rem;
    padding: 9px 8px;
}

/* Payment Requests */
.request-section {
    background: var(--light);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.request-section h2 {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.payment-request-page {
    padding: 8px;
}

.payment-request-page .page-header {
    margin-bottom: 8px;
}

.payment-request-page .page-header h1 {
    font-size: 1.28rem;
}

.request-form {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 7px;
    border: 1px solid var(--border-color);
}

.request-form .form-group {
    margin-bottom: 6px;
}

.request-form label {
    margin-bottom: 4px;
    font-size: 0.78rem;
}

.request-form .form-control {
    padding: 6px 8px;
    font-size: 0.84rem;
}

.request-form textarea.form-control {
    min-height: 50px;
}

.request-form .btn {
    padding: 7px 10px;
    font-size: 0.86rem;
}

.request-list {
    display: grid;
    gap: 6px;
}

.request-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px;
}

.request-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}

.request-meta {
    font-size: 0.76rem;
    color: var(--text-color);
    margin-top: 2px;
    line-height: 1.2;
    word-break: break-word;
}

.request-date {
    margin-top: 4px;
    font-size: 0.66rem;
    color: var(--secondary);
}

.request-actions {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.request-section.mt-4 {
    margin-top: 8px !important;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.badge-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
}

.badge-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: var(--info);
}

/* Payment Card */
.payment-card {
    background: var(--light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s;
}

.payment-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

/* Procurement */
.procurement-subtitle {
    margin-top: 4px;
    color: var(--secondary);
    font-size: 0.82rem;
}

.procurement-form {
    background: var(--light);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.procurement-form .form-group {
    margin-bottom: 10px;
}

.procurement-form .form-control {
    padding: 9px 10px;
    font-size: 0.92rem;
}

.procurement-form .form-check {
    display: flex;
    align-items: center;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-row > .form-group:only-child,
.form-row > #gst-percent-group {
    grid-column: span 1;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    margin: 0;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.hidden {
    display: none !important;
}

.procurement-list {
    background: var(--bg-color);
}

.procurement-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 7px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.item-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

@media (max-width: 576px) {
    .attendance-calendar {
        padding: 12px;
    }

    .calendar-board {
        min-width: 350px;
    }

    .calendar-cell {
        min-height: 48px;
        padding: 3px;
    }

    .header-cell {
        font-size: 0.68rem;
        padding: 6px 2px;
    }

    .day-cell .day-number {
        font-size: 0.8rem;
    }

    .day-cell .day-status {
        font-size: 0.64rem;
    }

    .history-item {
        gap: 6px;
        padding-right: 34px;
    }

    .history-pill {
        padding: 2px 7px;
        font-size: 0.66rem;
    }

    .attendance-geo-row {
        gap: 8px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .attendance-thumb,
    .attendance-thumb-placeholder {
        width: 44px;
        height: 44px;
    }
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.item-header h4 {
    margin: 0;
    font-size: 0.98rem;
}

.item-details {
    background: var(--light);
    padding: 7px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.item-details div {
    padding: 3px 0;
}

.badge-neutral {
    background: rgba(108, 117, 125, 0.12);
    color: var(--secondary);
}


.item-line {
    margin-bottom: 5px;
}

.item-line:last-child {
    margin-bottom: 0;
}

.metrics-line {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.meta-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.kv {
    min-width: 0;
    background: var(--light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 5px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.kv span {
    color: var(--secondary);
    font-size: 0.61rem;
    line-height: 1;
}

.kv strong {
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.action-line .btn {
    padding: 5px 9px;
    font-size: 0.72rem;
    line-height: 1;
}

.btn-block-mobile {
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .procurement-form {
        padding: 10px;
    }

    .procurement-form label {
        font-size: 0.82rem;
    }

    .metrics-line,
    .meta-line {
        gap: 3px;
    }

    .kv {
        padding: 3px 4px;
        border-radius: 5px;
    }

    .kv span {
        font-size: 0.58rem;
    }

    .kv strong {
        font-size: 0.7rem;
    }

    .item-header h4 {
        font-size: 0.84rem;
    }

    .action-line .btn {
        padding: 4px 8px;
        font-size: 0.68rem;
    }

    .action-line .badge {
        font-size: 0.66rem;
        padding: 3px 7px;
    }

    .slip-meta-grid {
        gap: 6px;
    }

    .slip-meta-grid div {
        padding: 6px;
    }

    .slip-row {
        padding: 8px 9px;
        font-size: 0.82rem;
    }

    .slip-actions {
        grid-template-columns: 1fr;
    }
}

/* Settings */
.settings-section {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.settings-section h2 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    flex: 1;
    min-width: 0;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0;
    flex-shrink: 0;
}

.switch input {
    display: none;
}

.switch span {
    font-size: 0.95rem;
    display: block;
}

.switch input:checked + span::before {
    left: 22px;
    background-color: var(--success);
}

.switch input:checked + span::after {
    background-color: #e8f5e9;
    border-color: var(--success);
}

.switch span::before {
    content: '';
    position: absolute;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: all 0.3s ease;
    z-index: 2;
}

.switch span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    z-index: 1;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    height: 70px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.bottom-nav.hidden {
    display: none;
}

.nav-btn {
    flex: 1;
    border: none;
    background: none;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn i {
    font-size: 1.5rem;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.text-muted {
    color: var(--secondary) !important;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }

/* Responsive */
@media (max-width: 360px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
