/*
  ApptPing Premium SaaS Stylesheet
  Patch 015

  Purpose:
  - Makes ApptPing feel more like a polished paid SaaS app.
  - Keeps all existing class names used by the app.
  - Visual-only: no database or PHP logic changes.
*/

/* =========================================================
   Theme Variables
========================================================= */

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #111827;
  --muted: #667085;

  --brand: #111827;
  --brand-2: #1f2937;
  --brand-3: #273449;

  --gold: #f5b82e;
  --gold-light: #ffd66b;
  --gold-soft: #fff6dc;

  --line: #e5e7eb;
  --line-strong: #d7dce5;

  --ok: #16803a;
  --warn: #a66b00;
  --bad: #b42318;
  --info: #2563eb;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-soft: 0 12px 32px rgba(16, 24, 40, 0.08);
  --shadow-hover: 0 18px 48px rgba(16, 24, 40, 0.14);
  --shadow-gold: 0 12px 24px rgba(245, 184, 46, 0.28);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --focus: 0 0 0 4px rgba(245, 184, 46, 0.22);
}

/* =========================================================
   Base
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% -8%, rgba(245, 184, 46, 0.20), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(37, 99, 235, 0.08), transparent 32rem),
    linear-gradient(180deg, #fbfcff 0%, #f1f4f9 100%);
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  letter-spacing: -0.035em;
}

p {
  line-height: 1.55;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 34px 24px;
  font-size: 13px;
}

code {
  display: block;
  background: #0f172a;
  color: #f8cc56;
  padding: 13px 14px;
  border-radius: 14px;
  overflow: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.small {
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.big {
  font-size: 40px;
  font-weight: 950;
  letter-spacing: -1.3px;
}

/* =========================================================
   Top Navigation
========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  padding: 14px 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.98)),
    linear-gradient(90deg, rgba(245, 184, 46, 0.14), transparent);
  box-shadow: 0 12px 34px rgba(10, 15, 30, 0.34);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-weight: 950;
  font-size: 23px;
  letter-spacing: -0.55px;
  opacity: 1 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand::before {
  content: "✂️";
  font-weight: 400;
  filter: drop-shadow(0 4px 8px rgba(245, 184, 46, 0.28));
}

.tag {
  color: #cbd5e1;
  margin-left: 14px;
  font-size: 14px;
  opacity: 0.95;
}

.topbar nav {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.topbar nav a {
  color: #eef2ff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.10);
  padding: 9px 13px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 14px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.topbar nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar nav a.nav-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #151515;
  box-shadow: var(--shadow-gold);
  border-color: rgba(255, 255, 255, 0.18);
}

.topbar nav a.nav-gold:hover {
  background: #ffd56a;
}

/* =========================================================
   Layout
========================================================= */

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.mini {
  grid-template-columns: repeat(3, 1fr);
}

.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
.span5 { grid-column: span 5; }
.span6 { grid-column: span 6; }
.span7 { grid-column: span 7; }
.span8 { grid-column: span 8; }
.span12 { grid-column: span 12; }

.row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.row > * {
  flex: 1;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;

  margin-bottom: 18px;
  padding: 24px;

  background:
    linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(255,249,230,0.88) 100%),
    radial-gradient(circle at top right, rgba(245, 184, 46, 0.18), transparent 20rem);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.hero h1 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 950;
  letter-spacing: -1.8px;
  line-height: 0.98;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* =========================================================
   Cards
========================================================= */

.card,
.plan-card,
.search-result,
.pick-card,
.selected,
.inline-new {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card {
  padding: 20px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.card:hover,
.plan-card:hover,
.pick-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.card h2,
.card h3 {
  font-weight: 900;
}

/* =========================================================
   Forms
========================================================= */

label {
  font-weight: 800;
  display: block;
  margin: 11px 0 7px;
  color: #253044;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

textarea {
  min-height: 58px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--focus);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
}

.form-stack input[type="text"],
.form-stack input[type="password"],
.form-stack input:not([type]) {
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 1rem;
}

.check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;

  font-weight: 800;
  background: #fbfcff;
  border: 1px solid var(--line);
  padding: 11px 13px;
  border-radius: 14px;
}

.check input {
  width: auto !important;
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.inline-form label {
  font-weight: 800;
  color: #1f2937;
}

.inline-form input,
.inline-form select {
  margin-top: 4px;
}

.tiny-input {
  width: 88px !important;
  padding: 6px !important;
  font-size: 13px !important;
}

/* =========================================================
   Buttons
========================================================= */

.btn,
button {
  border: 0;
  border-radius: 14px;
  padding: 11px 15px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
  transition: transform 0.13s ease, box-shadow 0.13s ease, filter 0.13s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.18);
}

.btn:active,
button:active {
  transform: translateY(0);
}

.btn.gold,
button.gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #141414;
  box-shadow: var(--shadow-gold);
}

.btn.light {
  background: #f4f6fa;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.bad,
button.bad {
  background: linear-gradient(180deg, #d0443a, var(--bad));
  color: #ffffff;
}

.btn.ok,
button.ok {
  background: linear-gradient(180deg, #1fa64f, var(--ok));
  color: #ffffff;
}

.btn.small {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 11px;
}

/* =========================================================
   Search / Quick Booking
========================================================= */

.searchbar {
  display: flex;
  gap: 9px;
  margin-bottom: 13px;
}

.searchbar input {
  flex: 1;
}

.search-result {
  padding: 13px;
  margin: 9px 0;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.quick-times {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 13px 0;
}

.quick-times button {
  background: #eef2f7;
  color: #172033;
  border: 1px solid var(--line);
  box-shadow: none;
}

.quick-times button:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.big-buttons button {
  font-size: 18px;
  min-width: 76px;
  padding: 14px;
}

.book-now {
  font-size: 20px;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
}

.pick-card {
  display: block;
  padding: 14px;
  margin: 9px 0;
  text-decoration: none;
  color: var(--ink);
}

.pick-card:hover,
.pick-card.picked {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 184, 46, 0.18);
}

.pick-card span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.pick-card em {
  display: inline-block;
  margin-top: 7px;
  color: var(--bad);
  font-style: normal;
  font-weight: 900;
}

.selected {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fff9e8;
  border-color: #f4d27a;
  padding: 13px;
  margin-bottom: 14px;
}

.selected span {
  color: var(--muted);
}

.inline-new {
  background: #f8fafc;
  border-style: dashed;
  padding: 13px;
  margin-bottom: 12px;
}

.tiny-bad {
  font-size: 12px;
  color: var(--bad);
  font-weight: 900;
}

/* =========================================================
   Tables
========================================================= */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f8fafc;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: #fffaf0;
}

/* =========================================================
   Status Pills / Alerts
========================================================= */

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.2px;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill.ok {
  background: #dcfce7;
  color: #065f46;
  border-color: #bbf7d0;
}

.pill.warn {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.pill.bad {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.flash {
  background: #fff7df;
  border: 1px solid #f4d27a;
  border-radius: 16px;
  padding: 13px 14px;
  margin-bottom: 15px;
  box-shadow: 0 8px 18px rgba(245, 184, 46, 0.18);
  font-weight: 850;
}

.warning-strip {
  display: inline-block;
  background: #fff4db;
  border: 1px solid #f4d27a;
  color: #8a5600;
  border-radius: 13px;
  padding: 8px 10px;
  margin-top: 8px;
  font-weight: 850;
  box-shadow: 0 5px 14px rgba(166, 107, 0, 0.10);
}

/* =========================================================
   Today Dashboard
========================================================= */

.daily-board {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 18px;
}

.appt-card {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 15px;
  align-items: center;

  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 8px solid #cbd5e1;
  border-radius: 24px;
  padding: 17px;
  box-shadow: var(--shadow-soft);

  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.appt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.36), transparent 38%);
  opacity: .75;
}

.appt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.appt-card.status-scheduled {
  border-left-color: var(--gold);
  background: #fffdf5;
}

.appt-card.status-confirmed {
  border-left-color: var(--ok);
  background: #f6fff8;
}

.appt-card.status-arrived {
  border-left-color: var(--ok);
  background: #f0fdf4;
}

.appt-card.status-no_show,
.appt-card.status-cancelled {
  border-left-color: var(--bad);
  background: #fff7f7;
}

.appt-time {
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.9px;
}

.appt-main h2 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.35px;
}

.appt-main p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.appt-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.appt-actions form {
  margin: 0;
}

.appt-actions .btn,
.appt-actions button {
  font-size: 15px;
  font-weight: 950;
  padding: 12px 15px;
}

.appt-status {
  justify-self: end;
  position: relative;
  z-index: 1;
}

.activity-item {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  border-radius: 12px;
  transition: background 0.12s ease;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item:hover {
  background: #f8fafc;
}

.activity-item span {
  color: var(--muted);
}

.activity-item em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

.stats-row {
  margin-bottom: 18px;
}

/* =========================================================
   Billing
========================================================= */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 15px;
  margin-top: 12px;
}

.plan-card {
  padding: 20px;
  background:
    linear-gradient(180deg, #ffffff, #fafafa),
    radial-gradient(circle at top right, rgba(245,184,46,.16), transparent 12rem);
}

.plan-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-weight: 950;
}

.price {
  font-size: 32px;
  font-weight: 950;
  color: #111827;
  letter-spacing: -0.8px;
}

.price span {
  font-size: 14px;
  font-weight: 750;
  color: #6b7280;
}

/* =========================================================
   Login
========================================================= */

.login {
  max-width: 430px;
  margin: 54px auto;
}

.login .card,
.login.card {
  border-top: 7px solid var(--gold);
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.16);
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 800px) {
  .container {
    margin: 14px auto;
    padding: 0 11px;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .tag {
    display: block;
    margin-left: 0;
    margin-top: 3px;
  }

  .topbar nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar nav a {
    text-align: center;
    border-radius: 14px;
    padding: 11px 10px;
  }

  .hero {
    padding: 17px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero > div:last-child {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero .btn {
    text-align: center;
  }

  .grid {
    gap: 13px;
  }

  .span4,
  .span5,
  .span6,
  .span7,
  .span8 {
    grid-column: span 12;
  }

  .span2,
  .span3 {
    grid-column: span 6;
  }

  .mini {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .big {
    font-size: 30px;
  }

  .searchbar {
    flex-direction: column;
  }

  .searchbar button {
    width: 100%;
  }

  .big-buttons button {
    flex: 1;
  }

  .btn,
  button {
    width: 100%;
    text-align: center;
  }

  .actions,
  .appt-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions .btn,
  .actions button {
    flex: 1 1 140px;
  }

  .appt-card {
    grid-template-columns: 1fr;
  }

  .appt-time {
    font-size: 30px;
  }

  .appt-status {
    justify-self: start;
  }

  .appt-actions form,
  .appt-actions .btn,
  .appt-actions button {
    min-width: 100%;
    width: 100%;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border-radius: 14px;
  }

  th,
  td {
    padding: 12px 8px;
  }
}
