/**
 * Kratingdaeng Mudik Activation 2027 Styling
 * Dual Design System:
 * 1. Mobile Android App (Red Theme - Malkist/Kratingdaeng Field App Spec)
 * 2. Purity UI Executive Dashboard (Creative Tim / Soft UI Specification)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-bg-base: #FFF5F5;
  --color-card-bg: #FFFFFF;
  --color-brand-red: #B91C1C;
  --color-brand-red-dark: #881313;
  --color-brand-red-light: #FEF2F2;
  --color-brand-gold: #D97706;

  /* Purity UI Soft Shadows */
  --shadow-purity: 0 20px 27px 0 rgba(0, 0, 0, 0.05);
  --shadow-purity-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

html, body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #FFF5F5;
  color: #1F2937;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: #FFF1F2;
}
::-webkit-scrollbar-thumb {
  background: #FCA5A5;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #DC2626;
}

/* ============================================================== */
/* EXACT ANDROID RED APP SHELL (MALKIST / KRATINGDAENG SPEC)      */
/* ============================================================== */
.android-app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #FFF7F7;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: 0 0 35px rgba(185, 28, 28, 0.08);
}

/* Curved Red Header */
.app-red-header {
  background: linear-gradient(180deg, #991B1B 0%, #B91C1C 45%, #DC2626 100%);
  color: #FFFFFF;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  padding: 16px 16px 28px 16px;
  box-shadow: 0 10px 25px rgba(185, 28, 28, 0.22);
  position: relative;
}

/* Header Action Buttons */
.header-pill-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
}
.header-pill-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.35);
}

.header-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease-in-out;
}
.header-circle-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.35);
}

/* Floating Card that overlaps header slightly */
.floating-top-card {
  margin-top: -16px;
  position: relative;
  z-index: 10;
}

/* Mobile White Cards */
.mobile-card {
  background: #FFFFFF;
  border: 1px solid #FFE4E6;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.04);
}

/* Big Red Pill Action Button (like Selfie Absen) */
.btn-red-action {
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  font-weight: 800;
  border-radius: 9999px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(185, 28, 28, 0.28);
  transition: all 0.15s ease-in-out;
  text-transform: capitalize;
}
.btn-red-action:active {
  transform: scale(0.96);
  background: linear-gradient(180deg, #B91C1C 0%, #991B1B 100%);
}

.btn-red-action-dark {
  background: linear-gradient(180deg, #991B1B 0%, #7F1D1D 100%);
  color: #FFFFFF;
  font-weight: 800;
  border-radius: 9999px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(127, 29, 29, 0.28);
  transition: all 0.15s ease-in-out;
  text-transform: capitalize;
}
.btn-red-action-dark:active {
  transform: scale(0.96);
  background: linear-gradient(180deg, #7F1D1D 0%, #450A0A 100%);
}

/* Quick Menu Grid Button */
.menu-grid-card {
  background: #FFFFFF;
  border: 1px solid #FFE4E6;
  border-radius: 20px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.03);
  user-select: none;
}
.menu-grid-card:active {
  transform: scale(0.92);
  background: #FFF1F2;
}

.menu-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #B91C1C;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

.menu-icon-circle-soft {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #FEE2E2;
  color: #B91C1C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Android Bottom Bar (Malkist/Android Spec) */
.malkist-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-top: 1px solid #FEE2E2;
  padding: 8px 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(185, 28, 28, 0.06);
}

.malkist-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #6B7280;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 8px;
  transition: all 0.15s ease-in-out;
}

.malkist-nav-item.active {
  color: #B91C1C;
}

.malkist-nav-item.active .malkist-nav-icon {
  background: #DC2626;
  color: #FFFFFF;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.malkist-nav-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Stepper Counter Buttons */
.stepper-btn {
  transition: all 0.15s ease-in-out;
  touch-action: manipulation;
  user-select: none;
}
.stepper-btn:active {
  transform: scale(0.92);
}

/* Camera Watermark Preview */
.camera-container {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background-color: #000;
}
.camera-watermark {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(136, 19, 19, 0.88);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  border-left: 4px solid #F59E0B;
  color: #FFFFFF;
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
}

/* Camera Shutter */
.shutter-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  background: #DC2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.4), 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease-in-out;
}
.shutter-btn:active {
  transform: scale(0.88);
  background: #B91C1C;
}

/* Android Toast */
.android-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F2937;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
}
.android-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================== */
/* PURITY UI / SOFT UI DASHBOARD STYLES (CREATIVE TIM SPEC)       */
/* ============================================================== */
.purity-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-purity);
  border-radius: 1.25rem;
  transition: all 0.25s ease-in-out;
}
.purity-card:hover {
  box-shadow: var(--shadow-purity-lg);
}

.purity-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.purity-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #718096;
  transition: all 0.2s ease-in-out;
}
.purity-nav-link:hover {
  color: #1A202C;
  background-color: #F8FAFC;
}
.purity-nav-link.active {
  background: #FFFFFF;
  color: #1A202C;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
}
.purity-nav-link.active .purity-icon-box {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
}

/* ============================================================== */
/* UNIVER SPREADSHEET ENGINE CUSTOM STYLING                       */
/* ============================================================== */
.univer-wrapper {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.univer-toolbar {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}

.univer-tool-btn {
  padding: 4px 8px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #4A5568;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.univer-tool-btn:hover {
  background: #EDF2F7;
  color: #1A202C;
  border-color: #CBD5E1;
}
.univer-tool-btn.active {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
}

.univer-formula-bar {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
}

.univer-cell-address {
  width: 58px;
  text-align: center;
  font-weight: 700;
  color: #2B6CB0;
  background: #EBF8FF;
  border: 1px solid #BEE3F8;
  border-radius: 6px;
  padding: 3px 6px;
}

.univer-grid-table {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  table-layout: auto;
}

.univer-grid-table th {
  background: #F1F5F9;
  color: #475569;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #CBD5E1;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  user-select: none;
}

.univer-grid-table td {
  padding: 7px 10px;
  border: 1px solid #E2E8F0;
  white-space: nowrap;
  transition: background 0.1s;
  cursor: cell;
}

.univer-row-num {
  background: #F8FAFC !important;
  color: #64748B !important;
  font-weight: 700 !important;
  text-align: center !important;
  width: 38px;
  user-select: none;
  border-right: 1px solid #CBD5E1 !important;
}

.univer-grid-table tr:hover td:not(.univer-row-num) {
  background: #F8FAFC;
}

.univer-grid-table td.selected {
  outline: 2px solid #2563EB !important;
  outline-offset: -1px;
  background: #EFF6FF !important;
}

.univer-grid-table td.editing {
  outline: 2px solid #10B981 !important;
  background: #FFFFFF !important;
  padding: 0;
}

.univer-grid-table td.editing input {
  width: 100%;
  height: 100%;
  padding: 6px 8px;
  border: none;
  outline: none;
  font-size: 11px;
  font-family: inherit;
  font-weight: inherit;
  text-align: inherit;
}

.univer-bottom-tabs {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.univer-tab-item {
  padding: 5px 14px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  color: #64748B;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.univer-tab-item:hover {
  color: #1E293B;
  background: #F1F5F9;
}
.univer-tab-item.active {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1 #CBD5E1 #FFFFFF #CBD5E1;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.03);
}

