/* RRHH module — light dashboard look in the style of the Base44 "BudgetWise" template:
   light sidebar with line icons, soft gradient background, white rounded cards with soft shadows,
   colored gradient icon tiles, bold headings (Inter). Shared by login.php and index.php. */
:root {
    --bg: #f5f8fc;
    --sidebar: #fafbfc;
    --line: #eef1f5;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #94a3b8;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --radius: 16px;
    --g-blue: linear-gradient(135deg, #3b82f6, #2563eb);
    --g-teal: linear-gradient(135deg, #10b981, #059669);
    --g-orange: linear-gradient(135deg, #fb923c, #ea580c);
    --g-purple: linear-gradient(135deg, #c084fc, #9333ea);
    --g-brand: linear-gradient(135deg, #2563eb, #14b8a6);
    --g-avatar: linear-gradient(135deg, #ec4899, #a855f7);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shell ---------- */
.r-app { display: flex; min-height: 100vh; background: linear-gradient(135deg, #eef4ff 0%, #f8fafc 45%, #f2fbf7 100%); }
.r-sidebar { width: 280px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.r-brand { display: flex; align-items: center; gap: 14px; padding: 28px 24px 24px; border-bottom: 1px solid var(--line); }
.r-brand-tile { width: 52px; height: 52px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, .18); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.r-brand-tile img { width: 44px; height: auto; }
.r-brand b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.r-brand small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.r-nav { flex: 1; padding: 22px 16px; overflow-y: auto; }
.r-nav-label { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; color: var(--soft); text-transform: uppercase; padding: 0 12px 10px; }
.r-nav a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 10px; color: #334155; font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.r-nav a .ic { color: #64748b; }
.r-nav a:hover { background: #f1f5f9; }
.r-nav a.active { background: #eff6ff; color: var(--blue); font-weight: 600; }
.r-nav a.active .ic { color: var(--blue); }
.r-nav a.soon { color: var(--soft); pointer-events: none; }
.r-nav a.soon .ic { color: #cbd5e1; }
.r-nav a.soon em { margin-left: auto; font-style: normal; font-size: 11px; background: #f1f5f9; color: var(--soft); padding: 2px 8px; border-radius: 10px; }
.r-profile { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--line); }
.r-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--g-avatar); color: #fff; display: flex; align-items: center; justify-content: center; }
.r-profile b { display: block; font-size: 15px; }
.r-profile a { font-size: 13px; color: var(--muted); }
.r-profile a:hover { color: var(--blue); }

.r-main { flex: 1; min-width: 0; padding: 40px 44px 48px; }
.r-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.r-head h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.r-head p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.r-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--blue); color: #fff; border: none; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.r-btn:hover { background: var(--blue-dark); }
.r-btn:disabled { opacity: .55; cursor: default; box-shadow: none; }

.r-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-bottom: 36px; }
.r-stat { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 26px 28px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.r-stat span { display: block; color: #475569; font-size: 15px; font-weight: 500; }
.r-stat strong { display: block; font-size: 28px; font-weight: 800; margin-top: 14px; letter-spacing: -.5px; }
.r-tile { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.r-tile .ic { width: 26px; height: 26px; }
.t-teal { background: var(--g-teal); } .t-orange { background: var(--g-orange); } .t-blue { background: var(--g-blue); } .t-purple { background: var(--g-purple); }

.r-insight { background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 60%, #fdf4ff 100%); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 26px 30px; margin-bottom: 36px; }
.r-insight h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 20px; font-weight: 700; }
.r-insight h3 .ic { color: #6366f1; }
.r-insight-row { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 10px; padding: 15px 18px; font-size: 15px; color: #334155; }
.r-insight-row .ic { color: #10b981; }

.r-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.r-card { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 28px 30px; margin-bottom: 28px; }
.r-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.r-card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 700; }
.r-card-head h3 .ic { color: var(--blue); }
.r-card-head a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.r-empty { text-align: center; padding: 40px 10px; color: var(--muted); font-size: 17px; }
.r-empty .ic { width: 60px; height: 60px; color: #cbd5e1; stroke-width: 1.5; display: block; margin: 0 auto 18px; }

.r-toggle { display: none; position: fixed; top: 14px; left: 14px; z-index: 30; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--card-shadow); }
@media (max-width: 900px) {
    .r-sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 30px rgba(15, 23, 42, .15); }
    .r-sidebar.open { transform: none; }
    .r-toggle { display: block; }
    .r-main { padding: 70px 16px 32px; }
    .r-head h1 { font-size: 30px; }
    .r-grid { grid-template-columns: 1fr; }
}

/* ---------- Login ---------- */
.r-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #eef4ff 0%, #f8fafc 50%, #f2fbf7 100%); }
.r-login-box { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 20px 50px rgba(15, 23, 42, .10); padding: 40px 36px; }
.r-login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.r-login h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.r-login .sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.r-field { margin-bottom: 18px; }
.r-field label { display: block; font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 7px; }
.r-field input { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; }
.r-field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.r-login .r-btn { width: 100%; justify-content: center; padding: 13px; margin-top: 6px; }
.r-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
