/* ==========================================================================
   MiceyStore Finance — Apple Design System (iOS & macOS HIG Theme)
   ========================================================================== */

@layer base {
    :root {
        --apple-bg: #f5f5f7;
        --apple-card: #ffffff;
        --apple-blue: #0071e3;
        --apple-blue-hover: #0077ED;
        --apple-green: #34c759;
        --apple-red: #ff3b30;
        --apple-orange: #ff9500;
        --apple-yellow: #ffcc00;
        --apple-purple: #af52de;
        --apple-indigo: #5856d6;
        --apple-teal: #30b0c7;
        --apple-mint: #00c7be;
        --apple-label-primary: #1d1d1f;
        --apple-label-secondary: #6e6e73;
        --apple-label-tertiary: #86868b;
        --apple-border: rgba(0, 0, 0, 0.08);
        --apple-separator: rgba(60, 60, 67, 0.12);
    }

    html, body {
        width: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        background-color: #f5f5f7;
        color: #1d1d1f;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Helvetica Neue", "Inter", system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        letter-spacing: -0.011em;
        overscroll-behavior-y: none;
    }

    .pb-safe {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .pt-safe {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* Typography */
.font-sf-display, .font-headline {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Helvetica Neue", "Inter", sans-serif;
    letter-spacing: -0.022em;
}

.font-sf-text, .font-sans {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", "Inter", system-ui, sans-serif;
    letter-spacing: -0.011em;
}

.font-sf-mono, .font-mono {
    font-family: "SF Mono", Menlo, Monaco, Consolas, "JetBrains Mono", monospace;
    font-variant-numeric: tabular-nums;
}

/* Apple Shadows */
.card-shadow, .apple-card-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px -4px rgba(0, 0, 0, 0.03);
}

.apple-card-hover {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
}

.apple-float-shadow {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.04);
}

.modal-shadow, .apple-modal-shadow {
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18), 0 12px 24px -8px rgba(0, 0, 0, 0.08);
}

/* Glassmorphism / Frosted Glass */
.apple-glass {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.apple-glass-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.apple-glass-sidebar {
    background: rgba(248, 248, 250, 0.85);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

/* iOS Segmented Control */
.ios-segmented-container {
    background: rgba(120, 120, 128, 0.12);
    border-radius: 12px;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.ios-segmented-item {
    border-radius: 9px;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    color: #1d1d1f;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.ios-segmented-item.active {
    background: #ffffff;
    color: #1d1d1f;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Form Inputs */
.apple-input {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 13px;
    transition: all 0.2s ease;
    color: #1d1d1f;
}

.apple-input:focus, input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important;
}

.apple-input-inset {
    background: rgba(120, 120, 128, 0.08);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.apple-input-inset:focus {
    outline: none !important;
    background: #ffffff !important;
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16) !important;
}

/* Apple Buttons */
.apple-btn-primary {
    background: #0071e3;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 113, 227, 0.2);
}
.apple-btn-primary:hover {
    background: #0077ED;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}
.apple-btn-primary:active {
    transform: scale(0.97);
}

.apple-btn-secondary {
    background: rgba(120, 120, 128, 0.1);
    color: #1d1d1f;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-btn-secondary:hover {
    background: rgba(120, 120, 128, 0.18);
}
.apple-btn-secondary:active {
    transform: scale(0.97);
}

/* Status Badges */
.badge-pending {
    background-color: rgba(255, 149, 0, 0.12);
    color: #c95100;
    border: 1px solid rgba(255, 149, 0, 0.25);
}
.badge-confirmed {
    background-color: rgba(52, 199, 89, 0.12);
    color: #248a3d;
    border: 1px solid rgba(52, 199, 89, 0.25);
}
.badge-void {
    background-color: rgba(120, 120, 128, 0.1);
    color: #86868b;
    border: 1px solid rgba(120, 120, 128, 0.2);
    text-decoration: line-through;
}

.badge-success { background: rgba(52, 199, 89, 0.12); color: #248a3d; border: 1px solid rgba(52, 199, 89, 0.25); }
.badge-danger { background: rgba(255, 59, 48, 0.1); color: #d70015; border: 1px solid rgba(255, 59, 48, 0.2); }
.badge-info { background: rgba(0, 113, 227, 0.1); color: #0071e3; border: 1px solid rgba(0, 113, 227, 0.2); }
.badge-warning { background: rgba(255, 149, 0, 0.12); color: #c95100; border: 1px solid rgba(255, 149, 0, 0.25); }
.badge-purple { background: rgba(175, 82, 222, 0.12); color: #8944ab; border: 1px solid rgba(175, 82, 222, 0.25); }
.badge-orange { background: rgba(255, 149, 0, 0.12); color: #c95100; border: 1px solid rgba(255, 149, 0, 0.25); }
.badge-teal { background: rgba(48, 176, 199, 0.12); color: #00778a; border: 1px solid rgba(48, 176, 199, 0.25); }
.badge-secondary { background: rgba(120, 120, 128, 0.1); color: #6e6e73; border: 1px solid rgba(120, 120, 128, 0.2); }
.badge-light { background: rgba(120, 120, 128, 0.06); color: #6e6e73; border: 1px solid rgba(120, 120, 128, 0.15); }

/* Inset Grouped List */
.ios-inset-group {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.ios-row {
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s ease;
}
.ios-row:not(:last-child) {
    border-bottom: 1px solid rgba(60, 60, 67, 0.08);
}
.ios-row:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

/* Custom SF Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.16);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.28);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Tabular figures */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Subtle animations */
@keyframes dynamicIslandDrop {
    0% {
        transform: translateY(-20px) scale(0.92);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.animate-dynamic-island {
    animation: dynamicIslandDrop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appleFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-apple-fade {
    animation: appleFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


