html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

#calendar {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

main {
    max-width: 1100px;
    margin: 0 auto;
}

.page-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 12px;
}

.page-header {
    margin-bottom: 16px;
}

    .page-header h1 {
        margin: 0;
        font-size: 28px;
    }

.muted {
    margin: 6px 0 0;
    opacity: .75;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.08);
}

.rb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.rb-modal {
    width: min(680px, 100%);
    background: white;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    padding: 16px;
}

.hidden {
    display: none !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

    .modal-header h2 {
        margin: 0;
        font-size: 18px;
    }

.label {
    display: block;
    font-weight: 600;
    margin: 10px 0 6px;
}

.input {
    width: 100%;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

    .input:focus {
        border-color: rgba(0,0,0,.35);
    }

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 680px) {
    .grid2 {
        grid-template-columns: 1fr;
    }
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.spacer {
    flex: 1;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}

.btn-primary {
    background: #111827;
    color: white;
}

.btn-ghost {
    background: rgba(0,0,0,.06);
}

.btn-danger {
    background: #b91c1c;
    color: white;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    display: block;
    background: white;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,.06);
}

    .admin-card:hover {
        border-color: rgba(0,0,0,.18);
    }

    .admin-card h2 {
        margin: 0 0 6px;
        font-size: 18px;
    }

    .admin-card p {
        margin: 0;
        opacity: .75;
    }

    .admin-card.disabled {
        opacity: .55;
        pointer-events: none;
    }

.admin-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
}

@media (max-width: 900px) {
    .admin-form {
        grid-template-columns: 1fr;
    }
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th, .table td {
        padding: 10px 10px;
        border-bottom: 1px solid rgba(0,0,0,.06);
        text-align: left;
    }

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.pill-on {
    background: rgba(16,185,129,.14);
}

.pill-off {
    background: rgba(107,114,128,.18);
}

.pill-warn {
    background: rgba(245,158,11,.18);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.audit-json-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 900px) {
    .audit-json-grid {
        grid-template-columns: 1fr;
    }
}

.codeblock {
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 12px;
    overflow: auto;
    max-height: 520px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.settings-form {
    display: grid;
    gap: 14px;
}