﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f4f6f8;
}

/* ─── Sidebar ──────────────────────────────────────────── */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    background-color: #2699FB;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    min-height: 72px;
}

.sidebar-logo img {
    max-width: 160px;
    max-height: 48px;
    object-fit: contain;
}

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-link {
    display: block;
    padding: 10px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, color 0.15s;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    border-left-color: #fff;
}

.nav-section {
    padding: 14px 20px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* ─── Sidebar user / logout ────────────────────────────── */
.user-info { display: flex; flex-direction: column; gap: 6px; }

.user-email {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background-color 0.15s;
}

.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* ─── Main Content ─────────────────────────────────────── */
.main-content {
    margin-left: 240px;
    padding: 32px;
    min-height: 100vh;
}

/* ─── Auth Layout ──────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background-color: #2699FB;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 36px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.18);
}

.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { max-width: 160px; max-height: 48px; object-fit: contain; }
.auth-card h2 { text-align: center; margin-bottom: 20px; font-size: 20px; color: #222; }

/* ─── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; color: #555; }

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-control:focus {
    border-color: #2699FB;
    box-shadow: 0 0 0 3px rgba(38,153,251,0.15);
}

textarea.form-control { resize: vertical; }

.form-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.form-check-input { width: 15px; height: 15px; accent-color: #2699FB; }

/* ─── Buttons ──────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s;
    font-family: inherit;
}

.btn-primary { background-color: #2699FB; color: #fff; }
.btn-primary:hover { background-color: #1a87e8; color: #fff; }
.btn-secondary { background-color: #6c757d; color: #fff; }
.btn-secondary:hover { background-color: #5a6268; color: #fff; }
.btn-danger { background-color: #dc3545; color: #fff; }
.btn-danger:hover { background-color: #c82333; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 12px; }

/* ─── Cards ────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    padding: 24px;
    margin-bottom: 20px;
}

.card-link-tile { text-decoration: none; color: inherit; display: block; width: 220px; }
.card-link-tile .card { transition: box-shadow 0.15s; }
.card-link-tile .card:hover { box-shadow: 0 4px 16px rgba(38,153,251,0.2); }
.card-link-tile h3 { color: #2699FB; margin-bottom: 8px; }
.card-link-tile p { color: #666; font-size: 13px; }

/* ─── Typography ───────────────────────────────────────── */
.page-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.page-subtitle { color: #666; margin-bottom: 20px; }
.text-center { text-align: center; }
hr { border: none; border-top: 1px solid #eee; margin: 18px 0; }

/* ─── Branch List ──────────────────────────────────────── */
.branch-list { list-style: none; padding: 0; }

.branch-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.branch-item:last-child { border-bottom: none; }
.branch-name { flex: 1; font-family: 'Consolas', monospace; font-weight: 500; }
.branch-actions { display: flex; gap: 8px; }

/* ─── Changelog ────────────────────────────────────────── */
.changelog-content { line-height: 1.75; color: #333; }
.changelog-content h1, .changelog-content h2, .changelog-content h3 { margin: 20px 0 8px; color: #1a1a1a; }
.changelog-content p { margin-bottom: 10px; }
.changelog-content ul, .changelog-content ol { padding-left: 22px; margin-bottom: 10px; }
.changelog-content li { margin-bottom: 4px; }
.changelog-content code { background: #f4f4f4; padding: 2px 5px; border-radius: 3px; font-size: 0.88em; font-family: 'Consolas', monospace; }
.changelog-content pre { background: #f4f4f4; padding: 14px; border-radius: 4px; overflow-x: auto; margin-bottom: 12px; }

/* ─── Admin Table ──────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8f9fa; padding: 9px 13px; text-align: left; border-bottom: 2px solid #e0e0e0; font-weight: 600; color: #444; }
.data-table td { padding: 9px 13px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.data-table tr:hover td { background: #fafafa; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-admin { background: #2699FB; color: #fff; }
.badge-user { background: #e9ecef; color: #555; }

/* ─── Info / Status Boxes ──────────────────────────────── */
.info-box {
    background: #e8f4fd;
    border-left: 4px solid #2699FB;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 18px;
    color: #444;
    line-height: 1.6;
}

.success-banner {
    background: #d4edda;
    border: 1px solid #b8dfc4;
    border-radius: 4px;
    padding: 14px 18px;
    color: #155724;
}

/* ─── Validation ───────────────────────────────────────── */
.field-validation-error { color: #dc3545; font-size: 12px; display: block; margin-top: 3px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; color: #dc3545; font-size: 13px; }
