:root {
  color-scheme: dark;
  --ink: #eef3ef;
  --muted: #a8b5ab;
  --subtle: #7d8b81;
  --line: #303c34;
  --line-strong: #536459;
  --paper: #101412;
  --panel: #181e1a;
  --panel-raised: #212a24;
  --green: #91d5aa;
  --green-dark: #b0edc2;
  --green-ink: #102016;
  --mint: #1f3528;
  --danger: #ffaaa3;
  --shadow: 0 18px 45px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 'DM Sans', sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
[hidden] { display: none !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 29px 22px 22px; width: 240px; flex-shrink: 0; }
.brand, .mobile-brand { align-items: center; color: var(--ink); display: flex; font: 700 21px 'Space Grotesk', sans-serif; gap: 9px; text-decoration: none; }
.brand-mark { align-items: center; background: var(--green); border-radius: 8px; color: var(--green-ink); display: inline-flex; font-size: 17px; height: 29px; justify-content: center; width: 29px; }
.eyebrow { color: var(--subtle); font-size: 10px; font-weight: 700; letter-spacing: .14em; margin: 0; text-transform: uppercase; }
.sidebar-label { margin: 58px 12px 14px; }
.nav { display: grid; gap: 6px; }
.nav-link { align-items: center; border-radius: 8px; color: var(--muted); display: flex; gap: 13px; padding: 11px 12px; text-decoration: none; }
.nav-link:hover { background: var(--panel-raised); color: var(--ink); }
.nav-link.active { background: var(--mint); color: var(--green); font-weight: 600; }
.nav-link b { background: var(--green); border-radius: 20px; color: var(--green-ink); font-size: 9px; margin-left: auto; padding: 2px 6px; text-transform: uppercase; }
.sidebar-bottom { margin-top: auto; }
.profile { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 9px; padding: 18px 4px 0; position: relative; }
.avatar { align-items: center; background: var(--mint); border-radius: 50%; color: var(--green); display: flex; font-size: 11px; font-weight: 700; height: 31px; justify-content: center; width: 31px; }
.profile strong, .profile small { display: block; font-size: 11px; }
.profile small { color: var(--subtle); font-size: 10px; margin-top: 1px; }
.profile button { background: transparent; color: var(--muted); margin-left: auto; }
.main-content { margin: 0 auto; max-width: 1440px; padding: 0 52px 70px; width: 100%; }
.topbar { align-items: center; display: flex; height: 75px; justify-content: flex-end; }
.mobile-brand { display: none; }
.sync-status, .applications-count { color: var(--muted); font-size: 11px; }
.status-dot { background: var(--green); border-radius: 50%; display: inline-block; height: 6px; margin-right: 5px; width: 6px; }
.hero { align-items: end; display: flex; justify-content: space-between; padding: 38px 0 36px; }
.hero h1 { font: 600 clamp(30px, 3vw, 42px)/1.15 'Space Grotesk', sans-serif; letter-spacing: -.04em; margin: 11px 0 9px; }
.hero h1 #user-name { color: var(--ink); font-size: inherit; vertical-align: baseline; }
.hero-copy { color: var(--muted); margin: 0; }
.primary-button { background: var(--green); border-radius: 7px; color: var(--green-ink); font-weight: 700; padding: 12px 17px; transition: background .2s ease, transform .2s ease; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.stats-grid { display: grid; gap: 15px; grid-template-columns: repeat(4, 1fr); margin-bottom: 38px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-height: 139px; padding: 18px 20px; }
.stat-card.accent-card { background: var(--panel-raised); border-color: var(--line-strong); }
.stat-top { color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; }
.stat-card > strong { display: block; font: 600 31px 'Space Grotesk', sans-serif; margin-top: 13px; }
.stat-card p { color: var(--subtle); font-size: 10px; margin: 4px 0; }
.content-grid { align-items: start; display: grid; gap: 20px; grid-template-columns: minmax(0, 1.7fr) minmax(310px, 1fr); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); min-width: 0; padding: 23px 25px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; gap: 16px; }
.section-heading h1, .section-heading h2 { font: 600 20px 'Space Grotesk', sans-serif; letter-spacing: -.03em; margin: 7px 0 0; }
.section-heading h1 { font-size: 30px; }
.text-link, .applications-table td:nth-last-child(2) a, .jobs-card-link { color: var(--green); font-size: 11px; font-weight: 700; text-decoration: none; }
.text-link:hover, .applications-table td:nth-last-child(2) a:hover, .jobs-card-link:hover { color: var(--green-dark); text-decoration: underline; }
.text-link span { font-size: 17px; margin-left: 5px; }
.toolbar { display: flex; gap: 9px; margin: 22px 0 13px; }
.search-box { align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; display: flex; flex: 1; gap: 7px; padding: 0 10px; }
.search-box:focus-within { border-color: var(--green); }
.search-box input { background: transparent; border: 0; color: var(--ink); min-width: 0; outline: 0; padding: 9px 0; width: 100%; }
.toolbar select, .status-select { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); font-size: 11px; padding: 0 9px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 600px; width: 100%; }
th { color: var(--muted); font-size: 9px; font-weight: 600; padding: 8px 7px; text-align: left; text-transform: uppercase; }
td { border-top: 1px solid var(--line); font-size: 11px; padding: 13px 7px; vertical-align: middle; }
.company-cell { align-items: center; display: flex; gap: 10px; min-width: 180px; }
.company-logo { align-items: center; background: var(--panel-raised); border-radius: 7px; color: var(--green); display: flex; font-size: 11px; font-weight: 700; height: 29px; justify-content: center; width: 29px; }
.role, .date-cell, .next-step { color: var(--muted); }
.role { font-size: 10px; margin-top: 1px; }
.status { border-radius: 20px; display: inline-block; font-size: 9px; font-weight: 700; padding: 4px 8px; }
.status-Applied { background: #203a2a; color: #a4e0b4; }
.status-Interview { background: #302c46; color: #c7b9f5; }
.status-Offer { background: #483c21; color: #f0d184; }
.status-Rejected { background: #482927; color: #ffaaa3; }
.status-Wishlist, .status-Saved, .status-unknown { background: #2b3330; color: #b9c5bd; }
.row-actions { align-items: center; background: transparent; border-radius: 6px; color: var(--muted); display: inline-flex; font-size: 15px; height: 28px; justify-content: center; letter-spacing: 2px; line-height: 1; padding: 0; width: 28px; }
.row-actions:hover { background: var(--panel-raised); color: var(--ink); }
.jobs-meta { align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: 10px; gap: 9px; margin: 18px -25px 0; padding: 0 25px 14px; }
.icon-button { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--green); font-size: 11px; padding: 8px 10px; }
.icon-button:hover { background: var(--mint); border-color: var(--green); }
.jobs-list { display: grid; }
.job-card { border-bottom: 1px solid var(--line); padding: 16px 0; }
.job-card:last-child { border-bottom: 0; }
.job-top { align-items: start; display: flex; gap: 11px; }
.job-logo { align-items: center; background: var(--panel-raised); border-radius: 8px; color: var(--ink); display: flex; flex: 0 0 auto; font-size: 11px; font-weight: 700; height: 32px; justify-content: center; width: 32px; }
.job-title { font-size: 12px; font-weight: 700; margin: 0; }
.job-company { color: var(--muted); font-size: 10px; margin-top: 2px; }
.job-date { color: var(--muted); font-size: 10px; margin-left: auto; white-space: nowrap; }
.job-details { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 10px; gap: 10px; margin: 9px 0 0 43px; }
.job-details a { color: var(--green); font-weight: 700; text-decoration: none; }
.jobs-footnote { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 6px 0 0; }
.empty-state { color: var(--muted); padding: 35px; text-align: center; }
.modal { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 13px; box-shadow: 0 20px 80px rgba(0, 0, 0, .5); color: var(--ink); max-height: calc(100vh - 32px); max-width: 540px; overflow: auto; padding: 0; width: calc(100% - 32px); }
.modal::backdrop { background: rgba(4, 8, 5, .72); }
.modal form { padding: 26px; }
.modal-heading { align-items: start; display: flex; justify-content: space-between; margin-bottom: 21px; }
.modal-heading h2 { font: 600 23px 'Space Grotesk', sans-serif; margin: 5px 0 0; }
.close-button { background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid label, .login-form label, .jobs-search-field span { color: var(--muted); font-size: 11px; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea, .login-form input, .jobs-search-field input { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); display: block; margin-top: 5px; outline-color: var(--green); padding: 9px; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
.form-grid textarea { resize: vertical; }
.full-width { grid-column: 1 / -1; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 23px; }
.secondary-button { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); padding: 10px 16px; }
.secondary-button:hover, .edit-button:hover, .delete-button:hover { background: var(--mint); border-color: var(--green); }
.toast { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 7px; bottom: 24px; color: var(--ink); left: 50%; opacity: 0; padding: 11px 16px; pointer-events: none; position: fixed; transform: translate(-50%, 15px); transition: .2s; z-index: 5; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.auth-pending { visibility: hidden; }
.login-page { align-items: center; display: flex; justify-content: center; min-height: 100vh; padding: 24px; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-width: 420px; padding: 36px; width: 100%; }
.login-brand { margin-bottom: 52px; }
.login-card h1 { font: 600 30px/1.15 'Space Grotesk', sans-serif; letter-spacing: -.04em; margin: 9px 0; }
.login-copy, .login-switch { color: var(--muted); }
.login-copy { margin: 0 0 27px; }
.login-form { display: grid; gap: 8px; }
.login-form label { margin-top: 8px; }
.login-form input { padding: 11px; }
.login-form button { margin-top: 14px; width: 100%; }
.login-message { color: var(--muted); font-size: 12px; min-height: 18px; margin: 3px 0 0; }
.login-error, .applications-message-error, .jobs-message-error { color: var(--danger); }
.profile-menu { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 8px; bottom: 51px; box-shadow: var(--shadow); padding: 5px; position: absolute; right: 0; width: 100px; z-index: 10; }
.profile-menu button { background: transparent; border-radius: 5px; color: var(--muted); font-size: 11px; padding: 8px; text-align: left; width: 100%; }
.profile-menu button:hover { background: var(--mint); color: var(--green); }
.login-switch { font-size: 12px; margin: 19px 0 0; text-align: center; }
.login-link { color: var(--green); font-weight: 700; text-decoration: none; }
.auth-divider { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 10px; margin: 19px 0 0; }
.auth-divider::before, .auth-divider::after { background: var(--line); content: ''; flex: 1; height: 1px; }
.google-button { align-items: center; background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); display: flex; font-weight: 600; gap: 10px; justify-content: center; margin-top: 14px; padding: 11px 16px; width: 100%; }
.google-button:hover { background: var(--mint); border-color: var(--green); }
.google-button:disabled { cursor: wait; opacity: .65; }
.google-button svg { height: 18px; width: 18px; }
.applications-page { margin: 0 auto; max-width: 1200px; min-height: 100vh; padding: 32px 52px 70px; }
.applications-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 42px; }
.applications-header-actions { align-items: center; display: flex; gap: 16px; }
.applications-page h1 { font: 600 30px 'Space Grotesk', sans-serif; letter-spacing: -.04em; margin: 7px 0 0; }
.applications-table { min-width: 980px; }
.status-select { border: 0; cursor: pointer; outline-color: var(--green); padding: 4px 22px 4px 8px; }
.applications-message, .jobs-message { color: var(--green); font-size: 11px; min-height: 17px; margin: 0 0 10px; }
.application-actions { display: flex; gap: 5px; }
.edit-button, .delete-button { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--green); font-size: 16px; height: 29px; line-height: 1; width: 29px; }
.delete-button { color: var(--danger); }
.applications-table th:last-child, .applications-table td:last-child { white-space: nowrap; }
.applications-table tbody tr { background: var(--panel); transition: background .15s ease; }
.applications-table tbody tr:nth-child(even) { background: #1b241f; }
.applications-table tbody tr:hover { background: var(--panel-raised); }
.jobs-page { max-width: 1200px; }
.jobs-empty-panel { margin-top: 42px; max-width: 760px; padding: 48px; }
.jobs-empty-panel h1, .jobs-board-panel h1 { font: 600 32px 'Space Grotesk', sans-serif; letter-spacing: -.04em; margin: 10px 0; }
.jobs-empty-copy { color: var(--muted); max-width: 520px; }
.jobs-empty-status { background: var(--mint); border-radius: 20px; color: var(--green); display: inline-block; font-size: 10px; font-weight: 700; margin-top: 14px; padding: 5px 10px; }
.jobs-search { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0 5px; }
.jobs-search-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.jobs-search-field input { padding: 9px 10px; }
.jobs-search-field input::placeholder { color: var(--subtle); }
.jobs-pagination { align-items: center; display: flex; gap: 16px; justify-content: center; margin: 25px 0 5px; }
.jobs-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.jobs-pagination span { color: var(--muted); font-size: 11px; font-weight: 600; min-width: 52px; text-align: center; }
.jobs-board-panel { margin-top: 42px; }
.database-job-card { background: #1b241f; border: 1px solid var(--line); border-radius: 9px; margin-top: 12px; padding: 22px 20px; }
.database-job-card:hover { background: var(--panel-raised); }
.database-job-card .job-logo { font-size: 12px; height: 40px; width: 40px; }
.database-job-card .job-logo-image { background: #f4f7f4; }
.database-job-card .job-logo-image img { display: block; height: 24px; object-fit: contain; width: 24px; }
.database-job-card .job-title { font-size: 14px; }
.database-job-card .job-company { color: var(--muted); font-size: 12px; font-weight: 700; margin-top: 3px; }
.database-job-card .job-details { font-size: 11px; margin-left: 51px; }
.jobs-card-links { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.jobs-card-links .jobs-card-link { color: var(--green-dark); }
.jobs-card-links .jobs-card-link:hover { color: var(--ink); }
.jobs-card-link.unavailable { color: var(--muted); font-weight: 400; }
.apply-button { background: var(--green); border-radius: 6px; color: var(--green-ink); font-size: 10px; font-weight: 700; padding: 5px 9px; text-decoration: none; }
.job-details .apply-button { color: var(--green-ink); }
.apply-button:hover, .job-details .apply-button:hover { background: var(--green-dark); color: var(--green-ink); }
.diagnostic-page { min-height: 100vh; padding: 32px; }
.diagnostic-panel { margin: 0 auto; max-width: 760px; }
.diagnostic-panel h1 { font: 600 32px 'Space Grotesk', sans-serif; margin: 8px 0 24px; }
.diagnostic-panel label { color: var(--muted); display: grid; gap: 5px; }
.diagnostic-panel input { background: var(--panel-raised); border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); padding: 10px; }
.diagnostic-panel button { background: var(--green); border-radius: 7px; color: var(--green-ink); padding: 10px 14px; }
.diagnostic-status { color: var(--muted); }
.diagnostic-error { color: var(--danger); }
.diagnostic-results { background: var(--panel-raised); border: 1px solid var(--line); border-radius: 8px; max-height: 50vh; overflow: auto; padding: 14px; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1050px) { .main-content { padding-left: 28px; padding-right: 28px; } .content-grid { grid-template-columns: 1fr; } .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  .sidebar { display: none; } .main-content { padding: 0 16px 40px; } .topbar { height: 60px; justify-content: space-between; } .mobile-brand { display: flex; font-size: 17px; }
  .hero { align-items: start; flex-direction: column; gap: 22px; padding: 28px 0; } .hero h1 { font-size: 31px; } .stats-grid { gap: 9px; margin-bottom: 25px; } .stat-card { min-height: 120px; padding: 14px; } .stat-card > strong { font-size: 25px; margin-top: 9px; } .stat-card p { font-size: 9px; }
  .panel { padding: 18px 15px; } .section-heading { align-items: start; flex-direction: column; } .section-heading h2 { font-size: 18px; } .toolbar { flex-direction: column; } .toolbar select { height: 36px; } .jobs-meta { margin-left: -15px; margin-right: -15px; padding-left: 15px; padding-right: 15px; } .form-grid { grid-template-columns: 1fr; } .full-width { grid-column: auto; } .sync-status { font-size: 10px; }
  .applications-page { padding: 22px 16px 40px; } .applications-header { margin-bottom: 28px; } .applications-page h1 { font-size: 26px; } .applications-header-actions { align-items: flex-start; flex-direction: column; gap: 10px; } .jobs-empty-panel { margin-top: 20px; padding: 28px 20px; } .jobs-empty-panel h1, .jobs-board-panel h1 { font-size: 27px; } .jobs-board-panel { margin-top: 20px; } .database-job-card { padding: 18px 16px; } .database-job-card .job-logo { height: 38px; width: 38px; } .database-job-card .job-details { margin-left: 49px; } .jobs-search { gap: 8px; grid-template-columns: 1fr; } .job-date { white-space: normal; }
  .diagnostic-page { padding: 16px; }
}
