/* Grantium.ai: Minimalist enterprise design */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-secondary: #F1F3F6;
  --border: #E3E6EB;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 0 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar nav a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.sidebar nav a:hover { background: var(--surface-secondary); color: var(--text-primary); }
.sidebar nav a.active { color: var(--accent); border-left-color: var(--accent); background: var(--surface-secondary); font-weight: 600; }

/* Main */
.main {
  flex: 1;
  padding: 32px;
  max-width: 1200px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover { background: var(--surface-secondary); }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-meta { font-size: 12px; color: var(--text-secondary); }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-blocker { background: #FEE2E2; color: var(--danger); }
.badge-high { background: #FEF3C7; color: var(--warning); }
.badge-med { background: #E5E7EB; color: var(--text-secondary); }
.badge-low { background: #F3F4F6; color: #9CA3AF; }
.badge-pass { background: #D1FAE5; color: var(--success); }
.badge-warn { background: #FEF3C7; color: var(--warning); }
.badge-fail { background: #FEE2E2; color: var(--danger); }
.badge-draft { background: #DBEAFE; color: var(--accent); }
.badge-rejected { background: #FEE2E2; color: var(--danger); }
.badge-resubmitting { background: #FEF3C7; color: var(--warning); }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--text-secondary); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 12px; border-bottom: 1px solid var(--border); }
tr:hover { background: var(--surface-secondary); }

/* Forms */
input, select, textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; color: var(--text-secondary); }
.form-group { margin-bottom: 16px; }

/* Kanban */
.kanban { display: flex; gap: 16px; overflow-x: auto; }
.kanban-column { flex: 1; min-width: 250px; }
.kanban-column-header { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); padding: 8px 0; border-bottom: 2px solid var(--border); margin-bottom: 12px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; cursor: pointer; transition: box-shadow 0.15s; }
.kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.kanban-card-title { font-size: 13px; font-weight: 500; margin-top: 6px; }

/* Compliance checks */
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.check-icon { font-size: 20px; width: 28px; text-align: center; }
.check-name { font-weight: 600; font-size: 14px; }
.check-detail { font-size: 12px; color: var(--text-secondary); }

/* Overall status banner */
.status-banner { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; font-weight: 700; font-size: 16px; text-align: center; }
.status-banner.pass { background: #D1FAE5; color: var(--success); }
.status-banner.warn { background: #FEF3C7; color: var(--warning); }
.status-banner.fail { background: #FEE2E2; color: var(--danger); }

/* Drawer */
.drawer-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.3); z-index: 100; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; background: var(--surface); z-index: 101; box-shadow: -4px 0 16px rgba(0,0,0,0.1); padding: 24px; overflow-y: auto; transform: translateX(100%); transition: transform 0.2s; }
.drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); }

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s;
}
.upload-area:hover { border-color: var(--accent); }
.upload-area.dragover { border-color: var(--accent); background: #EFF6FF; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state h3 { font-size: 18px; color: var(--text-primary); margin-bottom: 8px; }

/* Auth pages */
.auth-container {
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh; background: var(--bg);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}
.auth-brand { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 8px; text-align: center; }
.auth-title { font-size: 18px; margin-bottom: 20px; text-align: center; }
.auth-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; display: none; padding: 8px 12px; background: #FEE2E2; border-radius: var(--radius); }
.auth-footer { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--accent); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Sidebar user section */
.sidebar { position: relative; }
.sidebar-user {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 12px;
}
.sidebar-user-name { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.sidebar-user a { color: var(--text-secondary); text-decoration: none; font-size: 12px; }
.sidebar-user a:hover { color: var(--danger); }

/* Utility */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-secondary); }
