/* -------------------------------------------------
   App UI – Same premium design as back-office
   ------------------------------------------------- */

/* Global resets & font */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', Arial, sans-serif; background: #f5f7fa; color: #333; }

/* ========== AUTH PAGE (Login) ========== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0b2c4d 0%, #1a4a7a 100%);
}
.login-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 45px 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    margin: 10px;
}
.login-card .brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1a4a7a 0%, #0b2c4d 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: #fff;
}
.login-card h1 {
    color: #111;
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}
.login-card .subtitle {
    color: #777;
    font-size: 1rem;
    margin-bottom: 30px;
}
.login-card button {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    background: linear-gradient(135deg, #1a4a7a 0%, #0b2c4d 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    letter-spacing: 0.3px;
}
.login-card button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.login-card p {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}
.login-card p a {
    color: #1a4a7a;
    text-decoration: none;
    font-weight: 600;
}

/* Input with Icon */
.input-group {
    position: relative;
    margin: 14px 0;
}
.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.95rem;
}
.input-group input {
    width: 100%;
    padding: 14px 15px 14px 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    color: #333;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.input-group input:focus {
    border-color: #1a4a7a;
    box-shadow: 0 0 0 3px rgba(26,74,122,0.1);
    background: #fff;
}
.input-group input::placeholder { color: #bbb; }

/* Alerts */
.alert {
    padding: 12px 18px;
    margin: 12px 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========== ADMIN LAYOUT ========== */
.admin {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
    color: #333;
}

/* Content area */
.content {
    margin-left: 300px;
    padding: 30px;
    flex: 1;
    width: calc(100% - 300px);
}
.content h1 { font-size: 1.9rem; margin-bottom: 8px; color: #111; font-weight: 700; }
.content p { font-size: 1rem; color: #666; }

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }

/* ========== WELCOME BANNER ========== */
.welcome-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 60%, #084298 100%);
    border-radius: 16px;
    padding: 28px 30px;
    color: #fff;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.welcome-banner h2 { font-size: 1.5rem; margin: 0 0 4px; font-weight: 700; }
.welcome-banner p { margin: 0; opacity: 0.85; font-size: 0.95rem; }
.welcome-banner .date {
    background: rgba(255,255,255,0.18);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ========== STAT CARDS ========== */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    border-radius: 14px;
    padding: 22px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stat-card .stat-bg-icon {
    position: absolute;
    right: 15px;
    bottom: 10px;
    font-size: 4rem;
    opacity: 0.15;
}
.stat-card h3 { font-size: 2rem; font-weight: 700; margin: 0; }
.stat-card p { margin: 4px 0 0; font-size: 0.9rem; opacity: 0.9; font-weight: 500; }
.bg-primary { background: #0d6efd; }
.bg-success { background: #198754; }
.bg-warning { background: #ffc107; color: #333 !important; }
.bg-warning p { color: #555 !important; }
.bg-danger { background: #dc3545; }
.bg-info { background: #0dcaf0; color: #fff !important; }
.bg-info p { color: #eafcff !important; }

/* ========== CHARTS & CARDS ========== */
.dashboard-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}
.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.chart-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}
.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.chart-card h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== RECENT TABLE ========== */
.recent-table {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.recent-table h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.recent-table table { width: 100%; border-collapse: collapse; }
.recent-table th, .recent-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.recent-table th { color: #999; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; background: #fafafa; }
.recent-table td { color: #555; font-size: 0.9rem; }
.recent-table tr:last-child td { border-bottom: none; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge-blue { background: #e6f7ff; color: #1890ff; }
.badge-green { background: #f6ffed; color: #389e0d; }

/* ========== GENERAL CARDS ========== */
.dash-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    padding: 25px;
}

/* ========== BUTTONS ========== */
.btn-save {
    width: 100%;
    padding: 14px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-save:hover { background: #096dd9; }

.add-btn {
    background: #1890ff;
    color: white;
    padding: 11px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.add-btn:hover { background: #096dd9; }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .admin {
        flex-direction: column;
    }
    .content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .welcome-banner { padding: 20px; flex-direction: column; text-align: left; gap: 10px; align-items: flex-start; }
    .dash-card, .chart-card, .recent-table { padding: 15px; }
    .action-btns { flex-direction: column; width: 100%; }
    .action-btns a, .action-btns button { width: 100%; justify-content: center; }
}
@media (max-width: 576px) {
    .dash-stats { grid-template-columns: 1fr; }
    .login-card { padding: 30px 20px; }
    .login-card h1 { font-size: 1.7rem; }
    .filter-tabs { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
    .filter-tab { flex: 1 1 calc(50% - 10px); text-align: center; justify-content: center; }
}
