/* ── Global ──────────────────────────────────────────────── */
html, body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
}

#blazor-error-ui {
    background: #b32121;
    color: white;
    padding: 0.8rem 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    display: none;
}

/* ── App bar branding ────────────────────────────────────── */
.app-logo {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.app-title {
    line-height: 1.15;
}

.app-subtitle {
    line-height: 1.15;
    opacity: 0.85;
}

/* ── Login page ──────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
}

.login-logo {
    display: block;
    height: 72px;
    width: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
    color: #1565c0;
    border-radius: 6px;
    outline: none;
}

    .login-title:focus-visible {
        outline: 2px solid #1565c0;
        outline-offset: 4px;
    }

.login-subtitle {
    font-size: 0.9rem;
    text-align: center;
    margin: 0 0 1.5rem;
    color: #555;
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.field-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.field-input {
    padding: 0.75rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}

.field-input:focus {
    outline: none;
    border-color: #1565c0;
}

.field-error {
    font-size: 0.8rem;
    color: #c62828;
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    min-height: 48px;
}

.btn-login:hover { background: #0d47a1; }

.password-field-wrapper {
    position: relative;
}

.field-input--password {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #777;
    line-height: 0;
    display: flex;
    align-items: center;
}

.password-toggle:hover { color: #1565c0; }

/* ── Employee card — mobile-first ────────────────────────── */
.employee-card-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding: 1rem;
}

.employee-card {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    border-radius: 12px !important;
}

.employee-card-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.employee-date {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Time inputs */
.time-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.time-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.time-optional {
    font-weight: 400;
    color: #999;
}

.time-input {
    /* Native <input type="time"> — ανοίγει τον OS picker σε κινητά. (§8.1) */
    padding: 0.9rem 0.75rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
    color: #1a1a1a;
    min-height: 56px; /* τουλάχιστον 44px στόχος αφής */
    transition: border-color .15s;
}

.time-input:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}

.time-input--readonly {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

/* Action buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-buttons--row {
    flex-direction: row;
    justify-content: flex-end;
}

/* Confirmation banner */
.confirmation-banner {
    display: flex;
    align-items: center;
    background: #e8f5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.rounding-notice {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #fff8e1;
    border-radius: 6px;
}

/* Breakdown chips row */
.breakdown-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

/* ── Monthly grid (desktop) ──────────────────────────────── */
.monthly-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.month-nav {
    display: flex;
    align-items: center;
}

/* Sticky first column */
.cell-sticky-name {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
    font-weight: 600;
}

/* Hour cells */
.cell-absence { color: #c62828; font-weight: 600; }
.cell-negative { color: #c62828; font-weight: 700; }

/* Leave chips */
.leave-blue      { background: #e3f2fd; color: #0d47a1; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.leave-red       { background: #ffebee; color: #c62828; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.leave-lightblue { background: #e1f5fe; color: #01579b; padding: 2px 8px; border-radius: 12px; font-weight: 600; }

/* Desktop: show grid, hide cards */
.monthly-grid-desktop   { display: block; }
.monthly-cards-mobile   { display: none; }

/* ── Drill-down table ────────────────────────────────────── */
.day-drilldown {
    padding: 0.75rem 1rem;
    background: #fafafa;
    overflow-x: auto;
}

.drilldown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.drilldown-table th {
    background: #e8eaf6;
    padding: 4px 8px;
    text-align: center;
    font-weight: 600;
}

.drilldown-table td {
    padding: 3px 8px;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
}

.drilldown-table td:first-child { text-align: left; font-weight: 500; }

.status-cell   { font-size: 1rem; }
.status-text   { text-align: left; color: #666; font-style: italic; }
.drilldown-time { white-space: nowrap; color: #1565c0; font-weight: 500; }

.row-leave-blue      { background: #e3f2fd; }
.row-leave-red       { background: #ffebee; }
.row-leave-lightblue { background: #e1f5fe; }
.row-holiday         { background: #fff8e1; }
.row-off             { color: #999; }

/* ── Responsive: ≥ 600px ─────────────────────────────────── */
@media (min-width: 600px) {
    .time-fields {
        flex-direction: row;
        gap: 1rem;
    }

    .time-field-group {
        flex: 1;
    }

    .login-card {
        max-width: 420px;
    }
}

/* ── Responsive: < 600px (mobile) ───────────────────────── */
@media (max-width: 599px) {
    .monthly-grid-desktop { display: none; }
    .monthly-cards-mobile { display: block; }
}
