/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}
.hidden { display: none !important; }

/* === LOGIN === */
.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-box {
  background: #1e293b;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.login-box h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.25rem; }
.login-subtitle { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-box input {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 1rem;
  outline: none;
}
.login-box input:focus { border-color: #3b82f6; }
.login-box button {
  width: 100%;
  padding: 0.8rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}
.login-box button:active { background: #2563eb; }
.error-msg {
  background: #7f1d1d;
  color: #fca5a5;
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* === TOP BAR === */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #1e293b;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 100;
  border-bottom: 1px solid #334155;
}
#topbar h2 { font-size: 1.1rem; font-weight: 600; flex: 1; }
.menu-btn {
  background: none; border: none; color: #e2e8f0;
  font-size: 1.4rem; cursor: pointer; padding: 0.25rem 0.5rem 0.25rem 0;
}
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
#user-badge {
  font-size: 0.75rem;
  background: #334155;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  color: #94a3b8;
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0; left: -280px; bottom: 0;
  width: 280px;
  background: #1e293b;
  z-index: 200;
  transition: left 0.25s ease;
  display: flex;
  flex-direction: column;
}
.sidebar.open { left: 0; }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid #334155;
}
.sidebar-logo { font-size: 1.5rem; }
.close-btn {
  margin-left: auto;
  background: none; border: none;
  color: #94a3b8; font-size: 1.2rem; cursor: pointer;
}
.nav-list { list-style: none; padding: 0.5rem 0; flex: 1; }
.nav-list li a {
  display: block;
  padding: 0.8rem 1.2rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}
.nav-list li a:hover, .nav-list li a.active {
  background: #0f172a;
  color: #fff;
  border-left-color: #3b82f6;
}
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #334155;
}
.sidebar-footer button {
  width: 100%;
  padding: 0.6rem;
  background: #334155;
  color: #f87171;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* === CONTENT === */
#content {
  margin-top: 56px;
  padding: 1rem;
  padding-bottom: 80px;
}
.page-header { margin-bottom: 1rem; }
.page-header h3 { font-size: 1.2rem; font-weight: 600; }

/* === STATS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.stat-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: #3b82f6; }
.stat-label { font-size: 0.8rem; color: #94a3b8; margin-top: 0.25rem; }

/* === BUTTONS === */
.btn-primary {
  padding: 0.6rem 1.2rem;
  background: #3b82f6; color: #fff; border: none;
  border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn-primary:active { background: #2563eb; }
.btn-secondary {
  padding: 0.6rem 1.2rem;
  background: #334155; color: #cbd5e1; border: none;
  border-radius: 8px; font-size: 0.9rem; cursor: pointer;
}
.btn-danger {
  padding: 0.6rem 1.2rem;
  background: #dc2626; color: #fff; border: none;
  border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn-icon {
  background: none; border: none; color: #94a3b8;
  font-size: 1rem; cursor: pointer; padding: 0.3rem;
}
.btn-icon:active { color: #fff; }

/* === SEARCH === */
.search-input {
  width: 100%; padding: 0.7rem 1rem;
  background: #1e293b; border: 1px solid #334155;
  border-radius: 10px; color: #e2e8f0; font-size: 0.9rem;
  margin-bottom: 0.75rem; outline: none;
}
.search-input:focus { border-color: #3b82f6; }

/* === PAGE HEADER === */
.page-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 1rem;
}

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 300;
}
.modal {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1e293b; border-radius: 16px 16px 0 0;
  z-index: 301; max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.25s ease;
}
.modal-sm { max-width: 400px; margin: 0 auto; border-radius: 16px; bottom: auto; top: 50%; transform: translateY(-50%); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.2rem; border-bottom: 1px solid #334155;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-body { padding: 1rem 1.2rem; }
.modal-body label {
  display: block; font-size: 0.8rem; color: #94a3b8;
  margin-bottom: 0.25rem; margin-top: 0.75rem;
}
.modal-body label:first-child { margin-top: 0; }
.modal-body input, .modal-body textarea, .modal-body select {
  width: 100%; padding: 0.7rem 0.8rem;
  background: #0f172a; border: 1px solid #334155;
  border-radius: 8px; color: #e2e8f0; font-size: 0.95rem;
  outline: none; font-family: inherit;
}
.modal-body input:focus, .modal-body textarea:focus { border-color: #3b82f6; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding: 1rem 1.2rem; border-top: 1px solid #334155;
}

/* === EQUIPMENT LIST === */
.card-list { display: flex; flex-direction: column; gap: 0.5rem; }
.category-title {
  font-size: 0.85rem; font-weight: 600; color: #3b82f6;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.75rem 0 0.25rem;
  border-bottom: 1px solid #334155; margin-top: 0.5rem;
}
.eq-card {
  display: flex; justify-content: space-between; align-items: center;
  background: #1e293b; border-radius: 10px; padding: 0.8rem 1rem; gap: 0.5rem;
}
.eq-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; cursor: pointer; border: 1px solid #334155;
}
mark { background: #facc15; color: #0f172a; border-radius: 2px; padding: 0 1px; }
.eq-info { flex: 1; min-width: 0; }
.eq-name { font-size: 0.9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-condition { font-size: 0.75rem; color: #94a3b8; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-price { font-size: 0.85rem; font-weight: 600; color: #34d399; white-space: nowrap; }
.eq-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }

/* === CALENDAR TIMELINE === */
.cal-controls {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; flex-wrap: wrap;
}
.cal-controls .btn-sm {
  background: #334155; color: #e2e8f0; border: none; border-radius: 6px;
  padding: 0.35rem 0.7rem; font-size: 0.8rem; cursor: pointer;
}
.cal-controls .btn-sm:active { background: #475569; }
#cal-period { font-size: 0.85rem; font-weight: 600; min-width: 160px; text-align: center; }
#cal-range {
  background: #334155; color: #e2e8f0; border: 1px solid #475569; border-radius: 6px;
  padding: 0.3rem 0.5rem; font-size: 0.8rem; margin-left: auto;
}
.cal-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 -1rem; padding: 0 1rem;
}
.cal-grid { border: 1px solid #334155; border-radius: 8px; overflow: hidden; }
.cal-row {
  display: flex; border-bottom: 1px solid #1e293b;
}
.cal-row:last-child { border-bottom: none; }
.cal-header { background: #1e293b; position: sticky; top: 0; z-index: 2; }
.cal-label {
  flex-shrink: 0; padding: 0.3rem 0.5rem; font-size: 0.75rem; color: #cbd5e1;
  border-right: 1px solid #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; background: #0f172a;
}
.cal-cells { display: flex; position: relative; flex: 1; }
.cal-cell {
  flex-shrink: 0; border-right: 1px solid #1e293b; min-height: 28px;
  background: #0f172a;
}
.cal-cell:last-child { border-right: none; }
.cal-day-header {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.15rem 0; font-size: 0.65rem; color: #94a3b8;
}
.cal-day-name { font-size: 0.6rem; text-transform: uppercase; }
.cal-day-num { font-weight: 600; font-size: 0.75rem; }
.cal-today { background: rgba(59, 130, 246, 0.15) !important; }
.cal-today .cal-day-num { color: #3b82f6; }
.cal-weekend { background: rgba(100, 116, 139, 0.08); }
.cal-cat-row { background: #1e293b; }
.cal-cat-label {
  font-size: 0.7rem; font-weight: 700; color: #64748b; text-transform: uppercase;
  padding: 0.25rem 0.5rem; letter-spacing: 0.05em;
}
.cal-bar {
  position: absolute; top: 3px; height: 22px; border-radius: 4px;
  font-size: 0.65rem; color: #fff; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 0 4px; line-height: 22px; cursor: pointer;
  z-index: 1; transition: opacity 0.15s;
}
.cal-bar:hover { opacity: 0.85; }
.bar-paid { background: #22c55e; }
.bar-partial { background: #eab308; color: #1e293b; }
.bar-unpaid { background: #ef4444; }

/* === BOTTOM NAV === */
#bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: #1e293b;
  display: flex;
  border-top: 1px solid #334155;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  gap: 0.15rem;
}
.bnav-btn.active { color: #3b82f6; }
.bnav-icon { font-size: 1.3rem; }
.bnav-label { font-size: 0.65rem; }

/* === PLACEHOLDER === */
.placeholder-text { color: #64748b; font-style: italic; padding: 2rem; text-align: center; }

/* === CLIENT LIST === */
.cl-card {
  display: flex; justify-content: space-between; align-items: center;
  background: #1e293b; border-radius: 10px; padding: 0.8rem 1rem;
  cursor: pointer; gap: 0.5rem;
}
.cl-card:active { background: #334155; }
.cl-info { flex: 1; min-width: 0; }
.cl-name { font-size: 0.95rem; font-weight: 500; display: block; }
.cl-meta { font-size: 0.75rem; color: #94a3b8; margin-top: 0.1rem; }
.cl-value { font-size: 0.85rem; font-weight: 600; color: #34d399; white-space: nowrap; }

/* === CLIENT DETAIL === */
.detail-header { margin-bottom: 1rem; }
.detail-name { font-size: 1.3rem; font-weight: 700; }
.detail-company { color: #94a3b8; font-size: 0.9rem; }
.detail-section { margin-top: 1.2rem; }
.detail-section h4 { font-size: 0.85rem; color: #3b82f6; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.detail-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid #1e293b; font-size: 0.9rem; }
.detail-row .label { color: #94a3b8; }
.detail-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
.detail-img-wrap { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #334155; }
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-img-wrap .img-del {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.7); color: #f87171;
  border: none; border-radius: 50%; width: 24px; height: 24px;
  font-size: 0.7rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.detail-img-desc { font-size: 0.7rem; color: #94a3b8; text-align: center; margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === FILE INPUT === */
.modal-body input[type="file"] {
  padding: 0.5rem; background: #0f172a; border: 1px solid #334155;
  border-radius: 8px; color: #94a3b8; font-size: 0.85rem;
}

/* === FILTER ROW === */
.filter-row { display: flex; gap: 0.5rem; align-items: center; }
.filter-select {
  padding: 0.7rem 0.8rem; background: #1e293b; border: 1px solid #334155;
  border-radius: 10px; color: #e2e8f0; font-size: 0.9rem; outline: none; min-width: 120px;
}
.filter-select:focus { border-color: #3b82f6; }

/* === RENTAL LIST === */
.rent-card {
  background: #1e293b; border-radius: 10px; padding: 0.8rem 1rem;
  cursor: pointer; border-left: 4px solid #334155;
}
.rent-card:active { background: #334155; }
.rent-card.status-paid { border-left-color: #34d399; }
.rent-card.status-partial { border-left-color: #fbbf24; }
.rent-card.status-unpaid { border-left-color: #f87171; }
.rent-top { display: flex; justify-content: space-between; align-items: center; }
.rent-client { font-size: 0.95rem; font-weight: 500; }
.rent-price { font-size: 0.9rem; font-weight: 600; color: #34d399; }
.rent-dates { font-size: 0.8rem; color: #94a3b8; margin-top: 0.15rem; }
.rent-eq { font-size: 0.75rem; color: #64748b; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rent-badge {
  display: inline-block; font-size: 0.7rem; padding: 0.15rem 0.5rem;
  border-radius: 10px; font-weight: 600; margin-left: 0.5rem;
}
.badge-paid { background: #064e3b; color: #34d399; }
.badge-partial { background: #78350f; color: #fbbf24; }
.badge-unpaid { background: #7f1d1d; color: #f87171; }

/* === EQ CHECKLIST === */
.eq-checklist { max-height: 200px; overflow-y: auto; background: #0f172a; border-radius: 8px; border: 1px solid #334155; }
.eq-check-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.7rem; border-bottom: 1px solid #1e293b; font-size: 0.85rem;
}
.eq-check-item:last-child { border-bottom: none; }
.eq-check-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: #3b82f6; }
.eq-check-price { margin-left: auto; color: #34d399; font-size: 0.8rem; }

/* === PRICE SUMMARY === */
.price-summary {
  background: #0f172a; border-radius: 8px; padding: 0.6rem 0.8rem;
  margin-top: 0.5rem; font-size: 0.85rem; color: #94a3b8;
}
.price-summary .total { color: #34d399; font-weight: 600; font-size: 1rem; }
.rent-conflicts {
  background: rgba(239, 68, 68, 0.12); border: 1px solid #ef4444; border-radius: 8px;
  padding: 0.6rem 0.8rem; margin-top: 0.5rem; font-size: 0.8rem; color: #fca5a5;
}
.rent-conflicts strong { color: #ef4444; display: block; margin-bottom: 0.3rem; }
.conflict-item { padding: 0.15rem 0; color: #e2e8f0; font-size: 0.75rem; }
.eq-check-item.eq-conflict { background: rgba(239, 68, 68, 0.15); }
.eq-check-item.eq-conflict span:first-of-type { color: #fca5a5; }

/* === RENTAL DETAIL === */
.pay-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0; border-bottom: 1px solid #1e293b; font-size: 0.85rem;
}
.pay-history-item:last-child { border-bottom: none; }

/* === PWA INSTALL BANNER === */
#install-banner {
  position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%);
  background: #1e3a5f; color: #e2e8f0; padding: 0.6rem 1rem;
  border-radius: 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; z-index: 9000; width: 90%; max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5); font-size: 0.85rem;
  animation: toastIn 0.3s ease;
}
#install-banner div { display: flex; gap: 0.4rem; align-items: center; }

/* === TOAST NOTIFICATIONS === */
#toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column-reverse; gap: 0.5rem;
  pointer-events: none; width: 90%; max-width: 400px;
}
.toast {
  padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.85rem;
  color: #fff; pointer-events: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex; align-items: center; gap: 0.5rem;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.info { background: #2563eb; }
.toast.warning { background: #d97706; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* === REPORT CHART === */
.report-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 0.5rem 0; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; min-width: 8px; background: #3b82f6; border-radius: 4px 4px 0 0; transition: height 0.3s; }
.chart-bar.unpaid { background: #f87171; }
.chart-label { font-size: 0.6rem; color: #64748b; margin-top: 4px; }
.chart-value { font-size: 0.6rem; color: #94a3b8; }
.report-table { margin-top: 0.75rem; }
.report-row {
  display: flex; justify-content: space-between; padding: 0.4rem 0;
  border-bottom: 1px solid #1e293b; font-size: 0.85rem;
}
.report-row.header { color: #3b82f6; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }

/* === SETTINGS === */
.settings-section {
  background: #1e293b; border-radius: 12px; padding: 1rem 1.2rem;
}
.settings-section h4 { font-size: 0.9rem; color: #3b82f6; margin-bottom: 0.5rem; }
.settings-section label {
  display: block; font-size: 0.8rem; color: #94a3b8;
  margin-bottom: 0.25rem; margin-top: 0.6rem;
}
.settings-section label:first-of-type { margin-top: 0; }
.settings-section input, .settings-section select {
  width: 100%; padding: 0.65rem 0.8rem;
  background: #0f172a; border: 1px solid #334155;
  border-radius: 8px; color: #e2e8f0; font-size: 0.9rem; outline: none;
}
.settings-section input:focus { border-color: #3b82f6; }
.user-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px solid #0f172a; font-size: 0.9rem;
}
.user-row:last-child { border-bottom: none; }
.user-role { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 10px; }
.user-role.admin { background: #1e3a5f; color: #60a5fa; }
.user-role.limited { background: #334155; color: #94a3b8; }
.msg-ok { color: #34d399; }
.msg-err { color: #f87171; }

/* === DESKTOP === */
@media (min-width: 768px) {
  #bottomnav { display: none; }
  #content { padding-bottom: 1rem; }
}
@media (min-width: 1024px) {
  .sidebar {
    left: 0 !important;
    border-right: 1px solid #334155;
  }
  .sidebar .close-btn { display: none; }
  .sidebar-overlay { display: none !important; }
  #topbar { left: 280px; }
  #content { margin-left: 280px; }
  #content > .page { max-width: 1100px; margin: 0 auto; }
  .menu-btn { display: none; }
  /* Desktop modals: centered card instead of bottom sheet */
  .modal:not(.modal-sm) {
    bottom: auto; top: 50%; left: 50%; right: auto;
    transform: translate(-50%, -50%);
    border-radius: 16px; max-width: 560px; width: 90%;
    animation: fadeIn 0.2s ease;
  }
  @keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
}

/* Sidebar collapse on desktop */
body.sidebar-collapsed .sidebar { left: -280px !important; }
body.sidebar-collapsed #topbar { left: 0; }
body.sidebar-collapsed #content { margin-left: 0; }
#sidebar-collapse-btn {
  display: none; background: none; border: none; color: #94a3b8;
  font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.5rem;
}
@media (min-width: 1024px) {
  #sidebar-collapse-btn { display: inline-block; }
}

/* Category collapse */
.category-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 0 0.25rem; border-bottom: 1px solid #334155;
  margin-top: 0.5rem; cursor: pointer; user-select: none;
}
.category-header .cat-label {
  font-size: 0.85rem; font-weight: 600; color: #3b82f6;
  text-transform: uppercase; letter-spacing: 0.05em; flex: 1;
}
.category-header .cat-toggle {
  font-size: 0.7rem; color: #64748b; transition: transform 0.2s;
}
.category-header.collapsed .cat-toggle { transform: rotate(-90deg); }
.category-header .cat-count { font-size: 0.7rem; color: #64748b; }
.category-header .cat-drag {
  cursor: grab; color: #475569; font-size: 1rem; padding: 0 0.25rem;
}
.category-header .cat-drag:active { cursor: grabbing; }
.category-group.collapsed .eq-card { display: none; }
.category-group.dragging { opacity: 0.5; }
.category-group.drag-over .category-header { border-bottom-color: #3b82f6; border-bottom-width: 2px; }

/* Calendar selection */
.cal-cell.cal-selected { background: rgba(59, 130, 246, 0.3) !important; }
.cal-cell.cal-selectable { cursor: crosshair; }
#cal-selection-bar {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #1e3a5f; color: #e2e8f0; padding: 0.6rem 1rem;
  border-radius: 12px; display: flex; align-items: center; gap: 0.75rem;
  z-index: 9000; box-shadow: 0 4px 20px rgba(0,0,0,0.5); font-size: 0.85rem;
}
@media (min-width: 1024px) {
  #cal-selection-bar { bottom: 24px; }
}

/* Rental modal equipment search */
.rent-eq-search {
  width: 100%; padding: 0.5rem 0.7rem; margin-bottom: 0;
  background: #1e293b; border: 1px solid #334155; border-bottom: none;
  border-radius: 8px 8px 0 0; color: #e2e8f0; font-size: 0.85rem; outline: none;
}
.rent-eq-search:focus { border-color: #3b82f6; }
.rent-eq-search + .eq-checklist { border-radius: 0 0 8px 8px; }

/* Quick add client */
.quick-client-row {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem;
}
.quick-client-row input {
  flex: 1; padding: 0.5rem 0.6rem; background: #0f172a;
  border: 1px solid #334155; border-radius: 8px; color: #e2e8f0;
  font-size: 0.85rem; outline: none;
}
.quick-client-row input:focus { border-color: #3b82f6; }
.quick-client-btn {
  padding: 0.5rem 0.8rem; background: #059669; color: #fff;
  border: none; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.quick-client-toggle {
  padding: 0.3rem 0.6rem; background: #334155; color: #cbd5e1;
  border: none; border-radius: 6px; font-size: 0.75rem; cursor: pointer;
  margin-left: 0.5rem;
}
