@import url('../asset/fonts/stylesheet.css');

:root {
  --green: #99cc33;
  --gd:    #7ab32a;
  --blue:  #1a2b4c;
  --white: #fff;
  --bg:    #f1f5f9;
  --border:#e2e8f0;
  --muted: #6b7280;
  --danger:#dc2626;
  --success:#16a34a;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Arboria", system-ui, sans-serif;
  background: var(--bg);
  color: #1a1a1a;
  font-size: 15px;
  min-height: 100vh;
}
a { color: var(--gd); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea, button { font: inherit; }
img { max-width: 100%; display: block; }

/* ── TOPBAR ── */
.topbar { background: var(--white); border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; z-index: 10; }
.topbar-inner { width: min(1180px, 100% - 40px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-logo img { height: 44px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { font-size: .85rem; color: var(--muted); }
.topbar-user strong { color: var(--blue); }
.topbar-back { font-size: .83rem; color: var(--muted); }
.topbar-back:hover { color: var(--blue); text-decoration: none; }
.ec-lang-switch { display: flex; align-items: center; gap: 6px; }
.ec-lang-switch a { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--blue); border: 1.5px solid var(--border); border-radius: 8px; }
.ec-lang-switch a:hover { background: #f1f5f9; text-decoration: none; border-color: #c4cedb; }
.ec-lang-switch a.active { background: #f1f5f9; color: var(--gd); border-color: var(--gd); }

/* ── LAYOUT ── */
.ec-wrap { width: min(1180px, 100% - 40px); margin: 0 auto; padding: 36px 0 80px; }
.ec-wrap.narrow { max-width: 480px; }
.ec-wrap.medium { max-width: 720px; }

/* ── CARDS ── */
.card { background: var(--white); border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(26,43,76,.06); padding: 28px 32px; }
.card + .card { margin-top: 20px; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--blue); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.card-title svg { width: 20px; height: 20px; color: var(--gd); flex-shrink: 0; }

/* ── PAGE HEADER ── */
.page-hd { margin-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-hd h1 { font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.page-hd p { font-size: .88rem; color: var(--muted); margin-top: 4px; }

/* ── FORMS ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .9rem; color: #1a1a1a; background: var(--white);
  outline: none; transition: border-color .18s, box-shadow .18s; appearance: auto;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(153,204,51,.15);
}
.field textarea { resize: vertical; min-height: 88px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-hint { font-size: .74rem; color: var(--muted); margin-top: 4px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px;
  font-weight: 700; font-size: .88rem;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .18s, box-shadow .18s; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: linear-gradient(135deg,#b8e050,var(--green) 45%,var(--gd)); color: var(--blue); box-shadow: 0 4px 14px rgba(153,204,51,.3); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(153,204,51,.4); }
.btn-blue { background: var(--blue); color: var(--white); box-shadow: 0 4px 14px rgba(26,43,76,.2); }
.btn-blue:hover { box-shadow: 0 8px 24px rgba(26,43,76,.3); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--gd); color: var(--gd); }
.btn-danger { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 8px; }
.btn-full { width: 100%; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: .88rem; font-weight: 500; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
.alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.alert-err  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-ok   { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warn { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

/* ── BADGE ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }

/* ── STEPPER ── */
.stepper { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.step-item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; min-width: 72px; }
.step-item::before { content: ''; position: absolute; top: 13px; left: calc(-50% + 14px); right: calc(50% + 14px); height: 2px; background: var(--border); z-index: 0; }
.step-item:first-child::before { display: none; }
.step-item.done::before { background: var(--gd); }
.step-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; z-index: 1; font-size: .72rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.step-item.done   .step-dot { background: var(--gd);  border-color: var(--gd);  color: var(--white); }
.step-item.active .step-dot { border-color: #2563eb; color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.step-label { font-size: .6rem; font-weight: 600; color: var(--muted); text-align: center; margin-top: 6px; line-height: 1.3; }
.step-item.done .step-label, .step-item.active .step-label { color: var(--blue); }

/* ── TIMELINE ── */
.tl { list-style: none; position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl li { position: relative; padding: 0 0 18px 16px; font-size: .85rem; }
.tl li::before { content: ''; position: absolute; left: -10px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gd); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--gd); }
.tl li:last-child { padding-bottom: 0; }
.tl-date   { font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.tl-status { font-weight: 700; color: var(--blue); }
.tl-msg    { color: var(--muted); margin-top: 2px; font-size: .82rem; }

/* ── TABLE ── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { padding: 10px 14px; text-align: left; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1.5px solid var(--border); background: #f8fafc; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }

/* ── UPLOAD ZONE ── */
.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px 16px; text-align: center; cursor: pointer; transition: border-color .18s, background .18s; position: relative; }
.upload-zone:hover { border-color: var(--green); background: #f4fbea; }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone svg { width: 34px; height: 34px; color: var(--gd); margin: 0 auto 10px; }
.upload-zone p { font-size: .83rem; color: var(--muted); }
.upload-zone strong { color: var(--blue); }

/* ── DOC ITEM ── */
.doc-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--white); }
.doc-item:hover { border-color: var(--gd); }
.doc-icon { width: 36px; height: 36px; border-radius: 8px; background: #f4fbea; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-icon svg { width: 18px; height: 18px; color: var(--gd); }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: .85rem; font-weight: 700; color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ── DOSSIER ROW ── */
.dossier-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--white); color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s; }
.dossier-row:hover { border-color: var(--gd); box-shadow: 0 4px 16px rgba(26,43,76,.08); transform: translateY(-1px); text-decoration: none; }
.dossier-ref  { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.dossier-type { font-size: .95rem; font-weight: 700; color: var(--blue); margin-top: 2px; }
.dossier-date { font-size: .75rem; color: var(--muted); }

/* ── STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: 14px; border: 1px solid var(--border); padding: 20px 22px; }
.stat-num { font-size: 1.9rem; font-weight: 700; color: var(--blue); line-height: 1; }
.stat-lbl { font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* ── LOGIN / REGISTER ── */
.login-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card { background: var(--white); border-radius: 20px; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(26,43,76,.1); padding: 40px; width: 100%; max-width: 440px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { height: 50px; margin: 0 auto 12px; }
.login-logo h1 { font-size: 1.2rem; font-weight: 700; color: var(--blue); }
.login-logo p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.login-footer { text-align: center; margin-top: 18px; font-size: .83rem; color: var(--muted); }
.login-footer a { color: var(--gd); font-weight: 700; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--white); border-radius: 20px; padding: 32px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; line-height: 0; }
.modal-close:hover { background: var(--border); }

/* ── ADMIN BADGE ── */
.admin-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--blue); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .05em; }

/* ── PASSWORD TOGGLE ── */
.field-pwd { position: relative; }
.field-pwd input { padding-right: 44px; }
.pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--muted); line-height: 0; border-radius: 6px;
  transition: color .18s;
}
.pwd-toggle:hover { color: var(--blue); }
.pwd-toggle svg { width: 18px; height: 18px; display: block; }

/* ── MISC ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .page-hd { flex-direction: column; }
  .login-card { padding: 28px 20px; }
  .card { padding: 20px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dossier-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr !important; }
}
