@import url('../fontawesome/css/all.min.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #F4F4F2;
    --surface:   #FFFFFF;
    --border:    rgba(0,0,0,0.10);
    --text:      #1A1A1A;
    --muted:     #6B6B6B;
    --accent:    #1A1A1A;
    --accent-fg: #FFFFFF;
    --danger:    #C0392B;
    --success:   #1A7A4A;
    --radius:    12px;
    --radius-sm: 8px;
    --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); }

/* ── AUTH ─────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center;
             justify-content: center; padding: 24px; }

.auth-card { background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 40px 36px;
             width: 100%; max-width: 400px; box-shadow: var(--shadow); }

.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }

.logo-mark { width: 40px; height: 40px; background: var(--accent);
             color: var(--accent-fg); border-radius: var(--radius-sm);
             display: flex; align-items: center; justify-content: center;
             font-weight: 700; font-size: 14px; letter-spacing: 0.5px; }
.logo-mark.sm { width: 32px; height: 32px; font-size: 12px; }

.logo-text { font-size: 18px; font-weight: 600; color: var(--text); }

.auth-title    { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-hint     { text-align: center; font-size: 13px; color: var(--muted);
                 margin-top: 20px; }
.auth-hint a   { color: var(--text); }

/* ── FIELDS ────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500;
               color: var(--muted); margin-bottom: 6px; }
.field input  { width: 100%; padding: 10px 14px; border: 1px solid var(--border);
                border-radius: var(--radius-sm); font-size: 15px;
                background: var(--surface); color: var(--text);
                transition: border-color .15s; }
.field input:focus { outline: none; border-color: var(--accent); }

.input-pw { position: relative; }
.input-pw input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
             background: none; border: none; font-size: 13px; color: var(--muted);
             cursor: pointer; padding: 4px 6px; }

/* ── BUTTONS ───────────────────────────────── */
.btn-primary { background: var(--accent); color: var(--accent-fg);
               border: none; border-radius: var(--radius-sm); padding: 11px 20px;
               font-size: 15px; font-weight: 500; cursor: pointer;
               transition: opacity .15s; }
.btn-primary:hover { opacity: .85; }
.btn-block { width: 100%; margin-top: 8px; }

.btn-logout { font-size: 13px; color: var(--muted); text-decoration: none;
              padding: 6px 12px; border: 1px solid var(--border);
              border-radius: var(--radius-sm); transition: background .15s; }
.btn-logout:hover { background: var(--bg); }

/* ─ ALERTS ──────────────────────────────── */
.alert { padding: 12px 14px; border-radius: var(--radius-sm);
         font-size: 14px; margin-bottom: 18px; }
.alert-error   { background: #FEF2F2; color: var(--danger);
                 border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: var(--success);
                 border: 1px solid #BBF7D0; }

/* ── TOPBAR ───────────────────────────────── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border);
          padding: 0 28px; height: 56px; display: flex;
          align-items: center; justify-content: space-between;
          position: sticky; top: 0; z-index: 100; }

.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-user  { display: flex; align-items: center; gap: 12px; }
.user-name    { font-size: 14px; font-weight: 500; }

.user-badge   { font-size: 11px; font-weight: 600; padding: 3px 8px;
                border-radius: 20px; letter-spacing: .4px; text-transform: uppercase; }
.badge-admin  { background: #1A1A1A; color: #FFF; }
.badge-user   { background: #F0F0EE; color: #555; }

/* ── HOME MODULES ───────────────────────────── */
.app-body  { background: var(--bg); min-height: 100vh; }
.home-main { max-width: 720px; margin: 0 auto; padding: 40px 24px; }

.home-greeting { font-size: 24px; font-weight: 600; }
.home-sub      { color: var(--muted); font-size: 15px; margin-top: 4px;
                 margin-bottom: 32px; }

.module-grid { display: flex; flex-direction: column; gap: 10px; }

.module-card { display: flex; align-items: center; gap: 16px;
               background: var(--surface); border: 1px solid var(--border);
               border-radius: var(--radius); padding: 18px 20px;
               text-decoration: none; color: var(--text);
               transition: box-shadow .15s, transform .15s; }
.module-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.module-card--admin { border-color: #E5E5E5; background: #FAFAFA; }

.module-icon { font-size: 26px; width: 44px; text-align: center; flex-shrink: 0; }
.module-info { flex: 1; }
.module-info strong { display: block; font-size: 15px; font-weight: 600; }
.module-info span   { font-size: 13px; color: var(--muted); }
.module-arrow { color: var(--muted); font-size: 18px; }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .topbar    { padding: 0 16px; }
    .home-main { padding: 24px 16px; }
}

.auth-links { display: flex; flex-direction: column; gap: 8px;
               text-align: center; margin-top: 16px; }
.auth-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--text); }