/* =========================================================
   CareerPro — Green Theme Professional Stylesheet
   ========================================================= */
:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #d1fae5;
  --primary-50: #ecfdf5;
  --accent: #10b981;
  --dark: #111827;
  --gray-900: #1f2937;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --success: #059669;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- Nav ---- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: .75rem 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-size: 1.35rem; font-weight: 800; color: var(--primary);
  display: flex; align-items: center; gap: .5rem;
}
.nav-brand span { color: var(--gray-900); }
.nav-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--gray-700); font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links .btn-sm {
  padding: .4rem 1rem; font-size: .85rem; border-radius: 8px;
}

/* Mobile hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .25rem; }
.hamburger svg { width: 28px; height: 28px; stroke: var(--gray-700); }

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; flex-direction: column; gap: .75rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-300);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
}

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem; border-radius: 8px; font-weight: 600;
  font-size: .95rem; border: none; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; color: var(--white); }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---- Cards ---- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.75rem;
  border: 1px solid var(--gray-300);
}
.card-header { margin-bottom: 1.25rem; }
.card-header h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--gray-900);
}
.card-header p { color: var(--gray-500); font-size: .9rem; margin-top: .25rem; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-weight: 600; font-size: .9rem;
  margin-bottom: .35rem; color: var(--gray-700);
}
.form-control {
  width: 100%; padding: .65rem .9rem; border: 1px solid var(--gray-300);
  border-radius: 8px; font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  background: var(--white);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236b7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }

/* ---- Alerts ---- */
.alert {
  padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem;
  font-size: .9rem; font-weight: 500;
}
.alert-success { background: var(--primary-light); color: var(--primary-dark); }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---- Hero ---- */
.hero {
  text-align: center; padding: 5rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--white) 50%, var(--primary-light) 100%);
}
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; color: var(--dark); }
.hero h1 .highlight { color: var(--primary); }
.hero p { font-size: 1.2rem; color: var(--gray-500); max-width: 640px; margin: 1rem auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 3rem 1rem; }
}

/* ---- Feature Grid ---- */
.features-section { padding: 4rem 0; }
.features-section h2 { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.features-section .subtitle { text-align: center; color: var(--gray-500); margin-bottom: 2.5rem; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
}
.feature-card {
  background: var(--white); border-radius: var(--radius); padding: 1.75rem;
  border: 1px solid var(--gray-300); transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p { color: var(--gray-500); font-size: .9rem; }

/* ---- Dashboard Stats ---- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 1.5rem;
  border: 1px solid var(--gray-300); text-align: center;
}
.stat-card .stat-value {
  font-size: 2rem; font-weight: 800; color: var(--primary);
}
.stat-card .stat-label {
  font-size: .85rem; color: var(--gray-500); font-weight: 500; margin-top: .25rem;
}

/* ---- Quick Links Grid ---- */
.quick-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-top: 1.5rem;
}
.quick-link {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem; background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-300); transition: all .2s;
  color: var(--gray-900); font-weight: 600; font-size: .95rem;
}
.quick-link:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: var(--shadow);
}
.quick-link .ql-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}

/* ---- Result Box ---- */
.result-box {
  background: var(--gray-100); border: 1px solid var(--gray-300);
  border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem;
  white-space: pre-wrap; font-size: .92rem; line-height: 1.7;
  max-height: 600px; overflow-y: auto;
}
.result-box strong, .result-box b { color: var(--primary-dark); }
.result-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .75rem;
}
.result-header h3 { font-size: 1.1rem; font-weight: 700; }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; max-width: 800px; margin: 2rem auto;
}
.pricing-card {
  background: var(--white); border-radius: var(--radius); padding: 2.5rem 2rem;
  border: 2px solid var(--gray-300); text-align: center;
  position: relative; transition: all .2s;
}
.pricing-card.featured {
  border-color: var(--primary); box-shadow: var(--shadow-xl);
  transform: scale(1.03);
}
.pricing-card.featured::before {
  content: "MOST POPULAR";
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: var(--white);
  padding: .25rem 1rem; border-radius: 20px; font-size: .75rem;
  font-weight: 700; letter-spacing: .05em;
}
.pricing-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin: 1rem 0; }
.pricing-card .price span { font-size: 1rem; font-weight: 500; color: var(--gray-500); }
.pricing-card ul {
  list-style: none; text-align: left; margin: 1.5rem 0;
}
.pricing-card ul li {
  padding: .4rem 0; font-size: .92rem; color: var(--gray-700);
  display: flex; align-items: flex-start; gap: .5rem;
}
.pricing-card ul li::before {
  content: "\2713"; color: var(--primary); font-weight: 700; flex-shrink: 0;
}

/* ---- Tracker Table ---- */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table {
  width: 100%; border-collapse: collapse;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-300);
}
th, td { padding: .75rem 1rem; text-align: left; font-size: .9rem; }
th {
  background: var(--primary-50); color: var(--gray-700);
  font-weight: 600; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .03em;
}
tr:not(:last-child) td { border-bottom: 1px solid var(--gray-100); }
tr:hover td { background: var(--primary-50); }
.status-badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 20px;
  font-size: .78rem; font-weight: 600;
}
.status-applied { background: #dbeafe; color: #1e40af; }
.status-interview { background: #fef3c7; color: #92400e; }
.status-offer { background: var(--primary-light); color: var(--primary-dark); }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-withdrawn { background: var(--gray-100); color: var(--gray-500); }

/* ---- Auth Pages ---- */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary-50), var(--white));
}
.auth-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-xl); padding: 2.5rem; width: 100%; max-width: 440px;
  border: 1px solid var(--gray-300);
}
.auth-card h2 { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: .25rem; }
.auth-card .auth-subtitle { text-align: center; color: var(--gray-500); margin-bottom: 1.5rem; font-size: .9rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--gray-500); }

/* ---- Page Header ---- */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--dark); }
.page-header p { color: var(--gray-500); margin-top: .25rem; }
.badge-pro {
  display: inline-block; background: var(--primary); color: var(--white);
  padding: .15rem .6rem; border-radius: 20px; font-size: .72rem;
  font-weight: 700; vertical-align: middle; margin-left: .5rem;
}
.badge-free {
  display: inline-block; background: var(--gray-300); color: var(--gray-700);
  padding: .15rem .6rem; border-radius: 20px; font-size: .72rem;
  font-weight: 700; vertical-align: middle; margin-left: .5rem;
}

/* ---- Two Column Layout ---- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.footer {
  background: var(--dark); color: var(--gray-300);
  text-align: center; padding: 2rem 1.5rem; font-size: .85rem;
  margin-top: auto;
}
.footer a { color: var(--accent); }

/* ---- Modal (for tracker edit) ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: var(--white); border-radius: var(--radius); padding: 2rem;
  width: 90%; max-width: 500px; box-shadow: var(--shadow-xl);
}
.modal-content h3 { margin-bottom: 1rem; font-size: 1.15rem; }

/* ---- Misc ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }

/* Copy button */
.btn-copy {
  background: var(--gray-100); border: 1px solid var(--gray-300);
  padding: .35rem .75rem; border-radius: 6px; cursor: pointer;
  font-size: .8rem; font-weight: 600; color: var(--gray-700);
  transition: all .2s;
}
.btn-copy:hover { background: var(--primary-light); color: var(--primary); }

/* Spinner */
.spinner {
  display: none; width: 20px; height: 20px;
  border: 3px solid var(--gray-300); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .6s linear infinite;
  margin-left: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading .spinner { display: inline-block; }
.loading .btn-text { opacity: .6; }
