/* ==========================================================================
   Sales App - Kalender & Smart Follow-Up Reminder System
   File: jadwal_input.css
   ========================================================================== */

:root {
  --primary-red: #c8102e;
  --primary-red-hover: #a80c25;
  --primary-blue: #0f172a;
  --accent-blue: #2563eb;
  --accent-blue-light: #eff6ff;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --card-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
}

body {
  background-color: #f8fafc;
  color: var(--text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.jadwal-container,
.jadwal-page-wrapper {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

/* ── Top Hero / Statistics Bar ────────────────────────────────────────── */
.jadwal-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #172554 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.jadwal-hero::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.jadwal-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.jadwal-hero-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.jadwal-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ff4d6d;
}

.jadwal-hero-title-box h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.jadwal-hero-title-box p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.btn-hero-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c8102e 0%, #ef4444 100%);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-hero-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.5);
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.jadwal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.stat-pill-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.stat-pill-card:hover {
  background: rgba(255, 255, 255, 0.14);
}

.stat-pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.stat-pill-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.stat-pill-icon.green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.stat-pill-icon.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.stat-pill-icon.red { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.stat-pill-text {
  display: flex;
  flex-direction: column;
}

.stat-pill-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.stat-pill-lbl {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

/* ── Main Two-Column Layout ───────────────────────────────────────────── */
.jadwal-main-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.jadwal-col-left,
.jadwal-col-right {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .jadwal-main-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
}

/* ── Calendar Container ───────────────────────────────────────────────── */
.calendar-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 24px;
}

.calendar-header {
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-month-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-month-title h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--text-dark);
}

.calendar-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-cal-nav:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-cal-today {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cal-today:hover {
  background: #e2e8f0;
}

/* Calendar Days Grid */
.calendar-grid-wrapper {
  padding: 18px 20px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.calendar-weekdays div:nth-child(6),
.calendar-weekdays div:nth-child(7) {
  color: #ef4444;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-day-cell {
  aspect-ratio: 1 / 1;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #ffffff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.cal-day-cell:hover:not(.other-month) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.cal-day-cell.other-month {
  color: #cbd5e1;
  cursor: default;
}

.cal-day-number {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

.cal-day-cell.is-today .cal-day-number {
  color: var(--primary-red);
  font-weight: 900;
}

.cal-day-cell.is-today {
  border-color: rgba(200, 16, 46, 0.4);
  background: #fff5f6;
}

.cal-day-cell.is-selected {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
  transform: scale(1.05);
  border-color: #0f172a;
}

.cal-day-cell.is-selected .cal-day-number {
  color: #ffffff !important;
}

/* Event Dots in Calendar Cell */
.cal-event-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: auto;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cal-dot.dot-prospek { background: #3b82f6; }
.cal-dot.dot-stnk { background: #f59e0b; }
.cal-dot.dot-servis { background: #10b981; }
.cal-dot.dot-janjitemu { background: #8b5cf6; }
.cal-dot.dot-do { background: #ec4899; }
.cal-dot.dot-other { background: #64748b; }

.cal-event-badge-count {
  font-size: 9px;
  font-weight: 800;
  background: var(--primary-red);
  color: #ffffff;
  border-radius: 8px;
  padding: 1px 4px;
  line-height: 1.1;
}

/* Calendar Legend */
.calendar-legend {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Selected Date Agenda Card ────────────────────────────────────────── */
.agenda-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 22px;
  margin-bottom: 24px;
}

.agenda-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 10px;
}

.agenda-date-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-date-badge i {
  font-size: 20px;
  color: var(--primary-red);
}

.agenda-date-badge h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--text-dark);
}

.agenda-count-pill {
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Agenda Items Timeline */
.agenda-item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-item-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.agenda-item-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.agenda-item-card.is-done {
  opacity: 0.7;
  background: #f1f5f9;
}

.agenda-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.agenda-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 8px;
}

.agenda-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cat-stnk { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.cat-servis { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.cat-prospek { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.cat-janjitemu { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.cat-do { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }
.cat-other { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

.agenda-item-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
}

.agenda-item-card.is-done .agenda-item-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.agenda-item-customer {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.agenda-item-notes {
  font-size: 12px;
  color: var(--text-muted);
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  margin: 0;
  line-height: 1.4;
}

/* Agenda Actions Bar */
.agenda-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.btn-action-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-action-wa:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}

.btn-action-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-toggle:hover {
  background: #f1f5f9;
}

.btn-action-toggle.btn-done {
  color: #10b981;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.btn-action-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #ffffff;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.btn-action-delete:hover {
  background: #fef2f2;
}

/* Agenda Empty State */
.agenda-empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
}

.agenda-empty-icon {
  font-size: 36px;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.agenda-empty-state p {
  margin: 0 0 16px 0;
  font-size: 13.5px;
  font-weight: 600;
}

.btn-empty-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-empty-add:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* ── Form Card ────────────────────────────────────────────────────────── */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 24px;
}

.form-card-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.form-card-header h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px 0;
  color: var(--text-dark);
}

.form-card-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Preset Chips (Quick 1-Tap Category Selector) */
.preset-chips-box {
  margin-bottom: 22px;
}

.preset-chips-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: block;
}

.preset-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.preset-chip:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.preset-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.preset-chip.chip-stnk.active {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.preset-chip.chip-servis.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-light);
  background: #f8fafc;
  font-size: 13.5px;
  color: var(--text-dark);
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Status Chips */
.status-chip-row {
  display: flex;
  gap: 10px;
}

.status-chip-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-dark);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.status-chip-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* Buttons */
.form-buttons-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-dark);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-primary-submit {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #c8102e 0%, #b91c1c 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-submit:hover {
  background: linear-gradient(135deg, #a80c25 0%, #991b1b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.45);
}

/* Header Page compatibility fallback */
.header-page {
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE RULES (iPhone XR, 11/12/13/14, Samsung Galaxy, etc.)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .jadwal-main-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .mobile-app,
  .jadwal-page-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .jadwal-container,
  .jadwal-page-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 8px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* ── 1. Hero Card Responsive ────────────────────────── */
  .jadwal-hero {
    padding: 14px 12px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .jadwal-hero-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .jadwal-hero-title-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
  }

  .jadwal-hero-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .jadwal-hero-title-box h1 {
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    margin: 0 0 2px 0 !important;
  }

  .jadwal-hero-title-box p {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    color: #94a3b8 !important;
    margin: 0 !important;
  }

  .btn-hero-add {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    margin-top: 2px !important;
  }

  .jadwal-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-pill-card {
    padding: 8px 8px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-pill-icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .stat-pill-text {
    min-width: 0 !important;
    overflow: hidden !important;
    flex: 1 !important;
  }

  .stat-pill-val {
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .stat-pill-lbl {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
    display: block !important;
  }

  /* ── 2. Grid & Columns ────────────────────────── */
  .jadwal-main-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .jadwal-col-left,
  .jadwal-col-right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* ── 3. Interactive Calendar Card ────────────────────────── */
  .calendar-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
  }

  .calendar-header {
    padding: 10px 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calendar-month-title {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .calendar-month-title i {
    font-size: 15px !important;
    flex-shrink: 0 !important;
  }

  .calendar-month-title h2 {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .calendar-nav-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  .btn-cal-today {
    padding: 5px 8px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    border: 1px solid var(--border-light) !important;
    background: #f8fafc !important;
    color: var(--text-dark) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
  }

  .btn-cal-nav {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    border: 1px solid var(--border-light) !important;
    background: #ffffff !important;
    color: var(--text-dark) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
  }

  .calendar-grid-wrapper {
    padding: 8px 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .calendar-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px !important;
    text-align: center !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    margin-bottom: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calendar-weekdays div {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    padding: 0 !important;
  }

  .calendar-days {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .cal-day-cell {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    aspect-ratio: auto !important;
    padding: 2px 1px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    overflow: hidden !important;
    user-select: none !important;
  }

  .cal-day-number {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin-top: 2px !important;
  }

  .cal-day-cell.is-selected {
    background: #0f172a !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3) !important;
    outline: none !important;
  }

  .cal-day-cell.is-selected .cal-day-number {
    color: #ffffff !important;
  }

  .cal-event-dots {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    margin-top: auto !important;
    margin-bottom: 2px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    max-width: 100% !important;
  }

  .cal-dot {
    width: 4px !important;
    height: 4px !important;
    min-width: 4px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .cal-event-badge-count {
    font-size: 7.5px !important;
    padding: 0 2px !important;
    line-height: 1 !important;
    border-radius: 4px !important;
  }

  .calendar-legend {
    padding: 8px 8px !important;
    background: #f8fafc !important;
    border-top: 1px solid var(--border-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px 8px !important;
    flex-wrap: wrap !important;
    font-size: 9.5px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    font-size: 9.5px !important;
  }

  /* ── 4. Selected Date Agenda Card ────────────────────────── */
  .agenda-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .agenda-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .agenda-date-badge {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .agenda-date-badge i {
    font-size: 14px !important;
    color: var(--primary-red) !important;
    flex-shrink: 0 !important;
  }

  .agenda-date-badge h3 {
    font-size: 12px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .agenda-count-pill {
    font-size: 9.5px !important;
    padding: 3px 7px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* ── 5. Form Input Section ────────────────────────── */
  .form-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .form-card-header h3 {
    font-size: 14px !important;
  }

  .form-card-header p {
    font-size: 11px !important;
  }

  .preset-chips-box {
    margin-bottom: 12px !important;
  }

  .preset-chips-label {
    font-size: 11px !important;
  }

  .preset-chips-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .preset-chip {
    padding: 7px 6px !important;
    font-size: 10.5px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .form-row-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .form-group {
    margin-bottom: 10px !important;
  }

  .form-group label {
    font-size: 11.5px !important;
  }

  .form-control {
    font-size: 12px !important;
    padding: 9px 10px !important;
  }

  .form-buttons-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .btn-secondary,
  .btn-primary-submit {
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  /* ── 6. Floating Action Widget Button Safe Position ────── */
  #btnToggleAiCopilot {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    width: 42px !important;
    height: 42px !important;
    z-index: 99990 !important;
  }
}

/* ── 7. Extra Compact Devices (<= 360px, e.g. Samsung Galaxy S20/S21) ── */
@media (max-width: 360px) {
  .jadwal-container,
  .jadwal-page-wrapper {
    padding: 0 4px !important;
  }

  .calendar-grid-wrapper {
    padding: 6px 2px !important;
  }

  .calendar-weekdays {
    font-size: 9px !important;
    gap: 1px !important;
  }

  .calendar-days {
    gap: 1.5px !important;
  }

  .cal-day-cell {
    height: 36px !important;
    min-height: 36px !important;
    border-radius: 5px !important;
    padding: 1px !important;
  }

  .cal-day-number {
    font-size: 10.5px !important;
  }

  .cal-dot {
    width: 3px !important;
    height: 3px !important;
  }
}
