/* assets/css/custom.css */
/* Kustomisasi Estetika Studio 1 Sragen */

:root {
  --primary-navy: #0f172a;
  --primary-slate: #1e293b;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fbbf24;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0b1120;
  color: #f1f5f9;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Calendar Day Styles */
.calendar-day-cell {
  transition: all 0.15s ease-in-out;
  min-height: 80px;
}
@media (min-width: 768px) {
  .calendar-day-cell {
    min-height: 105px;
  }
}
.calendar-day-cell:hover {
  transform: translateY(-1px);
}
.calendar-day-cell.is-today {
  border: 2px solid #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
}
.calendar-day-cell.is-selected {
  outline: 2px solid #38bdf8 !important;
  outline-offset: -2px;
}

/* Hari Minggu (Sunday) */
.calendar-day-cell.is-red-day {
  background: rgba(225, 29, 72, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}
.calendar-day-cell.is-red-day:hover {
  background: rgba(225, 29, 72, 0.22) !important;
}

/* Hari Besar / Libur Nasional (National Holiday) */
.calendar-day-cell.is-holiday {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}
.calendar-day-cell.is-holiday:hover {
  background: rgba(239, 68, 68, 0.28) !important;
}

/* Badge Shifts */
.badge-shift-pagi {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-shift-malam {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-shift-wedding_pagi {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.badge-shift-fleksibel {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Print Styles */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .no-print,
  nav,
  header,
  #modalSchedule,
  #modalPin,
  #floatingAddBtn,
  .action-buttons {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .job-card {
    page-break-inside: avoid;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    margin-bottom: 12px !important;
  }
  .job-card * {
    color: #000000 !important;
  }
}

.print-only {
  display: none;
}

/* Mobile Navigation Drawer Enhancements */
#mobileNavDrawer {
  will-change: transform;
  -webkit-overflow-scrolling: touch;
}
#mobileNavDrawer .overflow-y-auto {
  overscroll-behavior: contain;
}

/* ==================== KWITANSI / INVOICE PAPER RESPONSIVE ==================== */
.invoice-paper-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  width: 100%;
}

/* 1. Kop Surat Kwitansi */
.invoice-kop-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .invoice-kop-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
}
.invoice-force-desktop .invoice-kop-wrapper {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 16px !important;
  margin-bottom: 20px !important;
}

.invoice-kop-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 640px) {
  .invoice-kop-brand {
    gap: 14px;
  }
}
.invoice-force-desktop .invoice-kop-brand {
  gap: 14px !important;
}

/* Kop Surat Alamat & Kontak Resmi */
.invoice-kop-contact {
  margin-top: 4px;
  font-size: 9.5px;
  color: #475569;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
}
@media (min-width: 640px) {
  .invoice-kop-contact {
    font-size: 10px;
    gap: 3px 8px;
    margin-top: 5px;
  }
}
.invoice-force-desktop .invoice-kop-contact {
  font-size: 10px !important;
  gap: 3px 8px !important;
  margin-top: 5px !important;
}

.invoice-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.invoice-contact-label {
  font-weight: 700;
  color: #334155;
}

.invoice-contact-val {
  font-weight: 600;
  color: #0f172a;
}

.invoice-contact-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}
.invoice-contact-link:hover {
  text-decoration: underline;
}

.invoice-contact-dot {
  color: #94a3b8;
  font-weight: 800;
}

/* Kop Surat Metadata (Badge Tipe Dokumen & No/Tanggal) */
.invoice-kop-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  width: 100%;
}
@media (min-width: 640px) {
  .invoice-kop-meta {
    align-items: flex-end;
    text-align: right;
    border-top: none;
    padding-top: 0;
    width: auto;
    gap: 6px;
  }
}

.invoice-meta-badge-wrap {
  display: flex;
}
@media (min-width: 640px) {
  .invoice-meta-badge-wrap {
    justify-content: flex-end;
  }
}

.invoice-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #0f172a;
  color: #f59e0b;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}
@media (min-width: 640px) {
  .invoice-meta-badge {
    font-size: 12px;
    padding: 6px 14px;
    letter-spacing: 1px;
  }
}

.invoice-meta-details-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  gap: 12px;
}
@media (min-width: 640px) {
  .invoice-meta-details-box {
    justify-content: flex-end;
    padding: 5px 10px;
    gap: 14px;
  }
}

.invoice-meta-item {
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .invoice-meta-item {
    text-align: right;
  }
}

.invoice-meta-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}
@media (min-width: 640px) {
  .invoice-meta-label {
    font-size: 9px;
  }
}

.invoice-meta-val-no {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.3px;
}
@media (min-width: 640px) {
  .invoice-meta-val-no {
    font-size: 12px;
  }
}

.invoice-meta-val-date {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}
@media (min-width: 640px) {
  .invoice-meta-val-date {
    font-size: 11.5px;
  }
}

.invoice-meta-divider {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
}

/* Force desktop override */
.invoice-force-desktop .invoice-kop-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  text-align: right !important;
  border-top: none !important;
  padding-top: 0 !important;
  width: auto !important;
  gap: 6px !important;
}
.invoice-force-desktop .invoice-meta-badge-wrap {
  justify-content: flex-end !important;
}
.invoice-force-desktop .invoice-meta-badge {
  font-size: 12px !important;
  padding: 6px 14px !important;
  letter-spacing: 1px !important;
}
.invoice-force-desktop .invoice-meta-details-box {
  justify-content: flex-end !important;
  padding: 5px 12px !important;
  gap: 14px !important;
}
.invoice-force-desktop .invoice-meta-item {
  text-align: right !important;
}
.invoice-force-desktop .invoice-meta-label {
  font-size: 9px !important;
}
.invoice-force-desktop .invoice-meta-val-no {
  font-size: 12px !important;
}
.invoice-force-desktop .invoice-meta-val-date {
  font-size: 11.5px !important;
}

/* 2. Identitas Klien & Lokasi Acara */
.invoice-identitas-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
@media (min-width: 768px) {
  .invoice-identitas-wrapper {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
  }
  .invoice-identitas-client {
    flex: 1.1;
  }
  .invoice-identitas-locations {
    flex: 1.9;
    border-left: 1px dashed #cbd5e1;
    padding-left: 16px;
    border-top: none;
    padding-top: 0;
  }
}
.invoice-force-desktop .invoice-identitas-wrapper {
  flex-direction: row !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 18px !important;
  margin-bottom: 20px !important;
}
.invoice-force-desktop .invoice-identitas-client {
  flex: 1.1 !important;
}
.invoice-force-desktop .invoice-identitas-locations {
  flex: 1.9 !important;
  border-left: 1px dashed #cbd5e1 !important;
  border-top: none !important;
  padding-left: 16px !important;
  padding-top: 0 !important;
}
@media (max-width: 767px) {
  .invoice-identitas-locations {
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
  }
}

/* 3. Tabel Paket Layanan */
.invoice-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .invoice-table-wrapper {
    margin-bottom: 20px;
  }
}
.invoice-force-desktop .invoice-table-wrapper {
  margin-bottom: 20px !important;
  overflow: visible !important;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
@media (min-width: 640px) {
  .invoice-table {
    font-size: 12px;
  }
}

.invoice-td-no {
  padding: 8px 4px;
  text-align: center;
  vertical-align: top;
  font-weight: 700;
  width: 6%;
}
@media (min-width: 640px) {
  .invoice-td-no {
    padding: 10px 8px;
    width: 7%;
  }
}

.invoice-td-service {
  padding: 8px 6px;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .invoice-td-service {
    padding: 10px 12px;
  }
}

.invoice-service-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  margin-bottom: 2px;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .invoice-service-title {
    font-size: 13px;
    margin-bottom: 3px;
  }
}

.invoice-service-desc {
  margin: 0;
  font-size: 10px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .invoice-service-desc {
    font-size: 11px;
    color: #64748b;
  }
}

.invoice-td-price {
  padding: 8px 6px;
  text-align: right;
  vertical-align: top;
  font-weight: 800;
  font-size: 11.5px;
  color: #0f172a;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .invoice-td-price {
    padding: 10px 12px;
    font-size: 13.5px;
  }
}

/* Force desktop override */
.invoice-force-desktop .invoice-table {
  font-size: 12px !important;
}
.invoice-force-desktop .invoice-td-no {
  padding: 10px 8px !important;
  width: 7% !important;
}
.invoice-force-desktop .invoice-td-service {
  padding: 10px 12px !important;
}
.invoice-force-desktop .invoice-service-title {
  font-size: 13px !important;
  margin-bottom: 3px !important;
}
.invoice-force-desktop .invoice-service-desc {
  font-size: 11px !important;
  color: #64748b !important;
}
.invoice-force-desktop .invoice-td-price {
  padding: 10px 12px !important;
  font-size: 13.5px !important;
}

/* 4. Kotak Terbilang & Finansial */
.invoice-finance-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .invoice-finance-wrapper {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
  }
  .invoice-finance-left {
    flex: 1.1;
  }
  .invoice-finance-right {
    flex: 0.9;
  }
}
.invoice-force-desktop .invoice-finance-wrapper {
  flex-direction: row !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
}
.invoice-force-desktop .invoice-finance-left {
  flex: 1.1 !important;
}
.invoice-force-desktop .invoice-finance-right {
  flex: 0.9 !important;
}

/* 5. Tanda Tangan */
.invoice-signatures-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
}
@media (min-width: 640px) {
  .invoice-signatures-wrapper {
    padding-top: 14px;
    gap: 20px;
  }
}
.invoice-force-desktop .invoice-signatures-wrapper {
  padding-top: 14px !important;
  gap: 20px !important;
}
.invoice-sign-box {
  flex: 1;
  max-width: 180px;
  text-align: center;
}
@media (min-width: 640px) {
  .invoice-sign-box {
    max-width: 220px;
  }
}
.invoice-force-desktop .invoice-sign-box {
  max-width: 220px !important;
}

/* 6. Smooth Scrollbar & Touch Optimization untuk Modal Invoice */
#modalInvoice {
  -webkit-overflow-scrolling: touch;
}

#invoicePreviewScrollWrapper {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  min-height: 0 !important;
}

#invoicePaperContainer,
#invoicePaper {
  touch-action: pan-y !important;
}

