/* Shared styles for login, admin, and error pages */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #222;
}

/* ---- Auth pages (login, error) ---- */
.auth-page {
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}
.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo img {
    height: 32px;
    width: auto;
}
.auth-card h1 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #1e2a3a;
}
.auth-card form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}
.auth-card form input[type="text"],
.auth-card form input[type="email"],
.auth-card form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    outline: none;
}
.auth-card form input:focus {
    border-color: #1e2a3a;
}
.auth-card form button {
    width: 100%;
    padding: 12px;
    background: #1e2a3a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
}
.auth-card form button:hover {
    background: #2a3d54;
}
.login-landing .auth-card {
    max-width: 440px;
}
.login-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    text-align: center;
    margin-bottom: 12px;
}
.login-intro:last-of-type {
    margin-bottom: 24px;
}
.login-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}
.login-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.login-consent label {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 0;
}
.login-consent label a {
    color: #1e2a3a;
}
.auth-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}
.auth-success {
    background: #f0fdf4;
    color: #166534;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #bbf7d0;
}
.auth-message {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}
.auth-link {
    display: inline-block;
    color: #1e2a3a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    width: 100%;
}
.auth-link:hover {
    text-decoration: underline;
}
.auth-link-text {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin-top: 16px;
}
.auth-link-text a {
    color: #1e2a3a;
    font-weight: 500;
    text-decoration: none;
}
.auth-link-text a:hover {
    text-decoration: underline;
}

/* ---- Admin layout ---- */
.admin-header {
    background: #1e2a3a;
    padding: 12px 24px;
    color: #fff;
}
.admin-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-logo {
    height: 24px;
    width: auto;
}
.admin-header nav {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}
.admin-header nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}
.admin-header nav a:hover {
    color: #fff;
}
.admin-user {
    color: rgba(255,255,255,0.6);
}
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}
.admin-container h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.admin-section {
    margin-bottom: 32px;
}
.admin-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* ---- Admin form ---- */
.admin-form {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    max-width: 480px;
}
.form-row {
    margin-bottom: 12px;
}
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-row input:focus {
    border-color: #1e2a3a;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
}
.form-check input[type="checkbox"] {
    width: auto;
}
.form-check label {
    margin-bottom: 0;
}
.admin-form button {
    padding: 8px 20px;
    background: #1e2a3a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
}
.admin-form button:hover {
    background: #2a3d54;
}

/* ---- Tables ---- */
.table-wrap {
    overflow-x: auto;
}
.admin-section table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}
.admin-section table th {
    text-align: left;
    font-weight: 600;
    color: #666;
    padding: 10px 14px;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}
.admin-section table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.admin-section table tr:last-child td {
    border-bottom: none;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-active {
    background: #dcfce7;
    color: #166534;
}
.badge-disabled {
    background: #fee2e2;
    color: #991b1b;
}
.actions {
    white-space: nowrap;
}
.btn-small {
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.btn-small:hover {
    background: #f0f0f0;
}
.btn-danger {
    color: #c0392b;
    border-color: #e6b0aa;
}
.btn-danger:hover {
    background: #fdf2f2;
}
