@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sora:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0D9B6A;
  --primary-dark: #087A53;
  --primary-light: #E8F7F1;
  --primary-glow: #10B97E;
  --primary-subtle: #F2FBF7;
  --cream: #FAFAF7;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --dark: #1A1A1A;
  --border: #e0e0e0;
  --text: #1A1A1A;
  --text-light: #555555;
  --text-muted: #888888;
  --gray-100: #F0F0ED;
  --gray-200: #DDDDD8;
  --gray-300: #C4C4C4;
  --gray-400: #AAAAAA;
  --gray-500: #888888;
  --gray-700: #555555;
  --gray-900: #2D2D2D;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.06);
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Sora", "Outfit", sans-serif;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-dark); text-decoration: none; }

/* ── Lucide icons ───────────────────────────────────── */
.nav-menu i[data-lucide],
.section-header i[data-lucide],
.page-header i[data-lucide],
.card h3 i[data-lucide] { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }

/* ── Header ─────────────────────────────────────────── */
.header {
  background: rgba(250,250,247,0.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  color: var(--dark);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 50;
}
.header h1 {
  font-family: var(--font-heading); font-size: 20px; font-weight: 800; letter-spacing: -0.5px; text-transform: none;
}
.header h1 span { color: var(--primary); }
.header-actions { display: flex; gap: 16px; align-items: center; }
.header-actions a {
  color: var(--gray-700); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: color .2s;
}
.header-actions a:hover { color: var(--primary); }
.header-actions button {
  background: none; border: none; color: var(--gray-700); cursor: pointer; font-size: 13px;
  font-weight: 500; font-family: var(--font); transition: color .2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.header-actions button:hover { color: var(--primary); text-decoration: none; }
.header-actions button i[data-lucide] { width: 16px; height: 16px; }

.header-nav-links { display: flex; gap: 24px; align-items: center; }
.header-nav-links a { color: var(--gray-700); font-size: 0.88rem; font-weight: 450; transition: color .2s; }
.header-nav-links a:hover { color: var(--dark); }

/* ── Dashboard layout ───────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  gap: 24px;
  width: 100%;
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 16px;
}

/* ── Sidebar ────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.profile-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 22px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 4px 16px rgba(13,155,106,.15);
}
.profile-card .name { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.profile-card .role { font-size: 13px; opacity: .85; }
.profile-card .account { font-size: 12px; opacity: .7; margin-top: 6px; }

.address-card {
  background: var(--surface);
  padding: 14px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.7;
  border: 1px solid rgba(0,0,0,.05);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.address-card strong { color: var(--primary); }

.nav-menu { list-style: none; }
.nav-menu li {
  border-bottom: 1px solid var(--gray-100);
}
.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  border-radius: var(--radius-md);
  transition: all .25s ease;
}
.nav-menu li a:hover, .nav-menu li a.active {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ── Main content ───────────────────────────────────── */
.main { display: flex; flex-direction: column; gap: 24px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-header h2 { font-family: var(--font-heading); font-size: 15px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--primary); display: flex; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  transition: all .3s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(13,155,106,.25); }

/* ── Tables ─────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(0,0,0,.05); box-shadow: var(--shadow-sm); }
thead th {
  background: var(--dark);
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}
tbody td {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--primary-light); }

.amount-credit { color: var(--primary); font-weight: 600; }
.amount-debit  { color: #c0392b; font-weight: 600; }

/* ── Balance card ───────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--surface) 100%);
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(13,155,106,.1);
  box-shadow: var(--shadow-sm);
}
.balance-card .label { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.balance-card .amount { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--primary); }

/* ── Right sidebar cards ────────────────────────────── */
.right-sidebar { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface);
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,.05);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
}
.card p { font-size: 13px; line-height: 1.7; color: var(--gray-700); }
.card .detail { color: var(--text-light); font-size: 12px; margin-top: 4px; }

/* ── Login page ─────────────────────────────────────── */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-wrapper::before {
  content: ''; position: absolute; top: -20%; right: -10%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,155,106,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.login-wrapper::after {
  content: ''; position: absolute; bottom: -15%; left: -5%;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,155,106,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.login-box {
  background: var(--surface);
  padding: 44px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 40px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.05);
  position: relative; z-index: 1;
}
.login-box h2 {
  text-align: center;
  color: var(--dark);
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  font-weight: 800;
  text-transform: none;
}
.login-box h2 span { color: var(--primary); }
.login-subtitle { text-align: center; color: var(--gray-500); font-size: 0.9rem; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--gray-700); font-weight: 500; }
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color .2s ease, box-shadow .2s ease;
  background: var(--cream);
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,155,106,.1); outline: none; background: var(--surface); }
.login-box .btn { width: 100%; padding: 14px; font-size: 15px; border-radius: 50px; }
.login-error {
  color: #c0392b;
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  display: none;
}

/* ── Loading state ──────────────────────────────────── */
.loading { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ── Responsive (simple) ────────────────────────────── */
@media (max-width: 900px) {
  .dashboard { grid-template-columns: 1fr; }
  .header-nav-links { display: none; }
}

/* ── Status badges ──────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
}
.badge-open        { background: rgba(13,155,106,.12); color: var(--primary); }
.badge-in-progress { background: #fff3e0; color: #e65100; }
.badge-resolved    { background: var(--primary-light); color: var(--primary-dark); }
.badge-closed      { background: var(--gray-100); color: var(--gray-500); }

/* ── Footer ─────────────────────────────────────────── */
.main-footer {
  background: var(--dark);
  color: rgba(255,255,255,.5);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 0; align-items: center; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,.5); text-decoration: none; font-size: 12px; padding: 0 6px; white-space: nowrap; transition: color .2s; }
.footer-links a:hover { color: var(--primary-glow); }
.footer-sep { color: rgba(255,255,255,.15); font-size: 12px; }
.footer-left { white-space: nowrap; font-size: 13px; }
.footer-right { width: 80px; }

/* ── Animations ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .profile-card, .address-card, .balance-card, .main section {
  animation: fadeIn .5s ease both;
}
.main section:nth-child(2) { animation-delay: .1s; }
.main section:nth-child(3) { animation-delay: .2s; }
