/* Staff input screens (login, calendar, done) — based on staff_input_v3.html prototype */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
    background: #f5f5f0;
    margin: 0;
    padding: 0;
    color: #2c2c2a;
    -webkit-font-smoothing: antialiased;
}
.app {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.04);
}
.header {
    background: #fff;
    padding: 16px 20px;
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.header h1 { margin: 0; font-size: 16px; font-weight: 500; }
.header .user-badge {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #5f5e5a;
}
.avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: #E6F1FB; color: #185FA5;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 500;
}
.content { padding: 20px; }

/* Login screen */
.login-card {
    background: #fff;
    padding: 32px 24px;
    border-radius: 12px;
    border: 0.5px solid rgba(0,0,0,0.1);
    margin-top: 40px;
}
.login-icon {
    width: 56px; height: 56px;
    background: #E6F1FB;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: #185FA5;
    font-size: 28px;
}
.login-title { text-align: center; margin: 0 0 4px; font-size: 17px; font-weight: 500; }
.login-sub { text-align: center; margin: 0 0 24px; font-size: 12px; color: #5f5e5a; }

label {
    display: block; font-size: 12px; color: #5f5e5a;
    margin-bottom: 6px; font-weight: 400;
}
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 0.5px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s;
    font-family: inherit;
}
input:focus { outline: none; border-color: #378ADD; box-shadow: 0 0 0 3px rgba(55,138,221,0.15); }
.form-group { margin-bottom: 16px; }
.hint { font-size: 11px; color: #888780; margin: 4px 0 0; }

button {
    border: none; cursor: pointer; font-family: inherit;
    transition: transform 0.1s, background 0.15s;
}
button:active { transform: scale(0.98); }
.btn-primary {
    width: 100%; padding: 14px;
    background: #185FA5; color: #fff;
    border-radius: 8px; font-size: 15px; font-weight: 500;
    margin-top: 8px;
}
.btn-primary:disabled { background: #B4B2A9; cursor: not-allowed; }

.error-msg {
    background: #FCEBEB; color: #791F1F;
    padding: 10px 12px; border-radius: 8px;
    font-size: 13px; margin-bottom: 12px;
    display: none;
}
.error-msg.show { display: block; }
.error-msg.server { display: block; }

.link-btn {
    background: none; color: #5f5e5a; font-size: 13px;
    padding: 4px 8px; text-decoration: underline; text-underline-offset: 2px;
}

/* Calendar screen */
.month-nav {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; padding: 12px 16px;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 8px; margin-bottom: 12px;
}
.month-nav-btn {
    width: 36px; height: 36px;
    background: #f5f5f0; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #2c2c2a;
}
.month-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.month-label { text-align: center; flex: 1; }
.month-label .y { font-size: 11px; color: #5f5e5a; }
.month-label .m { font-size: 16px; font-weight: 500; }
.month-label .lock {
    display: inline-block;
    background: #FAEEDA; color: #854F0B;
    font-size: 10px; padding: 2px 6px;
    border-radius: 10px; margin-left: 6px;
}

.legend {
    display: flex; gap: 10px; font-size: 11px; color: #5f5e5a;
    margin-bottom: 10px; flex-wrap: wrap; padding: 0 4px;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-box {
    width: 14px; height: 14px; border-radius: 3px;
    border: 0.5px solid rgba(0,0,0,0.15);
}
.legend-full { background: #FCEBEB; border-color: #E24B4A; }
.legend-am { background: linear-gradient(to bottom, #FAEEDA 50%, #fff 50%); border-color: #BA7517; }
.legend-pm { background: linear-gradient(to top, #FAEEDA 50%, #fff 50%); border-color: #BA7517; }
.legend-other { background: #EEEDFE; border-color: #534AB7; }

.weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 4px; font-size: 11px; color: #888780;
    text-align: center; margin-bottom: 6px;
}
.weekdays .sun { color: #E24B4A; }
.weekdays .sat { color: #378ADD; }

.calendar {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 4px; margin-bottom: 16px;
}
.day {
    aspect-ratio: 1;
    background: #fff;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #2c2c2a;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    position: relative;
}
.day.empty { background: transparent; border: none; cursor: default; }
.day.sun { color: #A32D2D; }
.day.sat { color: #185FA5; }
.day.today { box-shadow: inset 0 0 0 1.5px #378ADD; }
.day.full {
    background: #FCEBEB;
    border-color: #E24B4A;
    color: #791F1F;
    font-weight: 500;
}
.day.am {
    background: linear-gradient(to bottom, #FAEEDA 50%, #fff 50%);
    border-color: #BA7517;
    color: #633806;
    font-weight: 500;
}
.day.pm {
    background: linear-gradient(to top, #FAEEDA 50%, #fff 50%);
    border-color: #BA7517;
    color: #633806;
    font-weight: 500;
}
.day.other {
    background: #EEEDFE;
    border-color: #534AB7;
    color: #3C3489;
    font-weight: 500;
}
.day .comment-mark {
    position: absolute;
    top: 2px; right: 3px;
    font-size: 8px;
    color: inherit;
    opacity: 0.7;
}
.day.locked { cursor: not-allowed; opacity: 0.6; }

.selected-list {
    background: #f5f5f0; border-radius: 8px;
    padding: 12px 14px; margin-bottom: 12px;
}
.selected-list h3 {
    margin: 0 0 8px; font-size: 12px; color: #5f5e5a;
    font-weight: 400;
}
.item-block {
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}
.item-block:last-child { border-bottom: none; padding-bottom: 4px; }
.item-block:first-child { padding-top: 4px; }
.item-row-top {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px;
}
.item-day { font-weight: 500; }
.item-type-badge {
    font-size: 10px; padding: 2px 8px;
    border-radius: 10px; margin-left: 6px;
    font-weight: 500;
}
.badge-full { background: #FCEBEB; color: #791F1F; }
.badge-am, .badge-pm { background: #FAEEDA; color: #633806; }
.badge-other { background: #EEEDFE; color: #3C3489; }
.comment-input {
    width: 100%;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 12px;
    border: 0.5px solid rgba(0,0,0,0.15);
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}
.comment-input:focus {
    outline: none; border-color: #378ADD;
    box-shadow: 0 0 0 2px rgba(55,138,221,0.15);
}
.comment-input.required {
    border-color: #BA7517;
    background: #FFFBF3;
}
.empty-state { font-size: 12px; color: #888780; padding: 4px 0; }

.lock-banner {
    background: #FAEEDA; color: #854F0B;
    padding: 12px 14px; border-radius: 8px;
    font-size: 12px; margin-bottom: 12px;
}

/* Done screen */
.done-card {
    background: #fff; padding: 32px 24px;
    border-radius: 12px;
    border: 0.5px solid rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 40px;
}
.done-icon {
    width: 64px; height: 64px;
    background: #E1F5EE; color: #0F6E56;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}
.done-title { margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.done-sub { margin: 0 0 20px; font-size: 13px; color: #5f5e5a; }
.done-summary {
    background: #f5f5f0; border-radius: 8px;
    padding: 16px; text-align: left;
    margin-bottom: 16px;
}
.done-summary h4 {
    margin: 0 0 8px; font-size: 12px; color: #5f5e5a; font-weight: 400;
}
.done-item {
    padding: 6px 0;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    font-size: 13px;
}
.done-item:last-child { border-bottom: none; }
.done-item-top {
    display: flex; align-items: center; justify-content: space-between;
}
.done-item-comment {
    font-size: 11px; color: #5f5e5a;
    margin-top: 3px;
    border-left: 2px solid #D3D1C7;
    padding-left: 8px;
}

/* Logout button in header */
.logout-form { display: inline; margin: 0; }
.logout-btn {
    background: none; padding: 4px 8px; font-size: 12px;
    color: #5f5e5a; border-radius: 4px;
}

/* Toast */
.toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c2c2a; color: #fff;
    padding: 10px 18px; border-radius: 24px;
    font-size: 13px; opacity: 0;
    transition: all 0.3s;
    z-index: 100;
    max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #791F1F; }

/* Helper */
.hidden { display: none !important; }
