* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #faf6ee; /* cream */
    color: #1e2a38;
    margin: 0;
    padding: 0;
}

/* Navigation bar */
.navbar {
    background: #10243e; /* navy blue */
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 3px solid #c0392b; /* fire safety red accent */
}

.navbar a {
    color: #f5efe3; /* soft cream-white */
    text-decoration: none;
    margin-right: 18px;
    font-size: 14px;
    font-weight: 500;
}

.navbar a:hover {
    color: #e74c3c;
}

.navbar .admin-link {
    color: #e8b84b; /* warm gold-cream for admin section */
}

.navbar .logout-link {
    color: #e74c3c; /* fire safety red */
    margin-left: auto;
    margin-right: 0;
    font-weight: 600;
}

.navbar .divider {
    color: #4a5b70;
    margin-right: 18px;
}

/* Page content wrapper */
.page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    color: #10243e; /* navy */
    font-size: 22px;
    margin-bottom: 20px;
    border-left: 5px solid #c0392b;
    padding-left: 12px;
}

h3 {
    color: #10243e;
    font-size: 17px;
}

/* Cards / forms */
.card {
    background: white;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(16,36,62,0.1);
    margin-bottom: 24px;
    border-top: 4px solid #10243e;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #10243e;
    margin-bottom: 4px;
    margin-top: 14px;
}

input[type=text], 
input[type=email], 
input[type=number], 
input[type=password], 
input[type=tel],
input[type=date],
select, 
textarea {
    width: 100%;
    max-width: 400px;
    padding: 9px 12px;
    border: 1px solid #d8cdb8; /* cream-toned border */
    border-radius: 6px;
    font-size: 14px;
    background: #fffdf9;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #10243e;
}

button, input[type=submit] {
    background: #c0392b; /* fire safety red as primary action */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 18px;
    transition: background 0.15s ease, transform 0.1s ease;
}

button:hover, input[type=submit]:hover {
    background: #a5281c;
}

/* Tables & Wrappers */
.table-card, .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(16,36,62,0.1);
    background: white;
    margin-bottom: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
}

th {
    background: #10243e; /* navy header */
    color: #f5efe3;
    text-align: left;
    padding: 12px 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

td {
    padding: 12px 14px;
    border-top: 1px solid #f0ece0;
    font-size: 14px;
    vertical-align: middle;
}

tr:hover td {
    background: #faf6ee;
}

.edit { color: #10243e; text-decoration: none; font-weight: 600; }
.delete { color: #c0392b; text-decoration: none; font-weight: 600; }
.approve, .verify { color: #1e7d4f; text-decoration: none; font-weight: 600; }
.reject { color: #c0392b; text-decoration: none; font-weight: 600; }

.message-success {
    background: #e3f3ea;
    color: #1e7d4f;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid #1e7d4f;
}

.message-error {
    background: #fbe4e1;
    color: #a5281c;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid #c0392b;
}

/* Hero landing page */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1930 0%, #10243e 50%, #1a3358 100%);
    display: flex;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(192,57,43,0.25) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-title .accent {
    color: #e74c3c;
    display: block;
}

.hero-subtitle {
    color: #b8c4d4;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-buttons a {
    text-decoration: none;
}

.hero-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    margin-right: 14px;
    margin-bottom: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.hero-btn:hover {
    transform: translateY(-2px);
}

.hero-btn-primary {
    background: #c0392b;
    color: white;
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-stats {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 30px;
    margin-left: auto;
    min-width: 260px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hero-stat:last-child {
    border-bottom: none;
}

.hero-stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(192,57,43,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.hero-stat-number {
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.hero-stat-label {
    color: #b8c4d4;
    font-size: 13px;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE RULES (Screens 768px and down)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Page & Layout Adjustments */
    .page {
        margin: 15px auto;
        padding: 0 12px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    /* 2. Mobile Navbar (Touch-scrollable horizontally) */
    .navbar {
        padding: 12px 14px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .navbar a {
        font-size: 13px;
        margin-right: 14px;
        flex-shrink: 0;
    }

    .navbar .logout-link {
        margin-left: 10px;
        flex-shrink: 0;
    }

    /* 3. Inputs & Touch Targets (16px font avoids iOS Safari zoom) */
    input[type=text], 
    input[type=email], 
    input[type=number], 
    input[type=password], 
    input[type=tel],
    input[type=date],
    select, 
    textarea {
        max-width: 100% !important;
        font-size: 16px !important; 
        min-height: 46px;
    }

    button, input[type=submit] {
        width: 100%;
        min-height: 46px;
        font-size: 15px;
    }

    /* 4. Smooth Table Scrolling on Narrow Screens */
    table {
        min-width: 650px; /* Maintains columns without wrapping or button cutoff */
    }

    /* 5. Hero Page Stacking on Phones */
    .hero {
        flex-direction: column;
        padding: 40px 20px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-stats {
        margin-left: 0;
        width: 100%;
        min-width: auto;
    }
}