:root {
  --brand: #0f2d4a;
  --brand-light: #1a4d7a;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --danger: #c0392b;
  --bg: #f4f6f8;
  --card: #fff;
  --text: #1e293b;
  --muted: #64748b;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background: var(--brand); color: #fff; flex-wrap: wrap; }
.header-search { flex: 1; max-width: 420px; }
.header-search input { width: 100%; padding: .45rem .75rem; border: none; border-radius: var(--radius); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-link { color: #fff; text-decoration: none; font-size: .9rem; }
.badge-accent { background: var(--accent-light); color: #fff; }
.app-header a { color: #fff; text-decoration: none; font-weight: 600; }
.tagline { font-size: 0.75rem; opacity: 0.85; margin-left: 0.5rem; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1.5rem; background: var(--card); border-bottom: 1px solid #e2e8f0; }
.main-nav a { color: var(--brand); text-decoration: none; padding: 0.35rem 0.6rem; border-radius: var(--radius); }
.main-nav a:hover { background: #e8f0f8; }
.page-content { padding: 1.5rem; max-width: 1400px; margin: 0 auto; }
.page-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-header h1 { margin: 0; flex: 1; }
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius); border: 1px solid #cbd5e1; background: var(--card); cursor: pointer; text-decoration: none; color: var(--text); font-size: 0.9rem; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.btn-link { background: none; border: none; color: inherit; cursor: pointer; text-decoration: underline; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.card { background: var(--card); padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }
input, select, textarea { padding: 0.5rem; border: 1px solid #cbd5e1; border-radius: var(--radius); }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-split-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.auth-split-brand { display: flex; align-items: center; justify-content: center; padding: 3rem; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.brand-panel { max-width: 420px; text-align: center; }
.brand-panel h2 { font-size: 2.5rem; margin: 0 0 1rem; }
.brand-slogan { font-size: 1.35rem; font-weight: 300; margin: 0 0 1.5rem; opacity: .95; }
.brand-tag { opacity: .8; line-height: 1.6; }
.auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 2rem; }
.auth-card { background: var(--card); padding: 2rem; border-radius: var(--radius); width: 100%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.auth-form label { display: block; margin-bottom: 1rem; }
.auth-form input { width: 100%; margin-top: .35rem; }
.btn-block { width: 100%; margin-top: .5rem; }
.auth-links { margin-top: 1rem; font-size: .9rem; }
.auth-links a { color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); }
.app-shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "header header" "nav content"; }
.app-header { grid-area: header; }
.main-nav { grid-area: nav; flex-direction: column; align-items: stretch; min-height: calc(100vh - 60px); border-right: 1px solid #e2e8f0; border-bottom: none; padding: 1rem .75rem; }
.main-nav .nav-link.active { background: #e0f2f1; color: var(--accent); font-weight: 600; }
.page-content { grid-area: content; }
.nav-toggle { display: none; position: fixed; bottom: 1rem; right: 1rem; z-index: 100; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 1.25rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
[x-cloak] { display: none !important; }
.launcher { text-align: center; }
.launcher h1 { font-size: 1.75rem; }
.action-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 2rem; }
.action-card { background: var(--card); padding: 1.5rem; border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .15s; }
.action-card:hover { transform: translateY(-2px); }
.pipeline-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.pipeline-column { min-width: 260px; background: #e8edf2; border-radius: var(--radius); padding: 0.75rem; }
.pipeline-card { background: var(--card); padding: 0.75rem; margin-bottom: 0.5rem; border-radius: var(--radius); cursor: grab; }
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.widget { background: var(--card); padding: 1rem; border-radius: var(--radius); }
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; background: #e2e8f0; }
.badge-danger, .text-danger { color: var(--danger); }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tabs a { padding: 0.5rem 1rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.task-item.overdue { border-left: 3px solid var(--danger); }
.notification-list { list-style: none; padding: 0; }
.notification-list li { background: var(--card); padding: 1rem; margin-bottom: 0.5rem; border-radius: var(--radius); }
.notification-list li.unread { border-left: 3px solid var(--brand); }
.pagination { display: flex; gap: 0.25rem; margin-top: 1rem; }
.page-link { padding: 0.35rem 0.6rem; text-decoration: none; border-radius: var(--radius); }
.page-link.active { background: var(--brand); color: #fff; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split-brand { min-height: 240px; order: -1; }
  .app-shell { grid-template-columns: 1fr; grid-template-areas: "header" "content"; }
  .main-nav { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: 2px 0 12px rgba(0,0,0,.1); }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .pipeline-board { flex-direction: column; }
}
