/* ============ ZAPISANO BUSINESS WORKSPACE STYLES ============ */

:root {
  --paper: #F4F6EC;
  --sage: #E9EDDE;
  --ink: #16261D;
  --ink2: #46584C;
  --green: #1F6B4E;
  --green-d: #16513B;
  --lime: #CDF463;
  --lime-d: #B4E34A;
  --tang: #FF7A45;
  --rose: #FFD3DC;
  --sky: #C7E3FF;
  --sun: #FFE08A;
  --mint: #CDEED7;
  --white: #FFFDF7;
  --line: rgba(22, 38, 29, .14);
  --sh: 5px 5px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --r: 16px;
}

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

html, body {
  font-family: 'Golos Text', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(22, 38, 29, .06) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
}

h1, h2, h3, h4, .disp {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

button, input, select {
  font-family: inherit;
}

/* APP SHELL */
.biz-app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* SIDEBAR */
.biz-sidebar {
  width: 260px;
  background: var(--white);
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.biz-brand {
  padding: 20px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.biz-logo-mk {
  width: 34px;
  height: 34px;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 9px;
  display: grid;
  place-items: center;
  box-shadow: 2px 2px 0 var(--ink);
}

.biz-brand b {
  font-family: 'Unbounded', sans-serif;
  font-size: 17px;
}

.biz-brand span {
  font-size: 10.5px;
  background: var(--ink);
  color: var(--lime);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}

/* ACTIVE BUSINESS CARD IN SIDEBAR */
.biz-profile-mini {
  padding: 16px 20px;
  border-bottom: 2px dashed var(--line);
  background: var(--sage);
}

.biz-profile-mini h4 {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.biz-profile-mini p {
  font-size: 12px;
  color: var(--ink2);
}

/* SIDEBAR NAV */
.biz-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.biz-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  transition: all .15s ease;
  text-align: left;
}

.biz-nav-item:hover {
  background: var(--paper);
  border-color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.biz-nav-item.active {
  background: var(--lime);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.biz-nav-item .ic {
  font-size: 18px;
  line-height: 1;
}

.biz-nav-item .badge {
  margin-left: auto;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
}

.biz-nav-foot {
  padding: 16px 20px;
  border-top: 2px solid var(--ink);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* MAIN CONTENT */
.biz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* TOP APP BAR */
.biz-topbar {
  background: var(--white);
  border-bottom: 2px solid var(--ink);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 15;
}

.biz-topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.biz-topbar-title h2 {
  font-size: 18px;
}

.biz-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 13.5px 'Golos Text', sans-serif;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--sh-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-lime {
  background: var(--lime);
}

.btn-ink {
  background: var(--ink);
  color: var(--lime);
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}

/* PAGE CONTENT AREA */
.biz-view {
  display: none;
  padding: 24px 28px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.biz-view.active {
  display: block;
  animation: fadeIn .18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* CARDS */
.card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 22px;
  margin-bottom: 22px;
}

/* SCHEDULE VIEW */
.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.date-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.day-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .15s ease, background .15s ease;
  min-width: 68px;
}

.day-pill:hover {
  transform: translate(-1px, -1px);
}

.day-pill.active {
  background: var(--lime);
  box-shadow: none;
  transform: translate(1px, 1px);
}

.day-pill .dw {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink2);
}

.day-pill b {
  font-size: 18px;
  font-family: 'Unbounded', sans-serif;
  line-height: 1.1;
  margin: 2px 0;
}

.day-pill .dm {
  font-size: 10.5px;
}

.schedule-day-summary {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--sage);
  border: 2px solid var(--ink);
  border-radius: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.day-sum-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.day-sum-stat b {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
}

/* TIMELINE SLOTS */
.timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s ease;
  gap: 12px;
  flex-wrap: wrap;
}

.slot-card.free {
  border-left: 6px solid var(--lime-d);
}

.slot-card.blocked {
  background: #FFF5F5;
  border-left: 6px solid var(--rose);
}

.slot-card.booked {
  background: #F4F9FF;
  border-left: 6px solid var(--sky);
}

.slot-time {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  min-width: 100px;
}

.slot-detail {
  flex: 1;
  min-width: 200px;
}

.slot-detail b {
  font-size: 14.5px;
  display: block;
}

.slot-detail .sub {
  font-size: 12.5px;
  color: var(--ink2);
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  text-transform: uppercase;
}

.tag-badge.free {
  background: var(--lime);
}

.tag-badge.blocked {
  background: var(--rose);
}

.tag-badge.booked {
  background: var(--sky);
}

.tag-badge.done {
  background: var(--mint);
}

/* TABLE / BOOKINGS LIST */
.table-wrap {
  overflow-x: auto;
}

.biz-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.biz-table th, .biz-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.biz-table th {
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  background: var(--sage);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.biz-table tr:hover td {
  background: var(--paper);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 38, 29, .65);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.open {
  display: grid;
}

.modal-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--sh);
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h3 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: 2px solid var(--ink);
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 700;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 5px;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font: 500 13.5px 'Golos Text', sans-serif;
  background: var(--paper);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px dashed var(--line);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--lime);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--lime);
  box-shadow: var(--sh-sm);
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all .25s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* MOBILE BOTTOM NAV */
.biz-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 2px solid var(--ink);
  z-index: 30;
  padding: 6px 4px;
  justify-content: space-around;
}

.biz-mob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px;
  border-radius: 8px;
  color: var(--ink2);
}

.biz-mob-item.active {
  color: var(--ink);
  background: var(--lime);
}

.biz-mob-item .ic {
  font-size: 18px;
}

@media (max-width: 820px) {
  .biz-sidebar {
    display: none;
  }
  .biz-mobile-bar {
    display: flex;
  }
  .biz-main {
    padding-bottom: 70px;
  }
  .biz-topbar {
    padding: 12px 16px;
  }
  .biz-view {
    padding: 16px 14px;
  }
  .slot-card {
    padding: 12px;
  }
}
