/* dashboard.css — agenté. cSuite Dashboard */

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

:root {
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --bg: #0a0a0a;
  --bg-sidebar: #080808;
  --surface: #141414;
  --surface-raised: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #888;
  --coral: #e84118;
  --coral-dim: #c43514;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(136,153,170,0.12);
  --border-hover: rgba(136,153,170,0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Schibsted Grotesk', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .heading {
  font-family: var(--font-heading);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .brand {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--coral);
  letter-spacing: -0.02em;
}

.sidebar-header h2 {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* Venture switcher */
.venture-switcher {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.venture-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.venture-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.venture-btn.active {
  background: rgba(232,65,24,0.08);
  border-color: rgba(232,65,24,0.2);
  color: var(--coral);
}

.venture-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

/* Nav */
.sidebar-nav {
  padding: 12px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: rgba(232,65,24,0.08);
  color: var(--coral);
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-footer .user-info {
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar-footer .user-name {
  color: var(--text);
  font-weight: 500;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 8px;
}

.logout-btn:hover {
  color: var(--danger);
}

/* Main area */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.topbar-venture {
  color: var(--text);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Content */
.content {
  padding: 24px;
}

/* Section visibility */
.section {
  display: none;
}
.section.active {
  display: block;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card:hover {
  border-color: var(--border-hover);
}

.card-title {
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Activity feed */
.activity-feed {
  list-style: none;
}

.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
}

.activity-direction {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.activity-direction.inbound {
  background: rgba(232,65,24,0.12);
  color: var(--coral);
}

.activity-direction.outbound {
  background: rgba(34,197,94,0.12);
  color: var(--success);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.data-table tr:hover {
  background: rgba(255,255,255,0.02);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.badge-green { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-amber { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-coral { background: rgba(232,65,24,0.12); color: var(--coral); }

/* Filters */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-input, .filter-select {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--surface-raised);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--coral);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.page-btn:hover { border-color: var(--coral); }
.page-btn.active { background: var(--coral); color: #fff; border-color: var(--coral); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Settings form */
.settings-form {
  max-width: 480px;
}

.settings-form .form-group {
  margin-bottom: 20px;
}

.settings-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.settings-form input, .settings-form select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--surface-raised);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.settings-form input:focus {
  outline: none;
  border-color: var(--coral);
}

.btn-save {
  padding: 10px 24px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-save:hover { opacity: 0.9; }

/* Section title */
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 20px;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
