/* public/style.css */
/* Deep Sea Theme - CSS Variables and Dark Mode support */

/* Base variables (Light mode) */
:root {
  --primary: #4361ee; /* Ocean Blue */
  --sidebar: #1e293b; /* Dark Slate */
  --background: #f8f9fc; /* Foam White */
  --card: #ffffff;
  --text: #333333;
  --muted: #6b7280;
  --accent-1: #ff7b7b;
  --accent-2: #ffd166;
  --accent-3: #06d6a0;
  --accent-4: #8ecae6;
  --border-radius: 8px;
  --card-shadow: 0 6px 18px rgba(30,41,59,0.06);
  --left-border-width: 5px;
  --max-width: 1100px;
}

/* Dark mode variables */
:root[data-theme='dark'] {
  --primary: #6ea0ff;
  --sidebar: #0f1724;
  --background: #0b1220;
  --card: #0f1724;
  --text: #e6eef8;
  --muted: #9aa7bf;
  --card-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* Global styles */
* { box-sizing: border-box; }
html,body,#app { height: 100%; margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; background: var(--background); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Top nav */
.topnav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  position: sticky;
  top: 0;
  z-index: 40;
}
.topnav .brand { display:flex; align-items:center; gap:10px; font-weight:600; color:var(--primary); }
.topnav .brand i { font-size:20px; transform: rotate(-10deg); }
.top-actions { display:flex; gap:8px; align-items:center; }

/* Layout */
.layout { display:flex; max-width: var(--max-width); margin: 20px auto; gap: 20px; padding: 0 16px; }
.sidebar {
  width: 220px;
  background: var(--sidebar);
  color: #fff;
  border-radius: var(--border-radius);
  padding: 16px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height: calc(100vh - 120px);
  box-shadow: var(--card-shadow);
}
.sidebar nav ul { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.sidebar nav a { display:flex; gap:10px; align-items:center; padding:10px; border-radius:6px; color: #e6eef8; }
.sidebar nav a:hover { background: rgba(255,255,255,0.03); }
.sidebar-footer { margin-top: 16px; }
.user-info { display:flex; gap:10px; align-items:center; }
.avatar { width:44px; height:44px; border-radius:8px; background: rgba(255,255,255,0.06); display:flex; align-items:center; justify-content:center; }
.user-info .meta { font-size:13px; color: #e6eef8; }
.tier { font-size:12px; color: var(--muted); }

/* Content */
.content { flex:1; min-height: 60vh; }
.container { background: transparent; padding: 12px; }

/* Cards */
.card { background: var(--card); border-radius: 8px; box-shadow: var(--card-shadow); padding: 14px; display:flex; gap:12px; align-items:flex-start; }
.card + .card { margin-top: 12px; }
.card .card-left { width: 8px; border-radius: 4px; margin-right: 12px; }
.workflow-card { align-items:stretch; }
.workflow-card .card-left { width: var(--left-border-width); border-radius: 4px 0 0 4px; }
.card-body { flex:1; }
.card-title { font-weight:600; margin-bottom:6px; }
.card-sub { color:var(--muted); font-size:13px; margin-bottom:8px; }
.card-actions { display:flex; gap:8px; }

/* Buttons */
.btn { background: var(--primary); color: #fff; border: none; padding: 8px 12px; border-radius: 6px; font-weight:600; }
.btn.small { padding:6px 8px; font-size:13px; }
.btn.outline { background: transparent; color: var(--primary); border: 1px solid rgba(67,97,238,0.12); }
.icon-btn { background: transparent; color: var(--text); border: none; padding:8px; }

/* Forms */
.form { display:flex; flex-direction:column; gap:10px; max-width:720px; }
.input, textarea, select { padding:10px; border-radius:6px; border:1px solid rgba(0,0,0,0.06); background: transparent; color: var(--text); }
textarea { min-height:120px; resize:vertical; }

/* Search */
.search-bar { display:flex; gap:8px; align-items:center; margin-bottom:12px; }
.search-bar input { flex:1; }

/* Modal */
.modal-overlay { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background: rgba(2,6,23,0.5); z-index:100; }
.modal { width: 720px; max-width:95%; background: var(--card); border-radius:8px; padding:12px; box-shadow: var(--card-shadow); }
.modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.modal-body { max-height:60vh; overflow:auto; margin-bottom:8px; }
.hidden { display:none; }

/* Responsive */
@media (max-width: 900px) {
  .layout { flex-direction:column; padding: 0 12px; }
  .sidebar { width:100%; min-height:auto; order:2; }
  .content { order:1; }
}

/* Department colors (left border) */
[data-dept="Marketing"] { --dept-color: var(--accent-4); }
[data-dept="Finance"] { --dept-color: var(--accent-2); }
[data-dept="HR"] { --dept-color: var(--accent-3); }
[data-dept="Sales"] { --dept-color: var(--accent-1); }
[data-dept="Operations"] { --dept-color: #b197fc; }
[data-dept="Legal"] { --dept-color: #ffb4a2; }

/* Apply left border color */
.card-left { background: var(--dept-color, var(--primary)); }

/* Utility */
.muted { color: var(--muted); font-size:13px; }
.small { font-size:13px; }
.center { text-align:center; }
