/* ================================================
   LimiT — Workflow Management System
   styles.css
   ================================================ */

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

:root {
  --bg:         #07080d;
  --surface:    #0c0e15;
  --surface2:   #11141e;
  --surface3:   #161a26;
  --border:     rgba(255,255,255,0.06);
  --border-hi:  rgba(255,255,255,0.12);
  --text:       #d8dde8;
  --muted:      #4a5268;
  --accent:     #e2ff47;
  --accent-dim: rgba(226,255,71,0.09);
  --accent-hi:  rgba(226,255,71,0.18);
  --danger:     #ff3b3b;
  --danger-dim: rgba(255,59,59,0.08);
  --green:      #3dffa0;
  --green-dim:  rgba(61,255,160,0.08);
  --orange:     #ff9f47;
  --orange-dim: rgba(255,159,71,0.08);
  --blue:       #47b4ff;
  --blue-dim:   rgba(71,180,255,0.08);
  --radius:     14px;
  --radius-sm:  9px;
  --font-head:  'Bebas Neue', sans-serif;
  --font-body:  'Outfit', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --shadow:     0 8px 40px rgba(0,0,0,0.5);
  --shadow-sm:  0 2px 16px rgba(0,0,0,0.3);
}

body.light {
  --bg:         #f4f5f7;
  --surface:    #ffffff;
  --surface2:   #eef0f4;
  --surface3:   #e4e6ed;
  --border:     rgba(0,0,0,0.08);
  --border-hi:  rgba(0,0,0,0.15);
  --text:       #1a1d27;
  --muted:      #8a93a8;
  --accent-dim: rgba(100,140,0,0.1);
  --accent-hi:  rgba(100,140,0,0.2);
  --shadow:     0 8px 40px rgba(0,0,0,0.1);
  --shadow-sm:  0 2px 16px rgba(0,0,0,0.07);
}

html { font-size: 15px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(226,255,71,0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(226,255,71,0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 50% at 50% 0%, black 0%, transparent 100%);
}
.bg-glow {
  position: fixed; top: -250px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 600px; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(226,255,71,0.055) 0%, transparent 65%);
}

/* HEADER */
.header { position: sticky; top: 0; z-index: 200; background: rgba(7,8,13,0.9); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1500px; margin: 0 auto; padding: 0 28px; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: baseline; text-decoration: none; user-select: none; }
.logo-l    { font-family: var(--font-head); font-size: 30px; color: var(--accent); letter-spacing: -1px; line-height: 1; }
.logo-rest { font-family: var(--font-head); font-size: 30px; color: var(--text);   letter-spacing: -1px; line-height: 1; }
.logo-tag  { font-family: var(--font-mono); font-size: 8px; font-weight: 500; letter-spacing: 0.18em; color: var(--muted); margin-left: 10px; padding: 2px 6px; border: 1px solid var(--border-hi); border-radius: 4px; text-transform: uppercase; align-self: center; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-pill { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 99px; padding: 5px 14px 5px 6px; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--accent-hi); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 14px; color: var(--accent); flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* BUTTONS */
.btn { border-radius: var(--radius-sm); padding: 9px 18px; font-family: var(--font-body); font-size: 14px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: opacity 0.15s, transform 0.1s; white-space: nowrap; }
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: #000; font-family: var(--font-head); font-size: 16px; letter-spacing: 0.04em; }
.btn-ghost  { background: transparent; border: 1px solid var(--border-hi); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.btn-danger { background: var(--danger-dim); border: 1px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background: rgba(255,59,59,0.16); opacity: 1; }
.btn-green  { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }
.btn-sm   { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* MAIN */
.main { max-width: 1500px; margin: 0 auto; padding: 28px 28px 80px; position: relative; z-index: 1; }
.page-title { font-family: var(--font-head); font-size: clamp(28px,4vw,44px); letter-spacing: 0.02em; line-height: 1; margin-bottom: 24px; }
.page-title .accent { color: var(--accent); }

/* STATS */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--border-hi); }
.stat-val { font-family: var(--font-head); font-size: 36px; letter-spacing: -1px; line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.05em; }
.stat-accent { color: var(--accent); }
.stat-green  { color: var(--green);  }
.stat-orange { color: var(--orange); }
.stat-blue   { color: var(--blue);   }
.stat-danger { color: var(--danger); }

/* TABS */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 10px 20px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.2s, border-color 0.2s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* PANEL */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.panel-title { font-family: var(--font-head); font-size: 18px; letter-spacing: 0.05em; }
.panel-body { padding: 20px; }

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width:1000px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width:800px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width:520px)  { .grid-3 { grid-template-columns: 1fr; } }

/* FORMS */
.form-col { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width:520px) { .form-row { grid-template-columns: 1fr; } }
.field-wrap { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field, select.field, textarea.field { background: rgba(255,255,255,0.03); border: 1px solid var(--border-hi); border-radius: var(--radius-sm); color: var(--text); outline: none; padding: 10px 14px; font-family: var(--font-body); font-size: 14px; width: 100%; transition: border-color 0.2s, background 0.2s; -webkit-appearance: none; appearance: none; }
.field:focus { border-color: var(--accent); background: var(--accent-dim); }
.field::placeholder { color: var(--muted); }
select.field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5268' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
select.field option { background: var(--surface2); color: var(--text); }
textarea.field { resize: vertical; min-height: 90px; line-height: 1.6; }

/* SEARCH */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.search-input { background: rgba(255,255,255,0.03); border: 1px solid var(--border-hi); border-radius: var(--radius-sm); color: var(--text); outline: none; padding: 9px 14px 9px 36px; font-family: var(--font-body); font-size: 14px; width: 240px; transition: border-color 0.2s; }
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }

/* TABLE */
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead { position: sticky; top: 0; z-index: 5; }
.data-table th { background: var(--surface2); color: var(--muted); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.018); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.05em; white-space: nowrap; }
.badge-pending     { background: rgba(255,255,255,0.06); color: var(--muted);   border: 1px solid var(--border-hi); }
.badge-in_progress { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,159,71,0.25); }
.badge-done        { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(61,255,160,0.25); }
.badge-high   { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(255,59,59,0.25); }
.badge-medium { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,159,71,0.25); }
.badge-low    { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(61,255,160,0.25); }
.badge-boss     { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(226,255,71,0.25); }
.badge-employee { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(71,180,255,0.25); }

/* TASK CARDS */
.tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.2s, transform 0.15s; cursor: pointer; }
.task-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.task-card.done { opacity: 0.55; }
.task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.task-desc  { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta  { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-due   { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.task-due.overdue { color: var(--danger); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--surface); border: 1px solid var(--border-hi); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.2s; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: var(--font-head); font-size: 20px; letter-spacing: 0.04em; }
.modal-body  { padding: 22px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; transition: color 0.15s; }
.modal-close:hover { color: var(--text); }

/* NOTES */
.notes-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 240px; overflow-y: auto; }
.note-item { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.note-author { font-size: 11px; color: var(--accent); font-family: var(--font-mono); margin-bottom: 4px; }
.note-text   { font-size: 13.5px; line-height: 1.55; }
.note-time   { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 4px; }

/* EMPTY */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 20px; gap: 10px; color: var(--muted); font-size: 14px; text-align: center; }
.empty-glyph { font-size: 44px; opacity: 0.15; font-family: var(--font-mono); }

/* MISC */
.msg { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); min-height: 16px; }
.msg.ok  { color: var(--green);  }
.msg.err { color: var(--danger); }
.mt { margin-top: 20px; }
.mt-sm { margin-top: 10px; }
.gap-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.text-muted { color: var(--muted); font-size: 13px; }
.pic-badge { font-family: var(--font-mono); font-size: 11px; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(226,255,71,0.18); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 1; }
.login-box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border-hi); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo { justify-content: center; }
.login-logo .logo-l    { font-size: 52px; }
.login-logo .logo-rest { font-size: 52px; }
.login-logo .logo-tag  { display: block; margin: 8px auto 0; width: fit-content; font-size: 9px; }
.login-subtitle { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 28px; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
