/* Arrihub — by Arrilan Digital Studio. Arrilan blue #1688EE, black, white. */
:root {
  --blue: #1688EE;          /* brand blue: logo square, highlights */
  --blue-ink: #0F6FD1;      /* blue for text/buttons on white (4.5:1+) */
  --blue-dark: #0B5CB0;
  --blue-tint: #E7F2FE;
  --black: #000000;
  --ink: #0E0F11;
  --text: #15171A;
  --muted: #5B616B;
  --bg: #F4F6F9;
  --panel: #FFFFFF;
  --border: #E3E6EB;
  --danger: #C8261A;
  --ok: #0E8A45;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .14);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Archivo, Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-ink); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; margin: 0; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Top bar + brand */
.topbar { background: var(--black); color: #fff; }
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.brand .word { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }
.topbar nav { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.topbar nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a.on { color: #fff; background: rgba(255,255,255,.12); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.75); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover:not(:disabled) { background: #F1F3F6; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn.dark { background: var(--black); border-color: var(--black); color: #fff; }
.btn.dark:hover:not(:disabled) { background: #222; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: rgba(0,0,0,.05); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.iconbtn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 10px; cursor: pointer; color: inherit; }
.iconbtn:hover { background: rgba(0,0,0,.06); }
.iconbtn svg { width: 20px; height: 20px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid #CDD2DA; background: #fff; outline: none; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,136,238,.2); }
.checkline { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.checkline input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue-ink); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Cards, badges */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #EEF0F3; color: #3A3F47; white-space: nowrap; }
.badge.blue { background: var(--blue-tint); color: var(--blue-dark); }
.badge.green { background: #E3F6EC; color: #0A6B36; }
.badge.red { background: #FDECEA; color: #A31F15; }
.badge.dark { background: #000; color: #fff; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal.show { display: flex; }
.modal .box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: var(--text); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { font-size: 20px; margin-bottom: 6px; }
.modal .lead { margin: 0 0 18px; color: var(--muted); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal .err { color: var(--danger); font-size: 14px; margin-top: 12px; }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; max-width: 90vw; }
.toast.err { background: var(--danger); }

.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.15); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-family: var(--display); font-size: 20px; margin-bottom: 6px; }
