/* ============================================================================
   DCT.tn — Apple Clinical Luxury Design System (on top of HichCab Pro)
   Palette: Apple Canvas #F5F5F7 | Obsidian #0B1220 | Apple Blue #0071E3 | Medical Teal #0D9488
   ============================================================================ */
:root {
  --bg-canvas: #F5F5F7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F2F4F8;
  --bg-hover: #E8ECF2;
  --bg-sidebar: #0B1220;
  --bg-sidebar-hover: #151F33;
  --bg-sidebar-active: rgba(10, 132, 255, 0.16);
  --bg-pacs-dark: #070B12;
  --bg-pacs-panel: #111827;

  --text-primary: #1D1D1F;
  --text-secondary: #3A3A3C;
  --text-muted: #6E6E73;
  --text-light: #8E8E93;
  --text-on-dark: #F5F5F7;

  --primary: #0071E3;
  --primary-hover: #005BB5;
  --primary-active: #004A94;
  --primary-light: #E0F2FE;
  --primary-Soft: #EFF6FF;
  --primary-border: #BAE6FD;

  --secondary: #0D9488;
  --secondary-hover: #0F766E;
  --secondary-light: #CCFBF1;
  --secondary-soft: #F0FDFA;
  --secondary-border: #99F6E4;

  --border-color: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --shadow-focus: 0 0 0 3px rgba(0, 113, 227, 0.22);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* Hide monthly revenue KPI card on Doctor Dashboard */
#kpi-revenue-card,
[data-kpi="revenue"] {
  display: none !important;
}

.topbar {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.sidebar {
  background: linear-gradient(180deg, #0B1220 0%, #111A2E 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.sidebar .nav-link {
  border-radius: 10px !important;
  transition: all 0.16s ease !important;
}
.sidebar .nav-link.active {
  background: linear-gradient(135deg, #0071E3, #0A84FF) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.32) !important;
}
.sidebar .nav-link.active svg {
  stroke: #FFFFFF !important;
}

.card, .kpi-card, .panel-card {
  border-radius: 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.07) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

.dct-license-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #EFF6FF;
  color: #0071E3;
  border: 1px solid #BFDBFE;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.dct-license-pill.active { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.dct-license-pill.danger { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }

.dct-banner {
  padding: 9px 22px;
  background: #EFF6FF;
  color: #0B1220;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #BFDBFE;
}
.dct-banner.readonly {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

/* Dark Glass Auth Card Styling (#auth-screen) */
.dct-auth-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.dct-auth-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.28);
}
.dct-auth-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.02em;
}
.dct-auth-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #94A3B8;
}

.dct-auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.dct-auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #94A3B8;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.dct-auth-tab:hover:not(.active) {
  color: #E2E8F0;
  background: rgba(255, 255, 255, 0.06);
}
.dct-auth-tab.active {
  background: linear-gradient(135deg, #0071E3, #0A84FF);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

#auth-screen .auth-card .form-group {
  margin-bottom: 14px;
  gap: 6px;
}
#auth-screen .auth-card .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #CBD5E1;
}
#auth-screen .auth-card .form-control {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  color: #F8FAFC;
  font-size: 13.5px;
}
#auth-screen .auth-card .form-control::placeholder {
  color: #64748B;
}
#auth-screen .auth-card .form-control:focus {
  border-color: #38BDF8;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}
#auth-screen .auth-card select.form-control option {
  background: #0F172A;
  color: #F8FAFC;
}
#auth-screen .auth-card .btn {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  justify-content: center;
}
#auth-screen .auth-card .btn-primary {
  background: linear-gradient(135deg, #0071E3, #0A84FF);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.32);
}
#auth-screen .auth-card .btn-primary:hover {
  filter: brightness(1.08);
}
#auth-screen .auth-card .btn-outline {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #F8FAFC;
}
#auth-screen .auth-card .btn-outline:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}
.dct-auth-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}
.dct-auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12.5px;
}
.dct-auth-link {
  background: none;
  border: none;
  padding: 0;
  color: #60A5FA;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}
.dct-auth-link:hover {
  color: #93C5FD;
  text-decoration: underline;
}
.dct-auth-support {
  color: #94A3B8;
  font-size: 12px;
}
.dct-auth-notice {
  font-size: 12.5px;
  color: #7DD3FC;
  font-weight: 600;
  margin: 0 0 12px;
}
.dct-auth-err {
  color: #FCA5A5;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 12px;
  min-height: 0;
}
.dct-auth-err:not(:empty) {
  padding: 9px 12px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 9px;
}
.dct-auth-msg {
  color: #6EE7B7;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 12px;
}
.dct-auth-msg:not(:empty) {
  padding: 9px 12px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 9px;
}

/* Apple-Grade Drag & Drop Calendar */
.cal-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.cal-view-switch { display:inline-flex; background:#E8ECF2; padding:3px; border-radius:10px; }
.cal-view-btn { border:none; background:transparent; padding:6px 13px; border-radius:8px; font-weight:600; font-size:12px; color:#6E6E73; cursor:pointer; }
.cal-view-btn.active { background:#FFFFFF; color:#1D1D1F; box-shadow:0 2px 6px rgba(0,0,0,0.08); }
.cal-grid-wrap { background:#FFFFFF; border:1px solid rgba(15,23,42,0.08); border-radius:16px; overflow:hidden; margin-bottom:16px; box-shadow:0 6px 24px rgba(15,23,42,0.04); }
.cal-week-header { display:grid; grid-template-columns:70px repeat(7,1fr); background:#0B1220; color:#F5F5F7; font-size:12px; font-weight:600; }
.cal-day-header { display:grid; grid-template-columns:70px 1fr; background:#0B1220; color:#F5F5F7; font-size:12px; font-weight:600; }
.cal-head-cell { padding:10px 6px; text-align:center; border-left:1px solid rgba(255,255,255,0.08); }
.cal-head-cell.today { background:#0071E3; color:#FFFFFF; }
.cal-body-scroll { max-height:480px; overflow-y:auto; }
.cal-row { display:grid; min-height:54px; border-bottom:1px solid #F1F5F9; }
.cal-row.week { grid-template-columns:70px repeat(7,1fr); }
.cal-row.day { grid-template-columns:70px 1fr; }
.cal-time-col { padding:6px; font-size:11px; font-weight:600; color:#6E6E73; background:#FAFAFC; text-align:center; border-right:1px solid #F1F5F9; font-variant-numeric:tabular-nums; }
.cal-slot { padding:3px; border-left:1px solid #F1F5F9; min-height:54px; cursor:pointer; transition:background 0.12s; }
.cal-slot:hover { background:#F0F7FF; }
.cal-slot.drag-over { background:rgba(0,113,227,0.12)!important; outline:2px dashed #0071E3; outline-offset:-2px; }
.cal-event { background:linear-gradient(135deg,#0071E3,#0A84FF); color:#FFFFFF; border-radius:9px; padding:6px 8px; font-size:11.5px; margin-bottom:3px; cursor:grab; border-left:3px solid #99F6E4; box-shadow:0 3px 10px rgba(0,113,227,0.2); }
.cal-event.status-en_salle_attente { background:linear-gradient(135deg,#D97706,#F59E0B); }
.cal-event.status-en_consultation { background:linear-gradient(135deg,#0D9488,#10B981); }
.cal-event.status-termine { background:#64748B; opacity:0.85; }
.cal-event-title { font-weight:700; display:flex; justify-content:space-between; }
.cal-event-sub { font-size:10.5px; opacity:0.92; }
.cal-month-grid { display:grid; grid-template-columns:repeat(7,1fr); }
.cal-month-cell { min-height:94px; border-right:1px solid #F1F5F9; border-bottom:1px solid #F1F5F9; padding:5px; cursor:pointer; }
.cal-month-cell.drag-over { background:rgba(0,113,227,0.12); outline:2px dashed #0071E3; }
.cal-month-num { font-size:11.5px; font-weight:700; color:#6E6E73; margin-bottom:3px; }
.cal-month-cell.today .cal-month-num { display:inline-block; background:#0071E3; color:#fff; padding:1px 7px; border-radius:999px; }

/* Apple-Intelligence Style Floating AI Assistant */
.dct-ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  background: linear-gradient(135deg, #0071E3 0%, #0D9488 100%);
  color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  padding: 11px 20px; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.32);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.dct-ai-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 113, 227, 0.42); }
.dct-ai-drawer {
  position: fixed; right: 22px; bottom: 78px; width: 410px; max-width: calc(100vw - 32px); height: 520px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 113, 227, 0.22); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(11, 18, 32, 0.22); z-index: 950;
  display: flex; flex-direction: column; overflow: hidden;
}
.dct-ai-head { background: #0B1220; color: #FFFFFF; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.dct-ai-msgs { flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: #F5F5F7; }
.dct-ai-msg { padding: 10px 13px; border-radius: 14px; font-size: 12.5px; line-height: 1.48; white-space: pre-wrap; }
.dct-ai-msg.user { background: #0071E3; color: #FFFFFF; align-self: flex-end; max-width: 85%; }
.dct-ai-msg.bot { background: #FFFFFF; border: 1px solid rgba(15, 23, 42, 0.08); align-self: flex-start; max-width: 92%; color: #1D1D1F; }
.dct-ai-foot { padding: 10px 12px; border-top: 1px solid rgba(15, 23, 42, 0.08); background: #FFFFFF; }

.dct-modal-backdrop {
  position: fixed; inset: 0; background: rgba(11, 18, 32, 0.56); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 1200; padding: 20px;
}
.dct-modal-box {
  background: #FFFFFF; border-radius: 20px; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  padding: 24px; box-shadow: 0 28px 64px rgba(11, 18, 32, 0.28);
}
.dct-modal-box.dct-modal-wide {
  max-width: 780px;
}
.dct-tour-spotlight {
  position: fixed;
  z-index: 1290;
  border-radius: 14px;
  border: 2px solid #38BDF8;
  box-shadow: 0 0 0 9999px rgba(11, 18, 32, 0.56), 0 0 0 5px rgba(56, 189, 248, 0.25);
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease;
}

.dct-tour-card {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 400px;
  max-width: calc(100vw - 28px);
  background: #0B1220;
  color: #FFFFFF;
  border: 1.5px solid #0071E3;
  border-radius: 18px;
  padding: 16px 18px 18px;
  z-index: 1310;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
  transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dct-tour-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.dct-tour-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0071E3, #38BDF8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.dct-tour-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(0, 113, 227, 0.22);
  color: #7DD3FC;
}

.dct-tour-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dct-tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

.dct-tour-dot.active {
  width: 22px;
  background: #38BDF8;
}

.dct-ai-voice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  font-size: 12px;
  color: #991B1B;
}

.dct-ai-rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #DC2626;
  flex-shrink: 0;
  animation: dctRecPulse 1s ease-in-out infinite;
}

@keyframes dctRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

#dct-ai-mic-btn.recording {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
}

/* ============================================================================
   PERSONAL STICKY NOTES BOARD — Tactile Paper & Pinboard Aesthetic
   ============================================================================ */
.sticky-board-shell {
  min-height: calc(100vh - 120px);
  padding: 22px 24px 36px;
  border-radius: 22px;
  background-color: #F4F5F8;
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.11) 1.15px, transparent 1.15px);
  background-size: 22px 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.sticky-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.sticky-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sticky-board-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-board-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FEF08A 0%, #FDE047 100%);
  color: #713F12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.28);
  flex-shrink: 0;
}

.sticky-board-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1D1D1F;
  letter-spacing: -0.01em;
}

.sticky-board-heading p {
  margin: 1px 0 0;
  font-size: 12px;
  color: #6E6E73;
}

.sticky-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sticky-search-wrap svg {
  position: absolute;
  left: 11px;
  width: 14px;
  height: 14px;
  color: #8E8E93;
  pointer-events: none;
}

.sticky-search-input {
  width: 220px;
  padding: 8px 12px 8px 32px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #F8FAFC;
  font-size: 12.5px;
  color: #1D1D1F;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sticky-search-input:focus {
  background: #FFFFFF;
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.sticky-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sticky-filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: #F2F4F8;
  border-radius: 999px;
}

.sticky-filter-pill {
  border: none;
  background: transparent;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #52525B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.sticky-filter-pill:hover {
  background: rgba(255, 255, 255, 0.7);
}

.sticky-filter-pill.active {
  background: #FFFFFF;
  color: #1D1D1F;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.sticky-quick-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: #0B1220;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(11, 18, 32, 0.18);
}

.sticky-quick-add-label {
  font-size: 12px;
  font-weight: 600;
  color: #F5F5F7;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-right: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
}

.sticky-quick-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.14s ease;
  padding: 0;
}

.sticky-quick-swatch:hover {
  transform: scale(1.22) translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.sticky-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6E6E73;
  margin: 4px 4px 14px;
}

.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 26px 24px;
  padding: 6px 4px 18px;
}

/* Individual Tactile Sticky Note */
.sticky-note {
  --note-bg: #FFF59D;
  --note-bg-top: #FFF176;
  --note-fold: #E6D35C;
  --note-ink: #3E330B;
  --note-muted: rgba(62, 51, 11, 0.56);
  --note-divider: rgba(62, 51, 11, 0.12);
  --note-tilt: 0deg;

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 252px;
  padding: 26px 18px 14px;
  border-radius: 4px 4px 20px 4px;
  background: linear-gradient(180deg, var(--note-bg-top) 0%, var(--note-bg-top) 16%, var(--note-bg) 16.5%, var(--note-bg) 100%);
  color: var(--note-ink);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.07),
    0 12px 24px -6px rgba(15, 23, 42, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: rotate(var(--note-tilt));
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    opacity 0.18s ease;
  cursor: grab;
  animation: stickyPopIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stickyPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px) rotate(var(--note-tilt)); }
  to { opacity: 1; transform: scale(1) translateY(0) rotate(var(--note-tilt)); }
}

/* Curled / folded bottom-right paper corner */
.sticky-note::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(315deg, rgba(244, 245, 248, 0.96) 46%, rgba(15, 23, 42, 0.12) 48%, var(--note-fold) 52%, var(--note-bg-top) 100%);
  border-top-left-radius: 6px;
  box-shadow: -2px -2px 5px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.sticky-note:hover,
.sticky-note:focus-within {
  transform: rotate(0deg) translateY(-6px) scale(1.015);
  box-shadow:
    0 6px 12px rgba(15, 23, 42, 0.09),
    0 22px 36px -8px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  z-index: 6;
}

.sticky-note.is-dragging {
  opacity: 0.48;
  cursor: grabbing;
  transform: scale(0.97) rotate(0deg);
}

.sticky-note.drag-over-target {
  outline: 2.5px dashed #0071E3;
  outline-offset: 5px;
}

/* Color Palettes */
.sticky-note.color-butter {
  --note-bg: #FFF59D;
  --note-bg-top: #FFEB69;
  --note-fold: #E5CF4C;
  --note-ink: #3D3107;
  --note-muted: rgba(61, 49, 7, 0.56);
  --note-divider: rgba(61, 49, 7, 0.12);
}
.sticky-note.color-mint {
  --note-bg: #CCFBF1;
  --note-bg-top: #99F6E4;
  --note-fold: #5EEAD4;
  --note-ink: #0F3D38;
  --note-muted: rgba(15, 61, 56, 0.58);
  --note-divider: rgba(15, 61, 56, 0.13);
}
.sticky-note.color-sky {
  --note-bg: #DBEAFE;
  --note-bg-top: #BFDBFE;
  --note-fold: #93C5FD;
  --note-ink: #132C52;
  --note-muted: rgba(19, 44, 82, 0.58);
  --note-divider: rgba(19, 44, 82, 0.13);
}
.sticky-note.color-blush {
  --note-bg: #FCE7F3;
  --note-bg-top: #FBCFE8;
  --note-fold: #F9A8D4;
  --note-ink: #501433;
  --note-muted: rgba(80, 20, 51, 0.58);
  --note-divider: rgba(80, 20, 51, 0.13);
}
.sticky-note.color-lavender {
  --note-bg: #EDE9FE;
  --note-bg-top: #DDD6FE;
  --note-fold: #C4B5FD;
  --note-ink: #2E1A5E;
  --note-muted: rgba(46, 26, 94, 0.58);
  --note-divider: rgba(46, 26, 94, 0.13);
}
.sticky-note.color-peach {
  --note-bg: #FFEDD5;
  --note-bg-top: #FED7AA;
  --note-fold: #FDBA74;
  --note-ink: #4A240B;
  --note-muted: rgba(74, 36, 11, 0.58);
  --note-divider: rgba(74, 36, 11, 0.13);
}

/* Washi Tape Strip (unpinned) & 3D Pushpin (pinned) */
.sticky-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 78px;
  height: 20px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(2px);
  border-left: 1px dashed rgba(15, 23, 42, 0.1);
  border-right: 1px dashed rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  pointer-events: none;
}

.sticky-pushpin {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #FF6B6B 0%, #DC2626 58%, #991B1B 100%);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.34),
    inset 0 2px 3px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.sticky-pushpin::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

/* Header row inside note */
.sticky-note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--note-divider);
}

.sticky-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--note-ink);
  outline: none;
  padding: 2px 0;
  letter-spacing: -0.01em;
}

.sticky-title-input::placeholder {
  color: var(--note-muted);
  font-weight: 600;
}

.sticky-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

.sticky-note:hover .sticky-head-actions,
.sticky-note:focus-within .sticky-head-actions {
  opacity: 1;
}

.sticky-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--note-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.sticky-icon-btn:hover {
  background: rgba(15, 23, 42, 0.09);
  transform: scale(1.06);
}

.sticky-icon-btn.pinned {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.12);
}

.sticky-icon-btn.danger:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #B91C1C;
}

/* Body textarea */
.sticky-content-input {
  flex: 1;
  width: 100%;
  min-height: 128px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--note-ink);
  resize: none;
  outline: none;
  padding: 2px 0 8px;
}

.sticky-content-input::placeholder {
  color: var(--note-muted);
}

/* Footer: color dots + timestamp / save status */
.sticky-note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  padding-right: 18px;
  border-top: 1px dashed var(--note-divider);
}

.sticky-color-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sticky-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(15, 23, 42, 0.22);
  cursor: pointer;
  padding: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.sticky-color-dot:hover {
  transform: scale(1.22);
}

.sticky-color-dot.active {
  border-color: #0B1220;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  transform: scale(1.15);
}

.sticky-meta-time {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--note-muted);
  white-space: nowrap;
}

/* Empty State */
.sticky-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
}

.sticky-empty-card {
  width: 310px;
  max-width: 100%;
  padding: 30px 24px 24px;
  background: linear-gradient(180deg, #FFEB69 0%, #FFEB69 15%, #FFF59D 15.5%, #FFF59D 100%);
  color: #3D3107;
  border-radius: 4px 4px 22px 4px;
  box-shadow: 0 18px 34px -8px rgba(15, 23, 42, 0.18);
  transform: rotate(-1.5deg);
  position: relative;
}

.sticky-empty-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.sticky-empty-card p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(61, 49, 7, 0.72);
}

#sticky-board-content { overflow:auto; max-height:78vh; min-height:450px; }
.sticky-canvas { position:relative; min-width:1100px; }
.sticky-canvas .sticky-note { position:absolute; width:310px; margin:0; transform:rotate(var(--note-tilt)); }
.sticky-canvas .sticky-note:hover, .sticky-canvas .sticky-note:focus-within { transform:rotate(var(--note-tilt)); }
.sticky-canvas .sticky-note.is-dragging { z-index:20; opacity:1; transition:none; }
.sticky-drag-handle { cursor:grab; touch-action:none; user-select:none; font-size:12px; font-weight:700; padding:5px 0; margin-bottom:6px; }
.sticky-note.is-dragging .sticky-drag-handle { cursor:grabbing; }
