/* ============================================================
   Umvubu Admin Portal — Stylesheet
   The Sussex Biltong Co
   Colour palette:
     Brand orange : #E8971A
     Orange light : #FBB040
     Orange hover : #C97D10
     White        : #FFFFFF
     Off-white    : #F8F7F5
     Light grey   : #F0EFED
     Mid grey     : #9E9E9E
     Dark grey    : #333333
     Text         : #1A1A1A
============================================================ */

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: #F8F7F5;
    color: #1A1A1A;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #E8971A; text-decoration: none; }
a:hover { color: #C97D10; text-decoration: underline; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
    background: #FFFFFF;
    border-bottom: 3px solid #E8971A;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo-link { display: flex; align-items: center; }
.logo { height: 52px; width: auto; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.welcome-msg {
    font-size: 0.875rem;
    color: #555;
}

/* ── Main content ──────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 2.5rem 2rem;
}

/* ── Page container ────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Auth cards (login / reset forms) ─────────────────────── */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 3rem;
}

.auth-card {
    background: #FFFFFF;
    border: 1px solid #E5E3E0;
    border-radius: 12px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo img {
    height: 90px;
    width: auto;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1A1A1A;
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1.75rem;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    border: 1.5px solid #D5D3D0;
    border-radius: 7px;
    background: #FAFAFA;
    color: #1A1A1A;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: #E8971A;
    box-shadow: 0 0 0 3px rgba(232,151,26,0.15);
    background: #FFFFFF;
}

.form-control::placeholder { color: #AAAAAA; }

.form-hint {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.3rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 7px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: #E8971A;
    color: #FFFFFF;
    border-color: #E8971A;
    width: 100%;
}
.btn-primary:hover {
    background: #C97D10;
    border-color: #C97D10;
    color: #FFFFFF;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #E8971A;
    border-color: #E8971A;
}
.btn-outline:hover {
    background: #E8971A;
    color: #FFFFFF;
    text-decoration: none;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: #DC3545;
    color: #FFFFFF;
    border-color: #DC3545;
}
.btn-danger:hover { background: #B02A37; border-color: #B02A37; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 7px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
    border-color: #BBF7D0;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border-color: #BFDBFE;
}

/* ── Auth links ────────────────────────────────────────────── */
.auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #666;
}

.auth-links a { font-weight: 600; }

/* ── Dashboard / Index page ────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F0EFED;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A1A;
}

.page-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ── Module grid ───────────────────────────────────────────── */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.module-card {
    background: #FFFFFF;
    border: 1px solid #E5E3E0;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.module-card:hover {
    box-shadow: 0 6px 20px rgba(232,151,26,0.15);
    border-color: #E8971A;
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.module-card.coming-soon {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.module-icon {
    width: 48px;
    height: 48px;
    background: #FFF3E0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.module-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1A1A1A;
}

.module-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.45;
}

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-soon {
    background: #F0EFED;
    color: #888;
}

.badge-new {
    background: #FFF3E0;
    color: #C97D10;
}

/* ── Stats bar on dashboard ────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid #E5E3E0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E8971A;
}

/* ── Password strength meter ───────────────────────────────── */
.strength-meter {
    height: 5px;
    border-radius: 3px;
    background: #E5E3E0;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s, background 0.3s;
}

.strength-text {
    font-size: 0.75rem;
    margin-top: 0.3rem;
    color: #888;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: #FFFFFF;
    border-top: 1px solid #E5E3E0;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #AAA;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .site-header { padding: 0 1rem; }
    .main-content { padding: 1.5rem 1rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .module-grid { grid-template-columns: 1fr; }
    .header-inner { height: 60px; }
    .logo { height: 42px; }
}
