/* Harto Brand Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Harto Brand Colors */
  --bg: #ECE0D7;
  --bg-card: #FFFFFF;
  --text: #282625;
  --text-muted: #6B6460;
  --border: #D4C8C0;
  --primary: #713EFD;
  --primary-dim: rgba(113, 62, 253, 0.12);
  --primary-border: rgba(113, 62, 253, 0.3);
  --red: #FB3100;
  --green: #59B845;
  --yellow: #FFD915;
  --nav-bg: #282625;
  --nav-text: #ECE0D7;

  /* Legacy aliases for compatibility */
  --card: var(--bg-card);
  --muted: var(--text-muted);
  --cyan: var(--primary);
  --cyan-dim: var(--primary-dim);
  --cyan-border: var(--primary-border);
  --orange: #FF6B00;

  /* Chart colors */
  --chart-1: var(--primary);
  --chart-2: #9cdcfe;
  --chart-3: var(--yellow);
  --chart-4: var(--orange);
  --chart-5: var(--green);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'TT Commons Pro', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.mono {
  font-family: 'TT Commons Pro', 'JetBrains Mono', monospace;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  height: 28px;
}

.nav-brand img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  opacity: 1;
}

.nav-time {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: 'TT Commons Pro', 'JetBrains Mono', monospace;
}

.nav-day {
  color: var(--nav-text);
  opacity: 0.6;
  font-size: 0.85rem;
}

.nav-date {
  color: var(--nav-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-clock {
  color: var(--primary);
  font-size: 0.9rem;
}

/* Cards */
.card,
.widget,
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

/* Buttons */
.btn,
button[type="submit"],
button.primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover,
button[type="submit"]:hover,
button.primary:hover {
  background: #5f2dd9;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.btn-secondary:hover {
  background: var(--primary-dim);
}

/* Badges & Status */
.badge,
.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success,
.status-active,
.status-completed {
  background: var(--green);
  color: white;
}

.badge-warning,
.status-pending,
.status-in-progress {
  background: var(--yellow);
  color: var(--text);
}

.badge-error,
.status-failed,
.status-alert {
  background: var(--red);
  color: white;
}

.badge-info,
.badge-primary,
.status-info {
  background: var(--primary);
  color: white;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: 'TT Commons Pro', 'Inter', system-ui, sans-serif;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: var(--bg);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg: #1A1612;
  --bg-card: #282625;
  --text: #ECE0D7;
  --text-muted: #A09890;
  --border: #3D3630;
  --primary: #713EFD;
  --primary-dim: rgba(113, 62, 253, 0.2);
  --primary-border: rgba(113, 62, 253, 0.4);
  --red: #FB3100;
  --green: #59B845;
  --yellow: #FFD915;
  --nav-bg: #0F0D0B;
  --nav-text: #ECE0D7;
  --card: var(--bg-card);
  --muted: var(--text-muted);
}

/* Smooth transitions */
*, *::before, *::after {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--nav-text);
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--primary); }
