/* iOS 18 True Dark Theme & Utility CSS for Priest Life Mini App */
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 400;
  src: local('SF Pro Display'), local('-apple-system'), url('./fonts/SFPRODISPLAYREGULAR.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 500;
  src: local('SF Pro Display Medium'), local('-apple-system'), url('./fonts/SFPRODISPLAYMEDIUM.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 600;
  src: local('SF Pro Display Semibold'), local('-apple-system'), url('./fonts/SFPRODISPLAYMEDIUM.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  font-style: normal;
  font-weight: 700;
  src: local('SF Pro Display Bold'), local('-apple-system'), url('./fonts/SFPRODISPLAYBOLD.woff') format('woff');
  font-display: swap;
}

:root {
  --bg-system: #000000;
  --bg-secondary: #1C1C1E;
  --bg-tertiary: #2C2C2E;
  --label-primary: #FFFFFF;
  --label-secondary: rgba(235, 235, 245, 0.60);
  --label-tertiary: rgba(235, 235, 245, 0.30);
  --separator: rgba(255, 255, 255, 0.08);
  --accent-blue: #0A84FF;
  --accent-cyan: #32ADE6;
  --accent-green: #30D158;
  --accent-orange: #FF9F0A;
  --chart-grid: rgba(255, 255, 255, 0.06);
  --chart-neutral: #8E8E93;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Tailwind-преflight убрали — базовый сброс для элементов форм нужен свой */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}

body {
  background-color: var(--bg-system);
  color: var(--label-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
  line-height: 1.5;
}

.num {
  font-feature-settings: "tnum" 1, "cv01" 1;
}

.sf-display {
  letter-spacing: -0.025em;
}

.ios-widget-card {
  background-color: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--separator);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.speech-bubble {
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 12px;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg-tertiary) transparent transparent transparent;
}

.chart-bar-clickable {
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.chart-bar-clickable:hover, .chart-bar-clickable:active {
  opacity: 0.8;
}

.skeleton-box {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.w-full { width: 100%; }
.w-2\.5 { width: 0.625rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-\[12px\] { width: 12px; }
.max-w-\[390px\] { max-width: 390px; }

.h-full { height: 100%; }
.h-auto { height: auto; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.h-1 { height: 0.25rem; }
.h-2\.5 { height: 0.625rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-10 { height: 2.5rem; }
.h-28 { height: 7rem; }
.h-44 { height: 11rem; }
.h-48 { height: 12rem; }
.h-\[78px\] { height: 78px; }
.h-\[116px\] { height: 116px; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-1\.5 { padding-top: 0.375rem; }
.pt-2 { padding-top: 0.5rem; }
.pr-0\.5 { padding-right: 0.125rem; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-2 { margin-top: 0.5rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.625rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-\[3px\] { gap: 3px; }

.border { border-width: 1px; border-style: solid; border-color: var(--separator); }
.border-0 { border-width: 0px; }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--separator); }
.border-dashed { border-style: dashed; }
.border-\[var\(--separator\)\] { border-color: var(--separator); }
.border-\[var\(--label-tertiary\)\] { border-color: var(--label-tertiary); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.ring-2 { box-shadow: 0 0 0 2px #FFFFFF; }
.ring-white { --ring-color: #ffffff; }
.ring-offset-2 { outline: 2px solid transparent; outline-offset: 2px; }
.ring-offset-black { --ring-offset-color: #000000; }

.bg-\[var\(--bg-system\)\] { background-color: var(--bg-system); }
.bg-\[var\(--bg-secondary\)\] { background-color: var(--bg-secondary); }
.bg-\[var\(--bg-tertiary\)\] { background-color: var(--bg-tertiary); }
.bg-\[var\(--accent-blue\)\] { background-color: var(--accent-blue); }
.bg-\[var\(--accent-green\)\] { background-color: var(--accent-green); }
.bg-\[var\(--label-primary\)\] { background-color: var(--label-primary); }
.bg-\[rgba\(255\,255\,255\,0\.04\)\] { background-color: rgba(255, 255, 255, 0.04); }
.bg-\[rgba\(255\,255\,255\,0\.08\)\] { background-color: rgba(255, 255, 255, 0.08); }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-\[8px\] { font-size: 8px; line-height: 10px; }
.text-\[9px\] { font-size: 9px; line-height: 12px; }
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.text-\[11px\] { font-size: 11px; line-height: 15px; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.line-through { text-decoration: line-through; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-black { color: #000000; }
.text-white { color: #FFFFFF; }
.text-\[var\(--label-primary\)\] { color: var(--label-primary); }
.text-\[var\(--label-secondary\)\] { color: var(--label-secondary); }
.text-\[var\(--label-tertiary\)\] { color: var(--label-tertiary); }
.text-\[var\(--accent-blue\)\] { color: var(--accent-blue); }
.text-\[var\(--accent-green\)\] { color: var(--accent-green); }
.text-\[var\(--accent-orange\)\] { color: var(--accent-orange); }
.text-\[var\(--bg-system\)\] { color: var(--bg-system); }

.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.active\:scale-95:active { transform: scale(0.95); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

@media (min-width: 640px) {
  .sm\:h-\[844px\] { height: 844px; }
  .sm\:p-4 { padding: 1rem; }
  .sm\:rounded-\[44px\] { border-radius: 44px; }
  .sm\:border { border-width: 1px; }
  .sm\:border-\[rgba\(255\,255\,255\,0\.1\)\] { border-color: rgba(255, 255, 255, 0.1); }
}
