/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 24px;
    color: #1a5276;
    margin-top: 10px;
}

.login-logo p {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2e86c1;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: #1a5276;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #2e86c1;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fdecea;
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
    border-left: 4px solid #1e8449;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
    background: #1a5276;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 6px;
    list-style: none;
}

.navbar-nav a {
    color: #cce4f6;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: #2e86c1;
    color: #fff;
}

.navbar-user {
    color: #cce4f6;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-user a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a5276;
    margin-bottom: 24px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a5276;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================
   STAT BOXES (Dashboard)
   ============================================ */
.stat-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-left: 5px solid #2e86c1;
}

.stat-box.green  { border-left-color: #1e8449; }
.stat-box.red    { border-left-color: #c0392b; }
.stat-box.orange { border-left-color: #d35400; }

.stat-box h3 {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-box .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1a5276;
}

.stat-box .stat-sub {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #f0f2f5;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f5;
    color: #444;
}

table tr:hover td {
    background: #fafbfc;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: #eafaf1; color: #1e8449; }
.badge-danger  { background: #fdecea; color: #c0392b; }
.badge-warning { background: #fef9e7; color: #d35400; }
.badge-info    { background: #eaf4fb; color: #2e86c1; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-success { background: #1e8449; color: #fff; }
.btn-danger  { background: #c0392b; color: #fff; }
.btn-warning { background: #d35400; color: #fff; }
.btn-info    { background: #2e86c1; color: #fff; }
.btn-dark    { background: #1a5276; color: #fff; }

/* ============================================
   FORMS (inside cards)
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.info-box {
    background: #eaf4fb;
    border-left: 4px solid #2e86c1;
    padding: 12px 16px;
    border-radius: 6px;
    color: #1a5276;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ============================================
   SECURITY GATE
   ============================================ */
.gate-card {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
}

.gate-result {
    margin-top: 24px;
    padding: 24px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
}

.gate-result.allowed {
    background: #eafaf1;
    color: #1e8449;
    border: 2px solid #1e8449;
}

.gate-result.denied {
    background: #fdecea;
    color: #c0392b;
    border: 2px solid #c0392b;
}

/* ============================================
   PARENT PORTAL
   ============================================ */
.child-card {
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.child-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.child-card h3 {
    font-size: 17px;
    color: #1a5276;
    margin-bottom: 8px;
}

.child-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .main-content { padding: 16px; }
    .navbar-nav { display: none; }
    .form-row { grid-template-columns: 1fr; }
}