  :root {
    --blue: #3572B5;
    --blue-dark: #2558a0;
    --blue-light: #EBF2FC;
    --orange: #F99121;
    --orange-light: #FEF3E2;
    --slate: #1C2B3A;
    --slate-mid: #4A5C6B;
    --slate-light: #8D9BB0;
    --border: #DDE3EC;
    --bg: #F4F6F9;
    --white: #ffffff;
    --green: #22C55E;
    --red: #EF4444;
    --purple: #8B5CF6;
    --teal: #14B8A6;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Work Sans', sans-serif;
    background: var(--bg);
    color: var(--slate);
    min-height: 100vh;
  }

  /* ── LOGIN PAGE ── */
  .login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1C2B3A 0%, #2558a0 50%, #3572B5 100%);
    position: relative;
    overflow: hidden;
  }

  .login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(249, 145, 33, 0.08);
    top: -200px;
    right: -200px;
  }

  .login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    bottom: -150px;
    left: -100px;
  }

  .login-card {
    background: white;
    border-radius: 20px;
    padding: 52px 48px;
    width: 440px;
    position: relative;
    z-index: 1;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  }

  .login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

  .logo-mark {
    width: 40px;
    height: 40px;
    background: var(--blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .logo-mark::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background: var(--orange);
    border-radius: 4px;
  }

  .logo-mark svg {
    width: 20px;
    height: 20px;
    fill: white;
  }

  .logo-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--slate);
    letter-spacing: -0.5px;
  }

  .logo-name span { color: var(--orange); }

  .login-tagline {
    font-size: 13px;
    color: var(--slate-light);
    margin-bottom: 36px;
    font-weight: 400;
  }

  .login-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
  }

  .login-sub {
    font-size: 14px;
    color: var(--slate-mid);
    margin-bottom: 32px;
    line-height: 1.6;
  }

  .google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
  }

  .google-btn:hover {
    border-color: var(--blue);
    background: var(--blue-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(53,114,181,0.15);
  }

  .divider-text {
    text-align: center;
    font-size: 12px;
    color: var(--slate-light);
    margin: 20px 0;
    position: relative;
  }

  .divider-text::before, .divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border);
  }
  .divider-text::before { left: 0; }
  .divider-text::after { right: 0; }

  .email-input-wrap {
    margin-bottom: 12px;
  }

  .email-input-wrap input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: var(--slate);
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 10px;
  }

  .email-input-wrap input:focus { border-color: var(--blue); }

  .primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .primary-btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(53,114,181,0.3);
  }

  .login-footer-note {
    font-size: 12px;
    color: var(--slate-light);
    text-align: center;
    margin-top: 24px;
    line-height: 1.6;
  }

  .login-footer-note a { color: var(--blue); text-decoration: none; font-weight: 500; }

  /* ── MAIN APP ── */
  .app { display: none; flex-direction: column; min-height: 100vh; }
  .app.active { display: flex; }

  /* HEADER */
  .header {
    background: var(--blue);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  }

  .header-left { display: flex; align-items: center; gap: 16px; }

  .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .header-logo-mark {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .header-logo-mark::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--orange);
    border-radius: 3px;
  }

  .header-logo-mark svg { width: 16px; height: 16px; fill: white; }

  .header-logo-name {
    font-size: 18px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
  }

  .header-logo-name span { color: var(--orange); }

  .header-right { display: flex; align-items: center; gap: 12px; }

  .resume-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: white;
    font-family: 'Work Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .resume-btn:hover { background: rgba(255,255,255,0.25); }

  .resume-btn svg { width: 15px; height: 15px; }

  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.3);
  }

  .add-job-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--orange);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Work Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .add-job-btn:hover {
    background: #e8820f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,145,33,0.35);
  }

  /* ACCENT BAR */
  .accent-bar {
    height: 4px;
    background: var(--orange);
    width: 100%;
  }

  /* MAIN CONTENT */
  .main { flex: 1; padding: 32px; max-width: 1280px; margin: 0 auto; width: 100%; }

  /* STATS */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 28px;
  }

  .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: default;
  }

  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--slate-light);
    margin-bottom: 10px;
  }

  .stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--slate);
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-sub {
    font-size: 12px;
    color: var(--slate-light);
  }

  .stat-card.blue .stat-value { color: var(--blue); }
  .stat-card.orange .stat-value { color: var(--orange); }
  .stat-card.green .stat-value { color: var(--green); }
  .stat-card.red .stat-value { color: var(--red); }

  /* FILTERS */
  .filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }

  .search-wrap {
    flex: 1;
    min-width: 240px;
    position: relative;
  }

  .search-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--slate-light);
  }

  .search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: var(--slate);
    outline: none;
    background: white;
    transition: border-color 0.2s;
  }

  .search-input:focus { border-color: var(--blue); }

  .filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }

  .pill {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: white;
    color: var(--slate-mid);
    border-color: var(--border);
  }

  .pill:hover { border-color: var(--blue); color: var(--blue); }
  .pill.active { background: var(--blue); color: white; border-color: var(--blue); }
  .pill.saved.active { background: var(--slate); border-color: var(--slate); }
  .pill.interviewing.active { background: var(--orange); border-color: var(--orange); }
  .pill.offer.active { background: var(--green); border-color: var(--green); }
  .pill.rejected.active { background: var(--red); border-color: var(--red); }

  /* JOBS GRID */
  .jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
  }

  .job-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
  }

  .job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border);
    transition: background 0.2s;
  }

  .job-card.saved::before { background: var(--slate-mid); }
  .job-card.applied::before { background: var(--blue); }
  .job-card.interviewing::before { background: var(--orange); }
  .job-card.offer::before { background: var(--green); }
  .job-card.rejected::before { background: var(--red); }

  .job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-color: transparent;
  }

  .job-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-left: 12px;
  }

  .job-company-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--blue);
    flex-shrink: 0;
    margin-right: 12px;
  }

  .job-title-wrap { flex: 1; }

  .job-company {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
  }

  .job-position {
    font-size: 16px;
    font-weight: 700;
    color: var(--slate);
    letter-spacing: -0.3px;
    line-height: 1.3;
  }

  .job-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .job-card:hover .job-card-actions { opacity: 1; }

  .action-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
  }

  .action-icon-btn.edit { background: var(--blue-light); color: var(--blue); }
  .action-icon-btn.edit:hover { background: var(--blue); color: white; }
  .action-icon-btn.delete { background: #FEECEC; color: var(--red); }
  .action-icon-btn.delete:hover { background: var(--red); color: white; }

  .action-icon-btn svg { width: 13px; height: 13px; }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    margin-left: 12px;
  }

  .status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  .badge-saved { background: #F1F3F6; color: var(--slate-mid); }
  .badge-applied { background: var(--blue-light); color: var(--blue); }
  .badge-interviewing { background: var(--orange-light); color: #c47310; }
  .badge-offer { background: #DCFCE7; color: #16a34a; }
  .badge-rejected { background: #FEECEC; color: #dc2626; }

  .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 12px;
    margin-bottom: 12px;
  }

  .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--slate-mid);
  }

  .meta-item svg { width: 13px; height: 13px; color: var(--slate-light); }

  .job-notes {
    background: var(--bg);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--slate-mid);
    line-height: 1.6;
    margin-left: 12px;
  }

  /* EMPTY STATE */
  .empty-state {
    text-align: center;
    padding: 80px 32px;
    grid-column: 1 / -1;
  }

  .empty-icon {
    width: 72px;
    height: 72px;
    background: var(--blue-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
  }

  .empty-icon svg { width: 32px; height: 32px; color: var(--blue); }

  .empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 8px;
  }

  .empty-sub {
    font-size: 14px;
    color: var(--slate-light);
    margin-bottom: 24px;
  }

  /* MODAL */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28,43,58,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
  }

  .modal-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .modal {
    background: white;
    border-radius: 18px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.25s;
  }

  .modal-overlay.active .modal { transform: translateY(0); }

  .modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 18px 18px 0 0;
    z-index: 1;
  }

  .modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate);
    letter-spacing: -0.3px;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg);
    color: var(--slate-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.15s;
  }

  .modal-close:hover { background: var(--border); }

  .modal-body { padding: 24px 28px; }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .form-full { grid-column: 1 / -1; }

  .form-group { display: flex; flex-direction: column; gap: 6px; }

  .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-mid);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .form-input, .form-select, .form-textarea {
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    color: var(--slate);
    outline: none;
    transition: border-color 0.2s;
    background: white;
  }

  .form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--blue); }

  .form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

  .form-select { appearance: none; cursor: pointer; }

  .modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }

  .btn-cancel {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: white;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-mid);
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-cancel:hover { border-color: var(--slate-mid); color: var(--slate); }

  .btn-save {
    padding: 10px 24px;
    background: var(--blue);
    border: none;
    border-radius: 10px;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.15s;
  }

  .btn-save:hover { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(53,114,181,0.3); }

  /* RESUME MODAL */
  .resume-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

  .resume-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border);
  }

  .resume-icon {
    width: 36px;
    height: 36px;
    background: var(--blue-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .resume-icon svg { width: 18px; height: 18px; color: var(--blue); }

  .resume-info { flex: 1; min-width: 0; }
  .resume-name { font-size: 13px; font-weight: 600; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .resume-size { font-size: 11px; color: var(--slate-light); }

  .resume-actions { display: flex; gap: 6px; }

  .resume-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
  }

  .resume-action-btn.dl { background: var(--blue-light); color: var(--blue); }
  .resume-action-btn.dl:hover { background: var(--blue); color: white; }
  .resume-action-btn.rm { background: #FEECEC; color: var(--red); }
  .resume-action-btn.rm:hover { background: var(--red); color: white; }
  .resume-action-btn svg { width: 13px; height: 13px; }

  .storage-bar-wrap { margin-top: 16px; }
  .storage-label { font-size: 12px; color: var(--slate-mid); margin-bottom: 6px; display: flex; justify-content: space-between; }
  .storage-bar { height: 6px; background: var(--border); border-radius: 10px; overflow: hidden; }
  .storage-fill { height: 100%; background: var(--blue); border-radius: 10px; width: 14%; transition: width 0.5s; }

  .upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
  }

  .upload-zone:hover { border-color: var(--blue); background: var(--blue-light); }
  .upload-zone p { font-size: 13px; color: var(--slate-mid); margin-top: 8px; }
  .upload-zone strong { color: var(--blue); }

  /* GZ FOOTER STRIP */
  .gz-strip {
    background: var(--slate);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .gz-strip-left { font-size: 12px; color: var(--slate-light); }
  .gz-strip-left strong { color: white; }
  .gz-strip-right { font-size: 11px; color: var(--slate-light); }

  /* NOTIFICATION */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--slate);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  .toast.show { transform: translateY(0); opacity: 1; }
  .toast-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }

  @media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .main { padding: 20px 16px; }
    .header { padding: 0 16px; }
  }