/* AssignPad — Unified Design System
   Brand: Reckon Infotech
   Primary: #2da4c6 (teal), Accent: #21130d (dark brown), BG: #f5f5f5
*/

:root {
  --primary: #2da4c6;
  --primary-dark: #1f8aa5;
  --primary-light: #e7f4ed;
  --accent: #21130d;
  --accent-soft: #f3edea;
  --accent-hover: #3b241e;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #21130d;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2da4c6;
  --info-bg: #dbeafe;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--accent);
  color: #fff;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand .logo {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
}
.sidebar-brand .name { font-size: 18px; font-weight: 700; }
.sidebar-brand .subtitle { font-size: 11px; color: #b8a89e; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  color: #d6c9c0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.2s;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}
.sidebar-nav a.active {
  background: var(--primary);
  color: #fff;
}
.sidebar-nav .nav-icon { font-size: 16px; }

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 18px; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.topbar-user .user-info { line-height: 1.2; }
.topbar-user .user-name { font-weight: 600; }
.topbar-user .user-role { font-size: 12px; color: var(--text-muted); }

.page-content { padding: 24px; flex: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap; gap: 12px;
}
.card-title { font-size: 18px; font-weight: 600; }
.card + .card { margin-top: 20px; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-ghost { background: var(--accent-soft); color: var(--text); }
.btn-ghost:hover { background: #e5dbd4; color: var(--text); }

/* ---------- Forms ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-input,
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="password"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,164,198,0.1);
}
.form-help { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gray { background: #f3f4f6; color: var(--text-muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th {
  background: var(--accent);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
}
table.data td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table.data tr:hover td { background: #f9fafb; }

/* ---------- Messages ---------- */
.messages { position: fixed; top: 70px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  display: flex; justify-content: space-between; align-items: center;
}
.message.success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.message.info { background: var(--info-bg); color: var(--info); border-left: 4px solid var(--info); }
.message.warning { background: var(--warning-bg); color: var(--warning); border-left: 4px solid var(--warning); }
.message.danger { background: var(--danger-bg); color: var(--danger); border-left: 4px solid var(--danger); }
.message .close { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: 0.6; margin-left: 12px; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Auth pages (login/signup) ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f5f5 0%, #e7f4ed 100%);
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  overflow: hidden;
  animation: fadeUp 0.5s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.auth-header {
  background: var(--accent-soft);
  padding: 32px 24px;
  text-align: center;
}
.auth-header .logo-circle {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  background: var(--primary);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px; font-weight: 800;
  box-shadow: var(--shadow);
}
.auth-header h1 { font-size: 22px; color: var(--accent); }
.auth-header p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.auth-body { padding: 28px 24px; }
.auth-body .btn { width: 100%; justify-content: center; }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; margin-top: -8px; margin-bottom: 16px; }
.auth-footer { text-align: center; padding: 16px; background: #fafafa; font-size: 12px; color: var(--text-muted); }

/* ---------- Stat cards ---------- */
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 32px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.stat-card .trend { font-size: 12px; color: var(--success); margin-top: 6px; }

/* ---------- Project list ---------- */
.project-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
  flex-wrap: wrap;
}
.project-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.project-item h3 { font-size: 18px; color: var(--primary); }
.project-item .meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 12px; align-items: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.fw-600 { font-weight: 600; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .sidebar { width: 70px; padding: 16px 8px; }
  .sidebar-brand .name, .sidebar-brand .subtitle, .sidebar-nav a span:not(.nav-icon) { display: none; }
  .sidebar-nav a { justify-content: center; padding: 12px; }
  .page-content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .topbar-user .user-info { display: none; }
}
