/* =====================================================================
   Premium theme — deep navy + champagne gold, Noto Sans Georgian
   ===================================================================== */
:root {
  --navy-950: #070d1b;
  --navy-900: #0d1528;
  --navy-800: #15203a;
  --navy-700: #1e2c4d;
  --navy-600: #2b3c66;
  --navy-100: #e8ebf4;
  --navy-50:  #f3f5fa;

  --gold-600: #a9843d;
  --gold-500: #c9a45c;
  --gold-400: #dcbf82;
  --gold-200: #f1e3c2;
  --gold-50:  #fbf7ee;

  --ink: #111827;
  --muted: #6b7385;
  --line: #e5e8f0;
  --bg: #f4f5f9;
  --card: #ffffff;

  --shadow-sm: 0 1px 2px rgba(13, 21, 40, .05);
  --shadow: 0 1px 2px rgba(13, 21, 40, .04), 0 8px 24px -8px rgba(13, 21, 40, .10);
  --shadow-lg: 0 2px 4px rgba(13, 21, 40, .04), 0 24px 48px -16px rgba(13, 21, 40, .22);
  --radius: 16px;

  --bs-body-font-family: 'Noto Sans Georgian', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-font-size: .95rem;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
  --bs-border-radius: .75rem;
  --bs-border-radius-sm: .55rem;
  --bs-border-radius-lg: 1rem;
  --bs-link-color: #2a4196;
  --bs-link-color-rgb: 42, 65, 150;
  --bs-link-hover-color: #1b2c6b;
  --bs-link-hover-color-rgb: 27, 44, 107;
  --bs-primary: #1e2c4d;
  --bs-primary-rgb: 30, 44, 77;
  --bs-secondary-color: var(--muted);
}

html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1200px 400px at 100% -10%, rgba(201, 164, 92, .08), transparent 60%),
    radial-gradient(900px 400px at -10% 0%, rgba(43, 60, 102, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: .005em;
}
.app-main { flex: 1 0 auto; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-muted { color: var(--muted) !important; }
::selection { background: var(--gold-200); }

/* ---------------------------------------------------------------- navbar */
.app-nav {
  background: linear-gradient(100deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  border-bottom: 1px solid rgba(201, 164, 92, .28);
  box-shadow: 0 6px 24px -12px rgba(7, 13, 27, .6);
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.app-nav .navbar-brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; letter-spacing: .02em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-900); font-size: 1.15rem;
  box-shadow: 0 4px 14px -4px rgba(201, 164, 92, .7), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.brand-name { color: #fff; font-size: 1.1rem; }
.app-nav .nav-link {
  color: rgba(255, 255, 255, .72);
  font-weight: 500;
  font-size: .9rem;
  border-radius: 10px;
  padding: .5rem .75rem !important;
  display: flex; align-items: center; gap: .45rem;
  position: relative; white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.app-nav .btn-gold { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1599.98px) {
  .app-nav .nav-link { padding: .5rem .55rem !important; font-size: .85rem; gap: .35rem; }
  .brand-name { font-size: 1rem; }
}
.app-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.app-nav .nav-link.active { color: #fff; background: rgba(255, 255, 255, .08); }
.app-nav .nav-link.active i { color: var(--gold-400); }
@media (min-width: 1200px) {
  .app-nav .nav-link.active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: -9px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  }
}
.app-nav .navbar-toggler { border-color: rgba(255, 255, 255, .2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-800));
  color: var(--gold-400); font-weight: 700; font-size: .85rem;
  border: 1.5px solid rgba(201, 164, 92, .6);
}
.user-link::after { margin-left: .2rem; }

/* ---------------------------------------------------------------- buttons */
.btn { font-weight: 600; border-radius: 11px; letter-spacing: .01em; }
.btn-lg { border-radius: 14px; padding: .8rem 1.25rem; font-size: 1.02rem; }
.btn-sm { border-radius: 9px; }
.btn-primary {
  --bs-btn-bg: var(--navy-800); --bs-btn-border-color: var(--navy-800);
  --bs-btn-hover-bg: var(--navy-700); --bs-btn-hover-border-color: var(--navy-700);
  --bs-btn-active-bg: var(--navy-900); --bs-btn-active-border-color: var(--navy-900);
  --bs-btn-disabled-bg: var(--navy-600); --bs-btn-disabled-border-color: var(--navy-600);
  --bs-btn-focus-shadow-rgb: 201, 164, 92;
  background-image: linear-gradient(180deg, var(--navy-600), var(--navy-800));
  box-shadow: 0 6px 16px -8px rgba(13, 21, 40, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-outline-primary {
  --bs-btn-color: var(--navy-700); --bs-btn-border-color: #cdd3e2; --bs-btn-bg: #fff;
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800);
  --bs-btn-active-bg: var(--navy-900); --bs-btn-active-border-color: var(--navy-900);
  --bs-btn-focus-shadow-rgb: 201, 164, 92;
}
.btn-outline-secondary {
  --bs-btn-color: #4b5367; --bs-btn-border-color: #d6dae5; --bs-btn-bg: #fff;
  --bs-btn-hover-color: var(--navy-900); --bs-btn-hover-bg: var(--navy-50); --bs-btn-hover-border-color: #c3c9d8;
  --bs-btn-active-bg: var(--navy-100); --bs-btn-active-color: var(--navy-900);
}
.btn-gold, .btn-warning {
  --bs-btn-color: var(--navy-950); --bs-btn-hover-color: var(--navy-950); --bs-btn-active-color: var(--navy-950);
  --bs-btn-bg: var(--gold-500); --bs-btn-border-color: var(--gold-500);
  --bs-btn-hover-bg: var(--gold-400); --bs-btn-hover-border-color: var(--gold-400);
  --bs-btn-active-bg: var(--gold-600); --bs-btn-active-border-color: var(--gold-600);
  --bs-btn-focus-shadow-rgb: 201, 164, 92;
  background-image: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 6px 18px -8px rgba(201, 164, 92, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-success {
  --bs-btn-bg: #17804a; --bs-btn-border-color: #17804a;
  --bs-btn-hover-bg: #12703f; --bs-btn-hover-border-color: #12703f;
  background-image: linear-gradient(180deg, #1f9a5b, #147343);
  box-shadow: 0 8px 20px -10px rgba(20, 115, 67, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-link { font-weight: 500; }
.btn-check + .btn-outline-primary, .btn-check + .btn-outline-warning { background: #fff; }
.btn-outline-warning {
  --bs-btn-color: #7a5a1c; --bs-btn-border-color: var(--gold-400);
  --bs-btn-hover-bg: var(--gold-500); --bs-btn-hover-border-color: var(--gold-500); --bs-btn-hover-color: var(--navy-950);
  --bs-btn-active-bg: var(--gold-500); --bs-btn-active-border-color: var(--gold-500); --bs-btn-active-color: var(--navy-950);
}
.btn-check:checked + .btn-outline-primary { background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); color: #fff; border-color: var(--navy-800); }
.btn-check:checked + .btn-outline-warning { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: var(--navy-950); border-color: var(--gold-500); }
.type-switch { background: var(--navy-50); padding: 6px; border-radius: 16px; gap: 6px; }
.type-switch .btn { border-radius: 12px !important; border-width: 0; }

/* ---------------------------------------------------------------- forms */
.form-label { font-weight: 600; font-size: .85rem; color: #394154; margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: 11px; border-color: #dadfe9; padding: .6rem .85rem; background-color: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control-lg { border-radius: 13px; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 .25rem rgba(201, 164, 92, .18);
}
.form-check-input:checked { background-color: var(--navy-800); border-color: var(--navy-800); }
.input-group-text { background: var(--navy-50); border-color: #dadfe9; color: var(--muted); border-radius: 11px; }
.form-text { color: var(--muted); }

/* ---------------------------------------------------------------- cards & surfaces */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
}
.card > .card-header:first-child { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card-header {
  background: transparent; border-bottom: 1px solid var(--line);
  font-weight: 700; padding: .9rem 1.25rem; color: var(--navy-800);
}
.card-header i { color: var(--gold-600); margin-right: .2rem; }
.card-footer { background: var(--navy-50); border-top: 1px solid var(--line); }
.card-body { padding: 1.25rem; }
.list-group-item { border-color: var(--line); }

.page-title { font-size: 1.55rem; font-weight: 800; color: var(--navy-900); margin: 0; letter-spacing: .01em; }
.page-title i { color: var(--gold-500); }
.page-sub { color: var(--muted); margin-top: .2rem; }

.section-title {
  display: flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 700; color: var(--navy-800);
  margin: .5rem 0 .85rem;
}
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(var(--gold-400), var(--gold-600)); }
.section-title .badge { background: var(--navy-100) !important; color: var(--navy-700); font-weight: 600; }

/* ---------------------------------------------------------------- stat cards */
.stat-card {
  display: block; padding: 1.15rem 1.25rem; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative; overflow: hidden; color: inherit;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: var(--tone-bg); opacity: .6;
}
.stat-card > * { position: relative; z-index: 1; }
.stat-card { height: 100%; }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; background: var(--tone-bg); color: var(--tone);
}
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--navy-900); }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 500; margin-top: .3rem; }
.tone-amber { --tone: #a86b00; --tone-bg: #fff3d6; }
.tone-red   { --tone: #b4232b; --tone-bg: #fde7e8; }
.tone-teal  { --tone: #0b7475; --tone-bg: #dcf3f2; }
.tone-navy  { --tone: var(--navy-700); --tone-bg: var(--navy-100); }

/* ---------------------------------------------------------------- badges */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 999px; padding: .38em .75em; }
.badge-status { font-size: .74rem; }
.st-new       { background: #fff3d6; color: #8a5a00; }
.st-assigned  { background: #e5ebff; color: #2440a8; }
.st-done      { background: #dcf3f2; color: #0b6b6c; }
.st-finished  { background: #e1f4e8; color: #17693a; }
.st-cancelled { background: #eef0f4; color: #5b6477; }
.st-failed    { background: #fde7e8; color: #a1261f; }
.badge-type { font-size: .74rem; }
.type-installation { background: var(--navy-100); color: var(--navy-700); }
.type-service { background: var(--gold-200); color: #6f5217; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.06); }

/* ---------------------------------------------------------------- job cards */
.job-card {
  display: block; position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .85rem 1rem .85rem 1.2rem; margin-bottom: .6rem;
  color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
}
.job-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #c6ccd9; }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d6dbe7; text-decoration: none; color: var(--ink); }
.job-card.st-new::before { background: #e3a008; }
.job-card.st-assigned::before { background: #3656c8; }
.job-card.st-done::before { background: #14a3a3; }
.job-card.st-finished::before { background: #1f9a5b; }
.job-card.st-cancelled { opacity: .7; }
.job-card { background-clip: padding-box; }
.job-card.st-new, .job-card.st-assigned, .job-card.st-done, .job-card.st-finished, .job-card.st-cancelled { background-color: #fff; color: var(--ink); }
.job-card-title { font-weight: 700; color: var(--navy-900); }
.job-time { display: inline-block; font-weight: 700; color: var(--gold-600); margin-right: .35rem; }
.job-card-line { font-size: .86rem; color: #394154; margin-top: .2rem; }
.job-card-line i { color: var(--gold-600); }
.job-card-desc { font-size: .83rem; color: var(--muted); }
.job-card-inst { font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------------- tables */
.table { --bs-table-hover-bg: #f7f8fc; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .75rem; border-color: var(--line); }
.table thead th, .table-light th {
  background: var(--navy-50) !important; color: #5a6275; font-weight: 600; font-size: .78rem;
  letter-spacing: .02em; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.jobs-table tr[data-href] { cursor: pointer; }
.jobs-table td a { font-weight: 700; }

/* ---------------------------------------------------------------- nav pills & tabs */
.nav-pills { gap: .35rem; background: #fff; padding: .35rem; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: inline-flex; max-width: 100%; }
.nav-pills .nav-link { color: #4b5367; font-weight: 600; font-size: .88rem; border-radius: 10px; padding: .5rem .95rem; }
.nav-pills .nav-link:hover { background: var(--navy-50); text-decoration: none; }
.nav-pills .nav-link.active { background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); color: #fff; box-shadow: 0 4px 12px -6px rgba(13, 21, 40, .8); }
.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link { border: 0; color: var(--muted); font-weight: 600; padding: .7rem 1rem; border-bottom: 2px solid transparent; border-radius: 0; }
.nav-tabs .nav-link:hover { color: var(--navy-800); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--navy-900); background: transparent; border-bottom-color: var(--gold-500); }

/* ---------------------------------------------------------------- alerts, dropdowns, modals */
.alert { border-radius: 14px; border: 1px solid transparent; box-shadow: var(--shadow-sm); font-weight: 500; }
.alert-success { background: #e9f7ef; color: #135c33; border-color: #c6ead5; }
.alert-danger  { background: #fdecec; color: #8e1f1b; border-color: #f6cfcd; }
.alert-warning { background: #fff7e3; color: #7a5200; border-color: #f4e0ae; }
.alert-info    { background: #eaf0fb; color: #22397f; border-color: #cfdaf3; }
.dropdown-menu { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: .4rem; }
.dropdown-item { border-radius: 9px; padding: .5rem .75rem; font-weight: 500; }
.dropdown-item i { margin-right: .35rem; color: var(--muted); }
.dropdown-item:active { background: var(--navy-800); }
.dropdown-header { font-size: .78rem; color: var(--muted); }
.modal-content { border-radius: 20px; border: 0; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom-color: var(--line); padding: 1.1rem 1.4rem; }
.modal-header .modal-title i { color: var(--gold-500); }
.modal-footer { border-top-color: var(--line); }
.pagination { --bs-pagination-active-bg: var(--navy-800); --bs-pagination-active-border-color: var(--navy-800); --bs-pagination-color: var(--navy-700); --bs-pagination-border-radius: 10px; gap: .25rem; }
.pagination .page-link { border-radius: 9px !important; }

/* ---------------------------------------------------------------- job page */
.job-hero {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  color: #fff; border-radius: 20px; padding: 1.4rem 1.5rem; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.job-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 164, 92, .35), transparent 70%);
}
.job-hero h1 { font-weight: 800; font-size: 1.5rem; margin: .35rem 0 0; }
.job-hero .hero-meta { color: rgba(255, 255, 255, .7); font-size: .9rem; margin-top: .25rem; }
.job-hero .btn-outline-primary, .job-hero .btn-outline-secondary {
  --bs-btn-color: #fff; --bs-btn-bg: rgba(255, 255, 255, .06); --bs-btn-border-color: rgba(255, 255, 255, .22);
  --bs-btn-hover-bg: rgba(255, 255, 255, .16); --bs-btn-hover-border-color: rgba(255, 255, 255, .35); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: rgba(255, 255, 255, .2); --bs-btn-active-color: #fff;
}
.job-hero > * { position: relative; z-index: 1; }
.job-details dt { font-weight: 500; color: var(--muted); font-size: .88rem; padding-top: .15rem; }
.job-details dd { font-weight: 500; margin-bottom: .8rem; }
.pre-wrap { white-space: pre-wrap; }

.stamp-list .list-group-item { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1.25rem; font-size: .88rem; }
.stamp-list .list-group-item span:first-child { color: var(--muted); }
.stamp-list .list-group-item span:last-child { font-weight: 600; text-align: right; }

.timeline { max-height: 520px; overflow-y: auto; padding: .5rem 1.25rem; }
.timeline .tl-item { position: relative; padding: .55rem 0 .55rem 1.4rem; border-left: 2px solid var(--line); margin-left: .35rem; font-size: .86rem; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -7px; top: .85rem; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold-500);
}
.timeline .tl-item:first-child::before { background: var(--gold-500); }
.timeline .tl-time { color: var(--muted); font-size: .78rem; }

/* Files */
.file-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.file-tile img, .file-tile video { display: block; width: 100%; height: 170px; object-fit: cover; background: var(--navy-900); }
.file-tile .file-meta { padding: .45rem .6rem; font-size: .76rem; }
.upload-zone {
  border: 2px dashed var(--gold-400); border-radius: 16px; padding: 1rem;
  background: linear-gradient(180deg, var(--gold-50), #fff);
}
.upload-zone label { cursor: pointer; }
.upload-zone .progress { background: var(--navy-100); border-radius: 99px; }
.upload-zone .progress-bar { background: linear-gradient(90deg, var(--navy-600), var(--navy-800)); }

/* Job form: fields per type */
#job-form[data-type="installation"] .only-service,
#job-form[data-type="service"] .only-installation { display: none !important; }

/* Color picker */
.color-pick input { display: none; }
.color-pick span { display: inline-block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .1s; }
.color-pick span:hover { transform: scale(1.1); }
.color-pick input:checked + span { box-shadow: 0 0 0 2px var(--navy-900); }

.placeholder-btn { background: var(--navy-50); border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; padding: .1rem .45rem; margin: 0 .2rem .3rem 0; font-family: ui-monospace, Consolas, monospace; color: var(--navy-700); }
.placeholder-btn:hover { background: var(--gold-200); border-color: var(--gold-400); }

/* ---------------------------------------------------------------- login / install */
body.auth-page {
  background:
    radial-gradient(700px 400px at 85% 10%, rgba(201, 164, 92, .28), transparent 60%),
    radial-gradient(600px 500px at 0% 100%, rgba(43, 60, 102, .9), transparent 60%),
    linear-gradient(140deg, var(--navy-950), var(--navy-800));
  background-attachment: fixed;
}
body.auth-page .app-main { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-box { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-brand { text-align: center; color: #fff; margin-bottom: 1.6rem; }
.auth-brand .brand-mark { width: 64px; height: 64px; border-radius: 18px; font-size: 1.9rem; margin-bottom: .9rem; }
.auth-brand h1 { font-weight: 800; font-size: 1.6rem; margin: 0; letter-spacing: .02em; }
.auth-brand p { color: rgba(255, 255, 255, .6); margin: .35rem 0 0; font-size: .92rem; }
.auth-card {
  background: rgba(255, 255, 255, .97); border-radius: 22px; padding: 2rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(201, 164, 92, .25);
}
.auth-card h2 { font-weight: 800; font-size: 1.2rem; color: var(--navy-900); }
.auth-foot { text-align: center; color: rgba(255, 255, 255, .45); font-size: .8rem; margin-top: 1.4rem; }
body.auth-page .alert { box-shadow: none; }

.narrow-box { max-width: 460px; margin: 0 auto; }

/* ---------------------------------------------------------------- footer */
.app-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 1rem 2rem; }

/* ---------------------------------------------------------------- calendar */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: rgba(201, 164, 92, .10); --fc-page-bg-color: #fff; --fc-neutral-bg-color: var(--navy-50); --fc-list-event-hover-bg-color: var(--navy-50); font-size: .88rem; }
.fc .fc-toolbar-title { font-size: 1.25rem; font-weight: 800; color: var(--navy-900); }
.fc .fc-button {
  background: #fff; color: var(--navy-700); border: 1px solid #d6dae5; font-weight: 600; border-radius: 10px !important;
  text-transform: none; box-shadow: none !important; padding: .4rem .8rem; margin: 0 .15rem !important;
}
.fc .fc-button:hover { background: var(--navy-50); color: var(--navy-900); border-color: #c3c9d8; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active {
  background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); color: #fff; border-color: var(--navy-800);
}
.fc .fc-button:disabled { opacity: .5; }
.fc .fc-col-header-cell-cushion { color: #5a6275; font-weight: 600; padding: .5rem 0; }
.fc .fc-daygrid-day-number { color: var(--navy-700); font-weight: 600; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--gold-500); color: var(--navy-950); border-radius: 8px; padding: 2px 7px; margin: 3px; }
.fc-event { cursor: pointer; border-radius: 7px !important; padding: 1px 3px; font-weight: 500; }
.fc .ev-done, .fc .ev-finished { opacity: .55; }
.fc .ev-finished .fc-event-title { text-decoration: line-through; }
.cal-legend span { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .2rem .7rem; margin: 0 .3rem .4rem 0; font-size: .8rem; font-weight: 500; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199.98px) {
  .app-nav .navbar-collapse { padding: .75rem 0 .25rem; }
  .app-nav .nav-link { padding: .65rem .75rem !important; }
}
@media (max-width: 767.98px) {
  .page-title { font-size: 1.3rem; }
  .card-body { padding: 1rem; }
  .job-hero { border-radius: 16px; padding: 1.1rem; }
  .fc .fc-toolbar { flex-wrap: wrap; gap: .35rem; }
  .fc .fc-toolbar-title { font-size: 1.05rem; }
  .auth-card { padding: 1.5rem; }
  .nav-pills { display: flex; }
}

/* ---------------------------------------------------------------- printing */
.print-sheet { background: #fff; padding: 1.75rem; margin-bottom: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.print-sheet header { border-bottom: 2px solid var(--navy-900) !important; }
.print-job { border: 1px solid #c9ceda; border-radius: 10px; padding: .6rem .85rem; margin-bottom: .8rem; page-break-inside: avoid; break-inside: avoid; }
.print-job .table { font-size: .88rem; }
.print-job .table > :not(caption) > * > * { padding: .2rem .4rem; }
.print-job .table th { color: #495057; font-weight: 600; background: transparent !important; white-space: normal; font-size: .85rem; }
.print-lines { height: 3.2em; border-bottom: 1px dotted #6c757d; font-size: .8rem; color: #6c757d; }

@media print {
  body { background: #fff !important; font-size: 10.5pt; display: block; }
  main { padding: 0 !important; max-width: none !important; }
  .print-sheet { border: 0; padding: 0; margin: 0; box-shadow: none; border-radius: 0; page-break-after: always; break-after: page; }
  .print-sheet:last-of-type { page-break-after: auto; break-after: auto; }
  a { text-decoration: none; color: inherit; }
  .card, .job-hero { border: 0; box-shadow: none; }
  .job-hero { background: #fff; color: #000; padding: 0; }
}

.text-app { color: var(--navy-900); }
.text-warning { color: var(--gold-600) !important; }
.print-job .table { table-layout: fixed; word-break: break-word; }

/* Camera buttons only on phones/tablets (touch); plain file picker on computers */
.desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) {
  .capture-only { display: none !important; }
  .desktop-only { display: inline; }
}
.upload-zone .btn-gold { line-height: 1.3; }
.upload-zone label.disabled { opacity: .55; pointer-events: none; }

/* Statistics */
.stats-chart { position: relative; height: 340px; }
@media (max-width: 767.98px) { .stats-chart { height: 260px; } }
.stack-bar { display: flex; gap: 2px; height: 10px; min-width: 4px; }
.stack-bar span { display: block; height: 100%; min-width: 0; }
.stack-bar span:first-child { border-radius: 4px 0 0 4px; }
.stack-bar span:last-child { border-radius: 0 4px 4px 0; }
.stack-bar span:only-child { border-radius: 4px; }

/* Job form: existing visits */
.mini-cal-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .75rem; }
.mini-cal-box .fc { font-size: .8rem; }
.mini-cal-box .fc .fc-toolbar-title { font-size: 1rem; }
.mini-cal-box .fc-daygrid-day { cursor: pointer; }
.mini-cal-box .fc-daygrid-day:hover { background: var(--navy-50); }
.mini-cal-box .fc-daygrid-day.is-picked { background: rgba(201, 164, 92, .22); box-shadow: inset 0 0 0 2px var(--gold-500); }
.day-check { border-radius: 12px; padding: .6rem .85rem; font-size: .88rem; border: 1px solid; }
.day-check.ok { background: #e9f7ef; color: #135c33; border-color: #c6ead5; }
.day-check.busy { background: #eaf0fb; color: #22397f; border-color: #cfdaf3; }
.day-check.clash { background: #fff7e3; color: #7a5200; border-color: #f4e0ae; }
.day-check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Service payment */
.payment-box { background: var(--navy-50); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; }
.payment-box .form-switch .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.payment-box .form-check-input:checked { background-color: #17804a; border-color: #17804a; }

/* District quick filter */
.district-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
@media (max-width: 767.98px) {
  .district-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; -webkit-overflow-scrolling: touch; }
}
.district-chips .chip {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: #fff; color: var(--navy-700); border: 1px solid #d6dae5; text-decoration: none;
  transition: background-color .12s, border-color .12s;
}
.district-chips .chip:hover { background: var(--navy-50); border-color: #c3c9d8; text-decoration: none; }
.district-chips .chip.active { background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); color: #fff; border-color: var(--navy-800); }
.district-chips .chip i { color: var(--gold-600); }
.district-chips .chip.active i { color: var(--gold-400); }
.district-chips .chip-n { background: var(--navy-100); color: var(--navy-700); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; line-height: 1.5; }
.district-chips .chip.active .chip-n { background: rgba(255,255,255,.18); color: #fff; }

/* Report */
.report-table td { font-size: .9rem; }
@media print { .report-table .badge { border: 1px solid #999; background: none !important; color: #000 !important; } }
@media (min-width: 1200px) and (max-width: 1299.98px) {
  .app-nav .navbar-nav .nav-link > i { display: none; }
}
