/* ---- Siteadmin layout ---- */
.sa-body {
    background: var(--color-stone-100);
    min-height: 100vh;
}

.sa-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-stone-200);
}

.sa-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.sa-main {
    padding: 2rem 0 4rem;
}

.sa-page-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ---- Cards ---- */
.sa-card {
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sa-card-title {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.sa-card-header .sa-card-title {
    margin-bottom: 0;
}

/* ---- Toggle ---- */
.sa-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sa-toggle {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.sa-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sa-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--color-stone-200);
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.sa-toggle-slider::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    background: var(--color-white);
    border-radius: 50%;
    transition: transform 0.2s;
}

.sa-toggle input:checked + .sa-toggle-slider {
    background: var(--color-green-600);
}

.sa-toggle input:checked + .sa-toggle-slider::before {
    transform: translateX(1.25rem);
}

/* ---- Table ---- */
.sa-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

.sa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.sa-table th,
.sa-table td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-stone-200);
}

.sa-table th {
    font-weight: 600;
    color: var(--color-stone-600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sa-table tbody tr:hover {
    background: var(--color-stone-100);
}

.sa-actions {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.sa-badge {
    display: inline-block;
    background: var(--color-stone-100);
    border: 1px solid var(--color-stone-200);
    border-radius: 0.25rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.8rem;
    margin: 0.1rem;
}

.sa-empty {
    color: var(--color-stone-600);
    padding: 1rem 0;
}

/* ---- Forms ---- */
.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-stone-200);
    border-radius: 0.375rem;
    font: inherit;
    font-size: 0.95rem;
    background: var(--color-white);
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-green-600);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.sa-field {
    margin-bottom: 1rem;
}

.sa-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.sa-field-help {
    color: var(--color-stone-600);
    font-size: 0.8rem;
    margin-top: 0.15rem;
    display: block;
}

.sa-field-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.2rem;
    display: block;
}

.sa-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ---- Danger button ---- */
.sa-btn-danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.sa-btn-danger:hover {
    background: #fef2f2;
}

/* ---- Login ---- */
.sa-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.sa-login-card {
    background: var(--color-white);
    border: 1px solid var(--color-stone-200);
    border-radius: 0.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 24rem;
}

.sa-login-logo {
    display: block;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-green-700);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.sa-login-title {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-stone-600);
}

.sa-login-btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    border: none;
}

.sa-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.sa-message {
    padding: 0.625rem 0.875rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.sa-message--success {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.sa-message--error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}
