/*
* =============================================
* Apple Theme CSS v1.0
* KareKod Merkezi - Premium Kare Kod Uygulamaları
* iOS 17 Pro Inspired Design System
* www.karekodmerkezi.com
* =============================================
*
* KULLANIM:
* <link href="distCustom/css/apple-theme.css" rel="stylesheet" />
*
* GEREKSINIMLER:
* - Bootstrap 5.3.x
* - SF Pro veya Inter font
*
* CLASSES:
* .apple-card        - iOS tarzı kart
* .apple-btn         - iOS tarzı buton
* .apple-input       - iOS tarzı input
* .apple-modal       - iOS tarzı modal
* .apple-sidebar     - iOS tarzı sidebar
* .glass             - Glassmorphism efekti
* .theme-dark        - Dark mode (body'e ekle)
* =============================================
*/

/* =============================================
   GOOGLE FONTS - INTER (SF Pro alternatifi)
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* =============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================= */
:root {
    /* Colors - Light Mode */
    --apple-bg-primary: #FFFFFF;
    --apple-bg-secondary: #F2F2F7;
    --apple-bg-tertiary: #FFFFFF;
    --apple-bg-grouped: #F2F2F7;

    /* Text Colors */
    --apple-text-primary: #000000;
    --apple-text-secondary: #3C3C43;
    --apple-text-tertiary: #3C3C4399;
    --apple-text-quaternary: #3C3C434D;
    --apple-text-placeholder: #3C3C4380;

    /* System Colors */
    --apple-blue: #007AFF;
    --apple-blue-light: #5AC8FA;
    --apple-green: #34C759;
    --apple-indigo: #5856D6;
    --apple-orange: #FF9500;
    --apple-pink: #FF2D55;
    --apple-purple: #AF52DE;
    --apple-red: #FF3B30;
    --apple-teal: #5AC8FA;
    --apple-yellow: #FFCC00;
    --apple-gray: #8E8E93;
    --apple-gray2: #AEAEB2;
    --apple-gray3: #C7C7CC;
    --apple-gray4: #D1D1D6;
    --apple-gray5: #E5E5EA;
    --apple-gray6: #F2F2F7;

    /* Gradients */
    --apple-gradient-blue: linear-gradient(180deg, #007AFF 0%, #0055D4 100%);
    --apple-gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --apple-gradient-sunset: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    --apple-gradient-ocean: linear-gradient(135deg, #667eea 0%, #5AC8FA 100%);
    --apple-gradient-forest: linear-gradient(135deg, #34C759 0%, #5AC8FA 100%);

    /* Glassmorphism */
    --apple-glass-bg: rgba(255, 255, 255, 0.72);
    --apple-glass-border: rgba(255, 255, 255, 0.18);
    --apple-glass-blur: 20px;

    /* Shadows */
    --apple-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --apple-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --apple-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --apple-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --apple-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --apple-shadow-glow: 0 0 40px rgba(0, 122, 255, 0.15);

    /* Border Radius */
    --apple-radius-xs: 6px;
    --apple-radius-sm: 10px;
    --apple-radius-md: 14px;
    --apple-radius-lg: 20px;
    --apple-radius-xl: 28px;
    --apple-radius-2xl: 40px;
    --apple-radius-full: 9999px;

    /* Spacing */
    --apple-space-1: 4px;
    --apple-space-2: 8px;
    --apple-space-3: 12px;
    --apple-space-4: 16px;
    --apple-space-5: 20px;
    --apple-space-6: 24px;
    --apple-space-8: 32px;
    --apple-space-10: 40px;
    --apple-space-12: 48px;
    --apple-space-16: 64px;

    /* Typography */
    --apple-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --apple-font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --apple-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --apple-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --apple-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --apple-transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index */
    --apple-z-dropdown: 1000;
    --apple-z-sticky: 1020;
    --apple-z-fixed: 1030;
    --apple-z-modal-backdrop: 1040;
    --apple-z-modal: 1050;
    --apple-z-popover: 1060;
    --apple-z-tooltip: 1070;
    --apple-z-toast: 1080;

    /* Sidebar */
    --apple-sidebar-width: 280px;
    --apple-sidebar-collapsed-width: 80px;
}

/* =============================================
   DARK MODE
   ============================================= */
.theme-dark,
[data-theme="dark"] {
    --apple-bg-primary: #000000;
    --apple-bg-secondary: #1C1C1E;
    --apple-bg-tertiary: #2C2C2E;
    --apple-bg-grouped: #1C1C1E;

    --apple-text-primary: #FFFFFF;
    --apple-text-secondary: #EBEBF5;
    --apple-text-tertiary: #EBEBF599;
    --apple-text-quaternary: #EBEBF54D;
    --apple-text-placeholder: #EBEBF580;

    --apple-glass-bg: rgba(28, 28, 30, 0.85);
    --apple-glass-border: rgba(255, 255, 255, 0.1);

    --apple-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --apple-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --apple-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --apple-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* =============================================
   BASE RESET & TYPOGRAPHY
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--apple-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--apple-text-primary);
    background-color: var(--apple-bg-grouped);
    min-height: 100vh;
    transition: background-color var(--apple-transition), color var(--apple-transition);
}

/* Typography Scale */
.apple-title-large {
    font-size: 2.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.apple-title-1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.apple-title-2 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.apple-title-3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.apple-headline {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.apple-body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.apple-callout {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.45;
}

.apple-subhead {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--apple-text-secondary);
}

.apple-footnote {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    color: var(--apple-text-tertiary);
}

.apple-caption {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--apple-text-tertiary);
}

.apple-overline {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--apple-text-tertiary);
}

/* =============================================
   LAYOUT - APP SHELL
   ============================================= */
.apple-app {
    display: flex;
    min-height: 100vh;
}

.apple-main {
    flex: 1;
    margin-left: var(--apple-sidebar-width);
    padding: var(--apple-space-6);
    transition: margin-left var(--apple-transition);
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .apple-main {
        margin-left: 0;
        padding: var(--apple-space-4);
    }
}

/* =============================================
   SIDEBAR
   ============================================= */
.apple-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--apple-sidebar-width);
    height: 100vh;
    background: var(--apple-glass-bg);
    backdrop-filter: blur(var(--apple-glass-blur));
    -webkit-backdrop-filter: blur(var(--apple-glass-blur));
    border-right: 1px solid var(--apple-glass-border);
    display: flex;
    flex-direction: column;
    z-index: 2005;
    transition: transform var(--apple-transition), width var(--apple-transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.apple-sidebar-header {
    padding: var(--apple-space-6) var(--apple-space-5);
    border-bottom: 1px solid var(--apple-gray5);
}

.apple-sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--apple-space-3);
    text-decoration: none;
    color: var(--apple-text-primary);
}

.apple-sidebar-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--apple-gradient-purple);
    border-radius: var(--apple-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--apple-shadow);
}

.apple-sidebar-brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.apple-sidebar-badge {
    margin-top: var(--apple-space-2);
    display: inline-block;
    padding: 4px 10px;
    background: var(--apple-blue);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--apple-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.apple-sidebar-nav {
    flex: 1;
    padding: var(--apple-space-4) 0;
}

.apple-nav-section {
    margin-bottom: var(--apple-space-6);
}

.apple-nav-section-title {
    padding: 0 var(--apple-space-5) var(--apple-space-2);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--apple-text-tertiary);
}

.apple-nav-item {
    padding: 0 var(--apple-space-3);
}

.apple-nav-link {
    display: flex;
    align-items: center;
    gap: var(--apple-space-3);
    padding: var(--apple-space-3) var(--apple-space-4);
    border-radius: var(--apple-radius-sm);
    text-decoration: none;
    color: var(--apple-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--apple-transition-fast);
}

.apple-nav-link:hover {
    background: var(--apple-gray5);
    color: var(--apple-text-primary);
}

.apple-nav-link.active {
    background: var(--apple-blue);
    color: white;
    box-shadow: var(--apple-shadow);
}

.apple-nav-link-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--apple-text-tertiary);
    transition: all 0.2s;
}

.apple-nav-link-icon svg {
    width: 20px;
    height: 20px;
}

.apple-sidebar-footer {
    padding: var(--apple-space-5);
    border-top: 1px solid var(--apple-gray5);
}

.apple-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--apple-space-3);
}

.apple-sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--apple-radius-full);
    background: var(--apple-gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.apple-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.apple-sidebar-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--apple-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apple-sidebar-user-role {
    font-size: 0.75rem;
    color: var(--apple-text-tertiary);
}

/* Sidebar Overlay (Mobile) */
.apple-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2004;
    opacity: 0;
    transition: opacity var(--apple-transition);
    pointer-events: none;
}

.apple-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .apple-sidebar {
        transform: translateX(-100%);
    }

    .apple-sidebar.open {
        transform: translateX(0);
    }

    .apple-sidebar-overlay {
        display: block;
    }
}

/* =============================================
   CARDS
   ============================================= */
.apple-card {
    background: var(--apple-bg-primary);
    border-radius: var(--apple-radius-lg);
    box-shadow: var(--apple-shadow);
    overflow: hidden;
    transition: transform var(--apple-transition), box-shadow var(--apple-transition);
}

.apple-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--apple-shadow-md);
}

.apple-card-header {
    padding: var(--apple-space-5) var(--apple-space-6);
    border-bottom: 1px solid var(--apple-gray5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--apple-space-4);
}

.apple-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--apple-text-primary);
    margin: 0;
}

.apple-card-subtitle {
    font-size: 0.875rem;
    color: var(--apple-text-tertiary);
    margin-top: 2px;
}

.apple-card-body {
    padding: var(--apple-space-8);
}

.apple-card-footer {
    padding: var(--apple-space-4) var(--apple-space-6);
    border-top: 1px solid var(--apple-gray5);
    background: var(--apple-bg-secondary);
}

/* Card Variants */
.apple-card.glass {
    background: var(--apple-glass-bg);
    backdrop-filter: blur(var(--apple-glass-blur));
    -webkit-backdrop-filter: blur(var(--apple-glass-blur));
    border: 1px solid var(--apple-glass-border);
}

.apple-card.gradient-blue {
    background: var(--apple-gradient-blue);
    color: white;
}

.apple-card.gradient-purple {
    background: var(--apple-gradient-purple);
    color: white;
}

/* Stat Cards */
.apple-stat-card {
    padding: var(--apple-space-5);
}

.apple-stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--apple-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--apple-space-4);
}

.apple-stat-card-icon.blue {
    background: rgba(0, 122, 255, 0.12);
    color: var(--apple-blue);
}

.apple-stat-card-icon.green {
    background: rgba(52, 199, 89, 0.12);
    color: var(--apple-green);
}

.apple-stat-card-icon.purple {
    background: rgba(175, 82, 222, 0.12);
    color: var(--apple-purple);
}

.apple-stat-card-icon.orange {
    background: rgba(255, 149, 0, 0.12);
    color: var(--apple-orange);
}

.apple-stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--apple-text-primary);
    line-height: 1;
}

.apple-stat-card-label {
    font-size: 0.875rem;
    color: var(--apple-text-tertiary);
    margin-top: var(--apple-space-2);
}

/* =============================================
   BUTTONS
   ============================================= */
.apple-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--apple-space-2);
    padding: 12px 20px;
    font-family: var(--apple-font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border-radius: var(--apple-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--apple-transition-fast);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.apple-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Variants */
.apple-btn-primary {
    background: var(--apple-blue);
    color: white;
}

.apple-btn-primary:hover:not(:disabled) {
    background: #0066CC;
    transform: translateY(-1px);
    box-shadow: var(--apple-shadow-md);
}

.apple-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.apple-btn-secondary {
    background: var(--apple-gray5);
    color: var(--apple-text-primary);
}

.apple-btn-secondary:hover:not(:disabled) {
    background: var(--apple-gray4);
}

.apple-btn-ghost {
    background: transparent;
    color: var(--apple-blue);
}

.apple-btn-ghost:hover:not(:disabled) {
    background: rgba(0, 122, 255, 0.08);
}

.apple-btn-danger {
    background: var(--apple-red);
    color: white;
}

.apple-btn-danger:hover:not(:disabled) {
    background: #E03128;
}

.apple-btn-success {
    background: var(--apple-green);
    color: white;
}

.apple-btn-success:hover:not(:disabled) {
    background: #2DB350;
}

/* Button Sizes */
.apple-btn-sm {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: var(--apple-radius-xs);
}

.apple-btn-lg {
    padding: 16px 28px;
    font-size: 1.0625rem;
    border-radius: var(--apple-radius-md);
}

.apple-btn-xl {
    padding: 20px 36px;
    font-size: 1.125rem;
    border-radius: var(--apple-radius-lg);
}

.apple-btn-block {
    width: 100%;
}

/* Icon Button */
.apple-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--apple-radius-full);
}

.apple-btn-icon.sm {
    width: 36px;
    height: 36px;
}

/* Ripple Effect */
.apple-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.apple-form-group {
    margin-bottom: var(--apple-space-5);
}

.apple-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--apple-text-secondary);
    margin-bottom: var(--apple-space-2);
}

.apple-form-label .required {
    color: var(--apple-red);
    margin-left: 2px;
}

.apple-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-family: var(--apple-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--apple-text-primary);
    background: var(--apple-bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--apple-radius-sm);
    outline: none;
    transition: all var(--apple-transition-fast);
    appearance: none;
    -webkit-appearance: none;
}

.apple-input::placeholder {
    color: var(--apple-text-placeholder);
}

.apple-input:focus {
    background: var(--apple-bg-primary);
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.apple-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.apple-input.is-invalid {
    border-color: var(--apple-red);
    background: rgba(255, 59, 48, 0.05);
}

.apple-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.12);
}

.apple-input.is-valid {
    border-color: var(--apple-green);
}

/* Textarea */
textarea.apple-input {
    min-height: 120px;
    resize: vertical;
}

/* Select */
select.apple-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}

/* Input with Icon */
.apple-input-wrapper {
    position: relative;
}

.apple-input-wrapper .apple-input {
    padding-left: 48px;
}

.apple-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--apple-text-tertiary);
    pointer-events: none;
}

/* Password Toggle */
.apple-input-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    color: var(--apple-text-tertiary);
    cursor: pointer;
    font-size: 1.125rem;
}

/* Form Hint */
.apple-form-hint {
    font-size: 0.8125rem;
    color: var(--apple-text-tertiary);
    margin-top: var(--apple-space-2);
}

/* Form Error */
.apple-form-error {
    font-size: 0.8125rem;
    color: var(--apple-red);
    margin-top: var(--apple-space-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Checkbox & Radio */
.apple-checkbox,
.apple-radio {
    display: flex;
    align-items: flex-start;
    gap: var(--apple-space-3);
    cursor: pointer;
    user-select: none;
}

.apple-checkbox input,
.apple-radio input {
    display: none;
}

.apple-checkbox-box,
.apple-radio-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--apple-gray3);
    border-radius: var(--apple-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--apple-transition-fast);
    flex-shrink: 0;
    margin-top: 2px;
}

.apple-radio-box {
    border-radius: 50%;
}

.apple-checkbox input:checked+.apple-checkbox-box,
.apple-radio input:checked+.apple-radio-box {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
}

.apple-checkbox-box svg,
.apple-radio-box::after {
    opacity: 0;
    transform: scale(0);
    transition: all var(--apple-transition-fast);
}

.apple-checkbox input:checked+.apple-checkbox-box svg {
    opacity: 1;
    transform: scale(1);
    color: white;
}

.apple-radio-box::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.apple-radio input:checked+.apple-radio-box::after {
    opacity: 1;
    transform: scale(1);
}

.apple-checkbox-label,
.apple-radio-label {
    font-size: 0.9375rem;
    color: var(--apple-text-primary);
}

/* Toggle Switch */
.apple-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--apple-space-3);
    cursor: pointer;
}

.apple-toggle input {
    display: none;
}

.apple-toggle-track {
    width: 51px;
    height: 31px;
    background: var(--apple-gray4);
    border-radius: 16px;
    position: relative;
    transition: background var(--apple-transition-fast);
}

.apple-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform var(--apple-transition-fast);
}

.apple-toggle input:checked+.apple-toggle-track {
    background: var(--apple-green);
}

.apple-toggle input:checked+.apple-toggle-track .apple-toggle-thumb {
    transform: translateX(20px);
}

/* =============================================
   MODALS
   ============================================= */
.apple-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--apple-space-4);
    z-index: var(--apple-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--apple-transition);
}

.apple-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.apple-modal {
    background: var(--apple-bg-primary);
    border-radius: var(--apple-radius-xl);
    box-shadow: var(--apple-shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--apple-transition);
}

.apple-modal-overlay.active .apple-modal {
    transform: scale(1) translateY(0);
}

.apple-modal-header {
    padding: var(--apple-space-5) var(--apple-space-6);
    border-bottom: 1px solid var(--apple-gray5);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.apple-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--apple-text-primary);
    margin: 0;
}

.apple-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--apple-gray5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--apple-transition-fast);
    font-size: 1.125rem;
    color: var(--apple-text-tertiary);
}

.apple-modal-close:hover {
    background: var(--apple-gray4);
}

.apple-modal-body {
    padding: var(--apple-space-6);
    max-height: 60vh;
    overflow-y: auto;
}

.apple-modal-footer {
    padding: var(--apple-space-4) var(--apple-space-6);
    border-top: 1px solid var(--apple-gray5);
    display: flex;
    justify-content: flex-end;
    gap: var(--apple-space-3);
}

/* =============================================
   ALERTS & TOASTS
   ============================================= */
.apple-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--apple-space-3);
    padding: var(--apple-space-4) var(--apple-space-5);
    border-radius: var(--apple-radius-md);
    font-size: 0.9375rem;
    margin-bottom: var(--apple-space-4);
}

.apple-alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.apple-alert-content {
    flex: 1;
}

.apple-alert-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.apple-alert-info {
    background: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
}

.apple-alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--apple-green);
}

.apple-alert-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--apple-orange);
}

.apple-alert-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--apple-red);
}

/* Toast Container */
.apple-toast-container {
    position: fixed;
    bottom: var(--apple-space-6);
    right: var(--apple-space-6);
    display: flex;
    flex-direction: column;
    gap: var(--apple-space-3);
    z-index: var(--apple-z-toast);
    pointer-events: none;
}

.apple-toast {
    background: var(--apple-bg-primary);
    border-radius: var(--apple-radius-md);
    box-shadow: var(--apple-shadow-lg);
    padding: var(--apple-space-4) var(--apple-space-5);
    display: flex;
    align-items: center;
    gap: var(--apple-space-3);
    min-width: 300px;
    max-width: 420px;
    pointer-events: auto;
    animation: toast-in 0.3s ease-out;
}

.apple-toast.removing {
    animation: toast-out 0.3s ease-out forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =============================================
   TABLES
   ============================================= */
.apple-table-wrapper {
    overflow-x: auto;
    border-radius: var(--apple-radius-lg);
    box-shadow: var(--apple-shadow);
}

.apple-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--apple-bg-primary);
}

.apple-table th,
.apple-table td {
    padding: var(--apple-space-4) var(--apple-space-5);
    text-align: left;
    border-bottom: 1px solid var(--apple-gray5);
}

.apple-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--apple-text-tertiary);
    background: var(--apple-bg-secondary);
}

.apple-table tbody tr {
    transition: background var(--apple-transition-fast);
}

.apple-table tbody tr:hover {
    background: var(--apple-gray6);
}

.apple-table tbody tr:last-child td {
    border-bottom: none;
}

/* =============================================
   BADGES & TAGS
   ============================================= */
.apple-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--apple-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.apple-badge-primary {
    background: var(--apple-blue);
    color: white;
}

.apple-badge-success {
    background: var(--apple-green);
    color: white;
}

.apple-badge-warning {
    background: var(--apple-orange);
    color: white;
}

.apple-badge-danger {
    background: var(--apple-red);
    color: white;
}

.apple-badge-secondary {
    background: var(--apple-gray5);
    color: var(--apple-text-secondary);
}

.apple-badge-soft-primary {
    background: rgba(0, 122, 255, 0.12);
    color: var(--apple-blue);
}

.apple-badge-soft-success {
    background: rgba(52, 199, 89, 0.12);
    color: var(--apple-green);
}

.apple-badge-soft-warning {
    background: rgba(255, 149, 0, 0.12);
    color: var(--apple-orange);
}

.apple-badge-soft-danger {
    background: rgba(255, 59, 48, 0.12);
    color: var(--apple-red);
}

/* =============================================
   LOADING & SPINNERS
   ============================================= */
.apple-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--apple-gray5);
    border-top-color: var(--apple-blue);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

.apple-spinner.sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.apple-spinner.lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.apple-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--apple-space-4);
    z-index: var(--apple-z-modal);
}

.theme-dark .apple-loading-overlay {
    background: rgba(0, 0, 0, 0.9);
}

/* =============================================
   QR CODE SPECIFIC
   ============================================= */
.apple-qr-preview {
    background: white;
    padding: var(--apple-space-6);
    border-radius: var(--apple-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--apple-shadow);
}

.apple-qr-preview img {
    max-width: 100%;
    height: auto;
}

.apple-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--apple-space-3);
    margin-top: var(--apple-space-4);
}

.apple-qr-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--apple-space-3);
}

.apple-qr-type-option {
    background: var(--apple-bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--apple-radius-md);
    padding: var(--apple-space-5);
    text-align: center;
    cursor: pointer;
    transition: all var(--apple-transition-fast);
}

.apple-qr-type-option:hover {
    background: var(--apple-gray5);
}

.apple-qr-type-option.active {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
}

.apple-qr-type-option-icon {
    font-size: 2rem;
    margin-bottom: var(--apple-space-2);
}

.apple-qr-type-option-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--apple-text-primary);
}

/* =============================================
   PAGE HEADER
   ============================================= */
.apple-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--apple-space-4);
    margin-bottom: var(--apple-space-6);
    flex-wrap: wrap;
}

.apple-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--apple-text-primary);
    margin: 0;
}

.apple-page-subtitle {
    font-size: 0.9375rem;
    color: var(--apple-text-tertiary);
    margin-top: 4px;
}

.apple-page-actions {
    display: flex;
    gap: var(--apple-space-3);
}

/* Mobile Menu Button */
/* Mobile Menu Button - iOS 17 Style */
.apple-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 2003;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 991.98px) {
    .apple-menu-toggle {
        display: flex;
    }
}

.apple-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.98);
}

.apple-menu-toggle:active {
    transform: scale(0.96);
}

.apple-menu-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--apple-text-primary);
    stroke-width: 2.2;
}

/* =============================================
   UTILITIES
   ============================================= */
.apple-text-center {
    text-align: center;
}

.apple-text-left {
    text-align: left;
}

.apple-text-right {
    text-align: right;
}

.apple-text-primary {
    color: var(--apple-text-primary) !important;
}

.apple-text-secondary {
    color: var(--apple-text-secondary) !important;
}

.apple-text-muted {
    color: var(--apple-text-tertiary) !important;
}

.apple-text-blue {
    color: var(--apple-blue) !important;
}

.apple-text-green {
    color: var(--apple-green) !important;
}

.apple-text-red {
    color: var(--apple-red) !important;
}

.apple-text-orange {
    color: var(--apple-orange) !important;
}

.apple-bg-primary {
    background: var(--apple-bg-primary) !important;
}

.apple-bg-secondary {
    background: var(--apple-bg-secondary) !important;
}

.apple-d-flex {
    display: flex;
}

.apple-d-block {
    display: block;
}

.apple-d-none {
    display: none;
}

.apple-d-grid {
    display: grid;
}

.apple-align-center {
    align-items: center;
}

.apple-justify-center {
    justify-content: center;
}

.apple-justify-between {
    justify-content: space-between;
}

.apple-flex-wrap {
    flex-wrap: wrap;
}

.apple-gap-1 {
    gap: var(--apple-space-1);
}

.apple-gap-2 {
    gap: var(--apple-space-2);
}

.apple-gap-3 {
    gap: var(--apple-space-3);
}

.apple-gap-4 {
    gap: var(--apple-space-4);
}

.apple-gap-5 {
    gap: var(--apple-space-5);
}

.apple-gap-6 {
    gap: var(--apple-space-6);
}

.apple-mt-0 {
    margin-top: 0 !important;
}

.apple-mt-2 {
    margin-top: var(--apple-space-2) !important;
}

.apple-mt-3 {
    margin-top: var(--apple-space-3) !important;
}

.apple-mt-4 {
    margin-top: var(--apple-space-4) !important;
}

.apple-mt-5 {
    margin-top: var(--apple-space-5) !important;
}

.apple-mt-6 {
    margin-top: var(--apple-space-6) !important;
}

.apple-mb-0 {
    margin-bottom: 0 !important;
}

.apple-mb-2 {
    margin-bottom: var(--apple-space-2) !important;
}

.apple-mb-3 {
    margin-bottom: var(--apple-space-3) !important;
}

.apple-mb-4 {
    margin-bottom: var(--apple-space-4) !important;
}

.apple-mb-5 {
    margin-bottom: var(--apple-space-5) !important;
}

.apple-mb-6 {
    margin-bottom: var(--apple-space-6) !important;
}

.apple-p-0 {
    padding: 0 !important;
}

.apple-p-3 {
    padding: var(--apple-space-3) !important;
}

.apple-p-4 {
    padding: var(--apple-space-4) !important;
}

.apple-p-5 {
    padding: var(--apple-space-5) !important;
}

.apple-p-6 {
    padding: var(--apple-space-6) !important;
}

.apple-rounded {
    border-radius: var(--apple-radius-sm);
}

.apple-rounded-md {
    border-radius: var(--apple-radius-md);
}

.apple-rounded-lg {
    border-radius: var(--apple-radius-lg);
}

.apple-rounded-xl {
    border-radius: var(--apple-radius-xl);
}

.apple-rounded-full {
    border-radius: var(--apple-radius-full);
}

.apple-shadow {
    box-shadow: var(--apple-shadow);
}

.apple-shadow-md {
    box-shadow: var(--apple-shadow-md);
}

.apple-shadow-lg {
    box-shadow: var(--apple-shadow-lg);
}

.apple-shadow-none {
    box-shadow: none;
}

/* Glassmorphism Utility */
.apple-glass {
    background: var(--apple-glass-bg);
    backdrop-filter: blur(var(--apple-glass-blur));
    -webkit-backdrop-filter: blur(var(--apple-glass-blur));
    border: 1px solid var(--apple-glass-border);
}

/* =============================================
   RESPONSIVE UTILITIES
   ============================================= */
@media (max-width: 575.98px) {
    .apple-hide-xs {
        display: none !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .apple-hide-sm {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .apple-hide-md {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .apple-hide-lg {
        display: none !important;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */
.apple-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.apple-slide-up {
    animation: slideUp 0.4s ease-out;
}

.apple-scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
.apple-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* =============================================
   UPDATEPANEL UYUMLULUĞU
   ============================================= */
/* UpdatePanel içindeki elementler için smooth geçiş */
[id*="UpdatePanel"] .apple-card,
[id*="UpdatePanel"] .apple-alert,
[id*="UpdatePanel"] .apple-table-wrapper {
    animation: fadeIn 0.3s ease-out;
}

/* Progress indicator for UpdatePanel */
.apple-update-progress {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--apple-blue);
    z-index: var(--apple-z-toast);
    animation: updateProgress 2s ease-in-out infinite;
}

@keyframes updateProgress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {

    .apple-sidebar,
    .apple-sidebar-overlay,
    .apple-menu-toggle,
    .apple-toast-container,
    .apple-modal-overlay {
        display: none !important;
    }

    .apple-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .apple-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* QR Card V2 Specifics */
.apple-qr-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #F2F2F7;
    transition: all 0.2s ease;
}

.apple-qr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.apple-qr-card-img-container {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: transparent;
}

.apple-qr-card-img {
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
}

.apple-qr-card-content {
    text-align: left;
    margin-bottom: 16px;
}

.apple-qr-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.apple-qr-card-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.apple-qr-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apple-qr-card-buttons-row {
    display: flex;
    gap: 8px;
}