/* ══════════════════════════════════════════════════════
   CONSEGMA · Portal do Cliente — style.css
   Autor: Claude (Anthropic)  |  Versão: 1.0
══════════════════════════════════════════════════════ */

/* ── 0. CSS Variables ── */
:root {
  --blue-900: #0f2461;
  --blue-800: #1a3580;
  --blue-700: #1e40af;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  --green-500: #22c55e;
  --green-100: #dcfce7;
  --yellow-500:#eab308;
  --yellow-100:#fef9c3;
  --purple-500:#a855f7;
  --purple-100:#f3e8ff;
  --red-500:   #ef4444;
  --red-100:   #fee2e2;

  --sidebar-w: 256px;
  --topbar-h:  64px;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.08);
  --transition: .22s cubic-bezier(.4,0,.2,1);

  --font: 'Outfit', sans-serif;
  --mono: 'DM Mono', monospace;
}

/* ── 1. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea {
  font-family: var(--font);
  font-size: .95rem;
  color: var(--gray-900);
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}
select { cursor: pointer; appearance: none; }
textarea { resize: vertical; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.hidden { display: none !important; }

/* ── 2. Loader ── */
.loader-overlay {
  position: fixed; inset: 0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s ease, visibility .5s ease;
}
.loader-overlay.fade-out { opacity: 0; visibility: hidden; }
.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  animation: fadeInUp .5s ease both;
}
.loader-logo { width: 180px; filter: none; }
.loader-bar-wrap {
  width: 200px; height: 3px;
  background: var(--gray-200);
  border-radius: 99px; overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
  border-radius: 99px;
  animation: loadBar 1.4s ease-in-out forwards;
}
@keyframes loadBar {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}
.loader-text {
  font-size: .85rem;
  color: var(--gray-400);
  letter-spacing: .04em;
}

/* ── 3. Login Screen ── */
.page { min-height: 100vh; }
.login-bg {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-500) 100%);
  overflow: hidden;
  z-index: 0;
}
.login-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .35;
}
.b1 { width: 600px; height: 600px; background: #3b82f6; top: -200px; right: -150px; }
.b2 { width: 400px; height: 400px; background: #0f2461; bottom: -100px; left: -100px; }
.b3 { width: 300px; height: 300px; background: #60a5fa; top: 50%; left: 30%; }

#loginScreen {
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.login-card {
  position: relative; z-index: 1;
  display: flex;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.08);
  overflow: hidden;
  width: 100%; max-width: 900px;
  animation: fadeInUp .6s ease both;
}

/* left panel */
.login-panel-left {
  flex: 0 0 340px;
  background: linear-gradient(160deg, var(--blue-800) 0%, var(--blue-700) 100%);
  padding: 48px 40px;
  display: flex; flex-direction: column; gap: 32px;
  color: #fff;
}
.login-logo-img { width: 140px; filter: brightness(10); }
.login-panel-title {
  font-size: 2rem; font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.login-panel-sub { font-size: .9rem; color: rgba(255,255,255,.7); line-height: 1.6; }
.login-features {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: auto;
}
.login-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; color: rgba(255,255,255,.85);
}
.login-features li i { width: 16px; height: 16px; opacity: .9; }

/* right panel */
.login-panel-right {
  flex: 1; padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.login-form-header h3 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--gray-900);
}
.login-form-header p { font-size: .9rem; color: var(--gray-500); margin-top: 4px; }

#loginForm { display: flex; flex-direction: column; gap: 20px; }

/* ── 4. Form Fields ── */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label {
  font-size: .82rem; font-weight: 600;
  color: var(--gray-700); letter-spacing: .03em; text-transform: uppercase;
}
.required { color: var(--red-500); }
.optional { color: var(--gray-400); font-weight: 400; text-transform: none; font-size: .78rem; }

.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  background: #fff;
}
.input-wrap > i { width: 18px; height: 18px; color: var(--gray-400); flex-shrink: 0; }
.input-wrap input,
.input-wrap select,
.input-wrap textarea { flex: 1; font-size: .95rem; }
.input-wrap textarea { padding-top: 2px; }
.select-wrap::after {
  content: '';
  border: 5px solid transparent;
  border-top-color: var(--gray-400);
  margin-top: 2px;
  flex-shrink: 0;
}

.toggle-pass {
  color: var(--gray-400); display: flex;
  transition: color var(--transition);
}
.toggle-pass:hover { color: var(--gray-600); }
.toggle-pass i { width: 16px; height: 16px; }

/* ── 5. Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  color: #fff;
  font-family: var(--font); font-weight: 600; font-size: .93rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 10px rgba(37,99,235,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  box-shadow: 0 4px 18px rgba(37,99,235,.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-login { width: 100%; padding: 14px; font-size: 1rem; }
.btn-primary.btn-sm { padding: 9px 16px; font-size: .85rem; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--gray-700);
  font-family: var(--font); font-weight: 600; font-size: .93rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline:hover {
  border-color: var(--gray-400);
  background: var(--gray-100);
}

.login-hint {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--gray-400);
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
}
.login-hint i { width: 14px; height: 14px; }

/* ── 6. App Shell ── */
.app-shell {
  display: flex; min-height: 100vh;
}

/* ── 7. Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--gray-900);
  display: flex; flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo { width: 120px; filter: brightness(10); }
.sidebar-close {
  display: none; color: var(--gray-400);
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-close i { width: 18px; height: 18px; }

.sidebar-nav {
  flex: 1; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.55);
  transition: all var(--transition);
  position: relative;
  user-select: none;
}
.nav-item i { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(59,130,246,.08));
  color: var(--blue-400, #60a5fa);
  border-right: 3px solid var(--blue-500);
}
.nav-badge {
  margin-left: auto;
  background: var(--blue-600);
  color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 12px;
}
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  display: block; font-size: .85rem; font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: .75rem; color: rgba(255,255,255,.35); }
.btn-logout {
  color: rgba(255,255,255,.35); padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex;
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: var(--red-500); }
.btn-logout i { width: 16px; height: 16px; }

/* backdrop (mobile) */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  z-index: 199;
  opacity: 0; transition: opacity var(--transition);
}

/* ── 8. Main Wrap & Topbar ── */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.menu-toggle {
  display: none; color: var(--gray-700);
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--gray-100); }
.menu-toggle i { width: 20px; height: 20px; }
.topbar-title {
  font-size: 1rem; font-weight: 600; color: var(--gray-700);
  flex: 1;
}
.topbar-right {
  display: flex; align-items: center; gap: 12px;
}
.topbar-greeting {
  font-size: .87rem; color: var(--gray-500);
}
.topbar-greeting strong { color: var(--gray-900); font-weight: 600; }
.topbar-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

/* ── 9. Content Area ── */
.content-area { flex: 1; padding: 32px; overflow-x: hidden; }
.page-content { animation: fadeInUp .3s ease both; }
.page-content.hidden { display: none; }

.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 1.6rem; font-weight: 700; color: var(--gray-900);
}
.page-header p { font-size: .9rem; color: var(--gray-500); margin-top: 4px; }

/* ── 10. Stats Grid (Dashboard) ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeInUp .4s ease both;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .1s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .2s; }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon i { width: 22px; height: 22px; }
.accent-blue .stat-icon { background: var(--blue-50); color: var(--blue-600); }
.accent-green .stat-icon { background: var(--green-100); color: var(--green-500); }
.accent-yellow .stat-icon { background: var(--yellow-100); color: var(--yellow-500); }
.accent-purple .stat-icon { background: var(--purple-100); color: var(--purple-500); }
.stat-info { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray-500); font-weight: 500; }

/* ── 11. Dashboard Cards ── */
.dash-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 16px;
}
.dash-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 {
  font-size: .95rem; font-weight: 700; color: var(--gray-800);
  display: flex; align-items: center; gap: 8px;
}
.card-header h3 i { width: 16px; height: 16px; color: var(--blue-600); }
.card-link {
  font-size: .82rem; font-weight: 600; color: var(--blue-600);
  transition: color var(--transition);
}
.card-link:hover { color: var(--blue-800); }

/* activity list */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--blue-50);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-icon i { width: 16px; height: 16px; color: var(--blue-600); }
.activity-info { flex: 1; min-width: 0; }
.activity-name {
  font-size: .88rem; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-date { font-size: .76rem; color: var(--gray-400); margin-top: 1px; }

/* empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 32px 0;
  color: var(--gray-400); text-align: center;
}
.empty-state i { width: 40px; height: 40px; }
.empty-state span { font-size: .88rem; }

/* quick actions */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.quick-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; color: var(--gray-700);
  transition: all var(--transition);
  text-align: left;
}
.quick-btn:hover {
  background: var(--blue-50);
  border-color: var(--blue-200, #bfdbfe);
  color: var(--blue-700);
}
.quick-btn i { width: 18px; height: 18px; }

/* ── 12. Docs Toolbar ── */
.docs-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.search-wrap {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.search-wrap i { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-wrap input { font-size: .9rem; }

/* ── 13. Document Cards (My Docs) ── */
.docs-grid {
  display: grid; gap: 12px;
}
.doc-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  animation: fadeInUp .3s ease both;
}
.doc-card:hover { border-color: var(--blue-200, #bfdbfe); box-shadow: var(--shadow-md); }
.doc-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--blue-50);
  color: var(--blue-600);
}
.doc-icon i { width: 22px; height: 22px; }
.doc-info { flex: 1; min-width: 0; }
.doc-name {
  font-size: .93rem; font-weight: 600; color: var(--gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; flex-wrap: wrap;
}
.doc-date { font-size: .78rem; color: var(--gray-400); font-family: var(--mono); }
.doc-category {
  font-size: .73rem; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: var(--blue-50); color: var(--blue-700);
}
.badge {
  font-size: .73rem; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 4px;
}
.badge-sent { background: var(--blue-100); color: var(--blue-700); }
.badge-approved { background: var(--green-100); color: #15803d; }
.badge-review { background: var(--yellow-100); color: #92400e; }
.badge i { width: 11px; height: 11px; }

.doc-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--gray-500);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--blue-50); color: var(--blue-600); }
.btn-icon.danger:hover { background: var(--red-100); color: var(--red-500); }
.btn-icon i { width: 16px; height: 16px; }

.docs-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 20px;
  color: var(--gray-400); text-align: center;
}
.docs-empty i { width: 56px; height: 56px; }
.docs-empty h3 { font-size: 1rem; font-weight: 600; color: var(--gray-600); }
.docs-empty p { font-size: .88rem; max-width: 280px; line-height: 1.6; }

/* ── 14. Upload Form ── */
.upload-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 680px;
  box-shadow: var(--shadow-sm);
}
#uploadForm { display: flex; flex-direction: column; gap: 22px; }

.dropzone {
  position: relative;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  transition: all var(--transition);
  cursor: pointer; overflow: hidden;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--blue-500);
  background: var(--blue-50);
}
.dropzone-input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; z-index: 2;
}
.dropzone-body {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 32px 20px;
  text-align: center; pointer-events: none;
}
.dropzone-body i { width: 40px; height: 40px; color: var(--gray-400); }
.dropzone-body p { font-size: .9rem; color: var(--gray-600); }
.dropzone-body p strong { color: var(--blue-600); }
.dropzone-body small { font-size: .78rem; color: var(--gray-400); }
.dropzone-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--blue-50);
}
.dropzone-preview i { width: 24px; height: 24px; color: var(--blue-600); flex-shrink: 0; }
.dropzone-preview span {
  flex: 1; font-size: .9rem; font-weight: 500; color: var(--blue-700);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.remove-file {
  color: var(--gray-400); padding: 4px;
  border-radius: 4px; transition: all var(--transition);
  display: flex;
}
.remove-file:hover { color: var(--red-500); background: var(--red-100); }
.remove-file i { width: 14px; height: 14px; }

.form-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding-top: 8px; border-top: 1px solid var(--gray-100);
}

/* ── 15. Company Docs ── */
.company-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.company-doc-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  animation: fadeInUp .35s ease both;
}
.company-doc-card:hover {
  border-color: var(--blue-300, #93c5fd);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.company-doc-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.company-doc-icon i { width: 24px; height: 24px; }
.company-doc-info { flex: 1; }
.company-doc-name { font-size: .95rem; font-weight: 700; color: var(--gray-900); }
.company-doc-desc { font-size: .82rem; color: var(--gray-500); margin-top: 4px; line-height: 1.5; }
.company-doc-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--gray-400);
}
.company-doc-size {
  font-family: var(--mono);
  background: var(--gray-100); padding: 2px 8px;
  border-radius: 4px; font-size: .75rem;
}
.btn-download {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1.5px solid var(--blue-200, #bfdbfe);
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-download:hover {
  background: var(--blue-700);
  color: #fff;
  border-color: var(--blue-700);
}
.btn-download i { width: 15px; height: 15px; }

/* ── 16. Toast Notifications ── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9998; pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--gray-900);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  min-width: 300px; max-width: 380px;
  pointer-events: all;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) both;
  border-left: 4px solid var(--blue-500);
}
.toast.success { border-left-color: var(--green-500); }
.toast.error   { border-left-color: var(--red-500); }
.toast.warning { border-left-color: var(--yellow-500); }
.toast-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--green-500); }
.toast.error   .toast-icon { color: var(--red-500); }
.toast.warning .toast-icon { color: var(--yellow-500); }
.toast-body { flex: 1; }
.toast-title { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.toast-msg   { font-size: .8rem; color: rgba(255,255,255,.65); margin-top: 2px; line-height: 1.4; }
.toast-close {
  color: rgba(255,255,255,.4); padding: 2px;
  border-radius: 4px; transition: all var(--transition);
  display: flex; flex-shrink: 0;
}
.toast-close:hover { color: #fff; }
.toast-close i { width: 14px; height: 14px; }
.toast.fade-out { animation: toastOut .25s ease forwards; }

/* ── 17. Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── 18. Responsive ── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .login-panel-left { display: none; }
  .login-card { max-width: 460px; }
  .login-panel-right { padding: 40px 32px; }
}

@media (max-width: 768px) {
  /* Sidebar becomes off-canvas */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-backdrop.open { display: block; opacity: 1; }

  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }

  .content-area { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .upload-card { padding: 20px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > * { width: 100%; justify-content: center; }

  .docs-toolbar { flex-direction: column; align-items: stretch; }
  .docs-toolbar .btn-primary { justify-content: center; }

  .company-docs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 1.4rem; }

  .login-panel-right { padding: 32px 24px; }

  .doc-card { flex-wrap: wrap; }
  .doc-actions { width: 100%; justify-content: flex-end; }

  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; }
}