/* On Call — app stylesheet */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: sans-serif;
    line-height: 1.6;
    background: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 16px;
}

.container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    padding: 28px 32px;
    max-width: 860px;
    margin: 24px auto;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 60px auto;
}
.login-container h2 { margin-top: 12px; }
.login-links { margin-top: 14px; font-size: 0.88rem; }
.btn-full { width: 100%; }

/* Alerts / banners */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    font-weight: 500;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaf0;
}
.app-header img { display: block; }
.app-header-right { font-size: 0.85rem; color: #888; }
.app-header-right a { color: #007bff; text-decoration: none; }
.app-header-right a:hover { text-decoration: underline; }

/* On-call display */
.oncall-current {
    background: #f0f4ff;
    border: 1px solid #d0d9f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.oncall-current .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #666;
    margin-bottom: 4px;
}
.oncall-current .name {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a1a2e;
}
.oncall-current .phone {
    font-size: 1.35rem;
    font-weight: 400;
    color: #555;
    margin-left: 6px;
}
.oncall-none {
    color: #c00;
    font-weight: 700;
    font-size: 18px;
}

/* Change on-call */
.change-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
}
.change-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.change-row select {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
}
.change-row select:focus { outline: none; border-color: #007bff; box-shadow: 0 0 0 3px rgba(0,123,255,.15); }

/* Divider */
.section-divider {
    border: none;
    border-top: 1px solid #e8eaf0;
    margin: 28px 0;
}

/* People table */
.people-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #555;
}
.people-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.people-table th {
    text-align: left;
    padding: 9px 12px;
    background: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #555;
}
.people-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.people-table tr:last-child td { border-bottom: none; }
.people-table tr:hover td { background: #f7f8ff; }
.people-table tr.editing td { background: #fffbf0 !important; }

.people-table td input[type="text"],
.people-table td input[type="tel"] {
    width: 100%;
    padding: 5px 8px;
    font-size: 0.9rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-family: inherit;
}
.people-table td input:focus { outline: none; border-color: #007bff; }

.actions-col { white-space: nowrap; }

/* Add person form */
.add-person-row td {
    background: #f8fff8 !important;
}
.add-person-row td input {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.9rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-family: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 18px;
    font-size: 0.9rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    text-decoration: none;
}
.btn-primary  { background: #007bff; color: #fff; }
.btn-primary:hover  { background: #0069d9; }
.btn-success  { background: #28a745; color: #fff; }
.btn-success:hover  { background: #218838; }
.btn-danger   { background: #dc3545; color: #fff; }
.btn-danger:hover   { background: #c82333; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; }
.btn-sm { padding: 4px 10px; font-size: 0.82rem; }
.btn-link {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 4px 6px;
    text-decoration: underline;
}
.btn-link:hover { color: #0056b3; }
.btn-link-danger { color: #dc3545; }
.btn-link-danger:hover { color: #a71d2a; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
}
input:focus { outline: none; border-color: #007bff; box-shadow: 0 0 0 3px rgba(0,123,255,.15); }

a { color: #007bff; }
a:hover { text-decoration: underline; }

.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-muted { color: #888; font-size: 0.87rem; }

/* Add user / add site inline form row */
.add-user-form { margin-top: 16px; }
.add-user-form h4 { margin: 0 0 10px; font-size: 0.9rem; color: #555; }
.add-user-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.add-user-row input,
.add-user-row select {
    flex: 1;
    min-width: 120px;
    padding: 7px 10px;
    font-size: 0.88rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}
.add-user-row input:focus,
.add-user-row select:focus { outline: none; border-color: #007bff; }
