/* CreditLift Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #00C853;
  --primary-dark: #00A844;
  --accent: #00E676;
  --white: #FFFFFF;
  --light-blue: #4FC3F7;
  --black: #1A1A1A;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --red: #EF4444;
  --red-light: #FEF2F2;
  --orange: #F59E0B;
  --orange-light: #FFFBEB;
  --green-light: #F0FFF4;
  --blue-light: #F0F9FF;
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--black);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-weight: 600;
  font-size: 15px; border: none; cursor: pointer;
  transition: var(--transition); font-family: inherit;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white); box-shadow: 0 4px 15px rgba(0,200,83,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,200,83,0.4);
  color: var(--white);
}
.btn-outline {
  background: transparent; border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { width: 100%; justify-content: center; }

/* Glass Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-solid { background: var(--white); backdrop-filter: none; }

/* Navigation */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 20px; height: 70px;
  display: flex; align-items: center;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--black); }
.navbar-logo svg { height: 36px; width: auto; }
.navbar-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.navbar-links a { color: var(--gray-600); font-weight: 500; font-size: 15px; }
.navbar-links a:hover { color: var(--primary); }
.navbar-links a.active { color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--black); margin: 6px 0; transition: var(--transition); }

/* Mobile Nav */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .navbar-links, .navbar-actions {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 20px;
    border-bottom: 1px solid var(--gray-200); gap: 16px;
  }
  .navbar-links.open, .navbar-actions.open { display: flex; }
}

/* Score Gauge */
.score-gauge {
  position: relative; width: 160px; height: 160px; margin: 0 auto;
}
.score-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-gauge .track { fill: none; stroke: var(--gray-200); stroke-width: 10; }
.score-gauge .fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }
.score-gauge .value {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.score-gauge .value .number { font-size: 36px; font-weight: 800; line-height: 1; }
.score-gauge .value .label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.score-gauge.sm { width: 120px; height: 120px; }
.score-gauge.sm .value .number { font-size: 28px; }
.score-gauge.lg { width: 200px; height: 200px; }
.score-gauge.lg .value .number { font-size: 48px; }

/* Badge */
.badge {
  display: inline-flex; padding: 4px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-green { background: var(--green-light); color: var(--primary-dark); }
.badge-blue { background: var(--blue-light); color: #0284C7; }
.badge-orange { background: var(--orange-light); color: #D97706; }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* Status dots */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.status-dot.green { background: var(--primary); }
.status-dot.orange { background: var(--orange); }
.status-dot.red { background: var(--red); }
.status-dot.blue { background: var(--light-blue); }

/* Form styles */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--gray-700); }
.form-input {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200);
  border-radius: var(--radius); font-family: inherit; font-size: 15px;
  transition: var(--transition); background: var(--white);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,83,0.1); }
.form-input.error { border-color: var(--red); }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; display: none; }
.form-input.error + .form-error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
th { font-weight: 600; color: var(--gray-500); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; background: var(--gray-50); }
tr:hover td { background: var(--gray-50); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab {
  padding: 12px 20px; cursor: pointer; font-weight: 500; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition);
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Dashboard layout */
.dash-layout { display: flex; min-height: 100vh; padding-top: 70px; }
.sidebar {
  width: 260px; background: var(--white); border-right: 1px solid var(--gray-200);
  padding: 24px 0; position: fixed; top: 70px; bottom: 0; overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  color: var(--gray-600); font-weight: 500; font-size: 14px; transition: var(--transition);
}
.sidebar-nav li a:hover { background: var(--gray-50); color: var(--primary); }
.sidebar-nav li a.active { background: var(--green-light); color: var(--primary-dark); border-right: 3px solid var(--primary); }
.sidebar-nav li a svg { width: 20px; height: 20px; flex-shrink: 0; }
.dash-main { flex: 1; margin-left: 260px; padding: 32px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 16px; }
}

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

/* Stat card */
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kanban-col { background: var(--gray-50); border-radius: var(--radius); padding: 16px; min-height: 300px; }
.kanban-col h4 { font-size: 13px; text-transform: uppercase; color: var(--gray-500); margin-bottom: 12px; letter-spacing: 0.5px; }
.kanban-card {
  background: var(--white); border-radius: var(--radius); padding: 14px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm); cursor: grab;
  border-left: 3px solid var(--primary); transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card .kc-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.kanban-card .kc-meta { font-size: 12px; color: var(--gray-500); }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .kanban { grid-template-columns: 1fr; } }

/* Notification bell */
.notif-bell { position: relative; cursor: pointer; padding: 8px; }
.notif-bell svg { width: 22px; height: 22px; color: var(--gray-600); }
.notif-bell .notif-count {
  position: absolute; top: 2px; right: 2px; background: var(--red);
  color: white; font-size: 10px; font-weight: 700; width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Progress bar */
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-bar .fill { height: 100%; border-radius: 4px; transition: width 1s ease; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.animate-in { animation: fadeInUp 0.6s ease forwards; }
.animate-fade { animation: fadeIn 0.4s ease forwards; }

/* Section spacing */
.section { padding: 80px 0; }
.section-title { font-size: 36px; font-weight: 800; margin-bottom: 16px; }
.section-subtitle { font-size: 18px; color: var(--gray-500); max-width: 600px; margin: 0 auto 48px; }
.text-center { text-align: center; }

/* Print */
@media print {
  .navbar, .sidebar, .btn, .no-print { display: none !important; }
  .dash-main { margin-left: 0 !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 2000; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-xl); animation: fadeInUp 0.3s ease;
}
.modal h3 { margin-bottom: 20px; }
.modal-close { float: right; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-400); }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  animation: slideIn 0.3s ease; display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--primary);
}
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--light-blue); }

/* Misc */
.divider { height: 1px; background: var(--gray-200); margin: 24px 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
