/* ============================================
   PayPul — iOS Design System
   ============================================ */

/* ---------- iOS Color System ---------- */
:root[data-theme="dark"] {
    --ios-bg: #000000;
    --ios-card: #1C1C1E;
    --ios-secondary-bg: #2C2C2E;
    --ios-tertiary-bg: #3A3A3C;
    --ios-quaternary-bg: #48484A;
    --ios-label: #FFFFFF;
    --ios-secondary-label: #8E8E93;
    --ios-tertiary-label: #636366;
    --ios-placeholder: #636366;
    --ios-separator: #38383A;
    --ios-grouped-bg: #000000;
    --ios-grouped-secondary: #1C1C1E;
    --ios-grouped-tertiary: #2C2C2E;
    --ios-frosted: rgba(29, 29, 31, 0.94);
    --ios-frosted-ultra: rgba(29, 29, 31, 0.8);
    --ios-overlay: rgba(0, 0, 0, 0.4);
    --ios-input-bg: #2C2C2E;
    --ios-input-border: transparent;
    --ios-shadow: 0 0 0 1px rgba(255,255,255,0.05);
    --ios-shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --ios-tab-indicator: rgba(255,255,255,0.1);

    /* System Colors */
    --ios-blue: #0A84FF;
    --ios-green: #30D158;
    --ios-red: #FF453A;
    --ios-orange: #FF9F0A;
    --ios-yellow: #FFD60A;
    --ios-purple: #BF5AF2;
    --ios-pink: #FF375F;
    --ios-teal: #64D2FF;
    --ios-gray: #8E8E93;
    --ios-gray2: #636366;
    --ios-gray3: #48484A;
    --ios-gray4: #3A3A3C;
    --ios-gray5: #2C2C2E;
    --ios-gray6: #1C1C1E;

    --btn-primary-bg: #30D158;
    --btn-primary-hover: #28AD4C;
    --btn-danger-bg: #FF453A;
    --alert-success-bg: rgba(48, 209, 88, 0.15);
    --alert-danger-bg: rgba(255, 69, 58, 0.15);
}

:root[data-theme="light"] {
    --ios-bg: #F2F2F7;
    --ios-card: #FFFFFF;
    --ios-secondary-bg: #E5E5EA;
    --ios-tertiary-bg: #D1D1D6;
    --ios-quaternary-bg: #C7C7CC;
    --ios-label: #000000;
    --ios-secondary-label: #3C3C43;
    --ios-tertiary-label: #8E8E93;
    --ios-placeholder: #C7C7CC;
    --ios-separator: #C6C6C8;
    --ios-grouped-bg: #F2F2F7;
    --ios-grouped-secondary: #FFFFFF;
    --ios-grouped-tertiary: #F2F2F7;
    --ios-frosted: rgba(249, 249, 249, 0.94);
    --ios-frosted-ultra: rgba(249, 249, 249, 0.8);
    --ios-overlay: rgba(0, 0, 0, 0.3);
    --ios-input-bg: #E5E5EA;
    --ios-input-border: transparent;
    --ios-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    --ios-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --ios-tab-indicator: rgba(0,0,0,0.06);

    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-yellow: #FFCC00;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D55;
    --ios-teal: #5AC8FA;
    --ios-gray: #8E8E93;
    --ios-gray2: #AEAEB2;
    --ios-gray3: #C7C7CC;
    --ios-gray4: #D1D1D6;
    --ios-gray5: #E5E5EA;
    --ios-gray6: #F2F2F7;

    --btn-primary-bg: #34C759;
    --btn-primary-hover: #2DB84E;
    --btn-danger-bg: #FF3B30;
    --alert-success-bg: rgba(52, 199, 89, 0.12);
    --alert-danger-bg: rgba(255, 59, 48, 0.12);
}

/* ---------- Global Reset ---------- */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--ios-bg);
    color: var(--ios-label);
    min-height: 100vh;
    min-height: 100dvh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- iOS Typography ---------- */
.ios-large-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.37px;
    line-height: 1.2;
    color: var(--ios-label);
}

.ios-title1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.36px;
    line-height: 1.2;
}

.ios-title2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 1.25;
}

.ios-title3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.38px;
    line-height: 1.25;
}

.ios-headline {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.41px;
}

.ios-body {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
}

.ios-callout {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.32px;
}

.ios-subhead {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
}

.ios-footnote {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
}

.ios-caption {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}

/* ---------- iOS Card ---------- */
.ios-card {
    background: var(--ios-grouped-secondary);
    border-radius: 13px;
    padding: 0;
    box-shadow: var(--ios-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-card + .ios-card {
    margin-top: 12px;
}

.ios-card-header {
    padding: 16px 20px 8px;
}

.ios-card-body {
    padding: 0 20px 16px;
}

/* ---------- iOS Grouped List ---------- */
.ios-list {
    background: var(--ios-grouped-secondary);
    border-radius: 13px;
    overflow: hidden;
    box-shadow: var(--ios-shadow);
}

.ios-list + .ios-list {
    margin-top: 12px;
}

.ios-list-header {
    padding: 24px 20px 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--ios-secondary-label);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ios-list-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    min-height: 44px;
    position: relative;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.ios-list-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 54px;
    right: 0;
    height: 0.5px;
    background: var(--ios-separator);
}

.ios-list-item:last-child::after {
    display: none;
}

.ios-list-item:active {
    background-color: var(--ios-tertiary-bg);
}

.ios-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
    font-size: 16px;
    color: #fff;
}

.ios-list-item-content {
    flex: 1;
    min-width: 0;
}

.ios-list-item-title {
    font-size: 17px;
    font-weight: 400;
    color: var(--ios-label);
    letter-spacing: -0.41px;
}

.ios-list-item-subtitle {
    font-size: 15px;
    color: var(--ios-secondary-label);
    margin-top: 2px;
}

.ios-list-item-value {
    font-size: 17px;
    color: var(--ios-secondary-label);
    margin-left: 8px;
    flex-shrink: 0;
}

.ios-list-item-chevron {
    color: var(--ios-gray3);
    font-size: 14px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ---------- iOS Inputs ---------- */
.ios-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 17px;
    font-family: inherit;
    color: var(--ios-label);
    background: var(--ios-input-bg);
    border: none;
    border-radius: 10px;
    outline: none;
    transition: background-color 0.2s ease;
    letter-spacing: -0.41px;
}

.ios-input::placeholder {
    color: var(--ios-placeholder);
}

.ios-input:focus {
    background: var(--ios-tertiary-bg);
}

.ios-select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 17px;
    font-family: inherit;
    color: var(--ios-label);
    background: var(--ios-input-bg);
    border: none;
    border-radius: 10px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.ios-form-group {
    margin-bottom: 8px;
}

.ios-form-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--ios-secondary-label);
    padding: 0 16px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- iOS Buttons ---------- */
.ios-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 24px;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: -0.41px;
    -webkit-user-select: none;
    user-select: none;
}

.ios-btn:active {
    transform: scale(0.97);
}

.ios-btn-primary {
    background: var(--btn-primary-bg);
    color: #fff;
}

.ios-btn-primary:hover {
    background: var(--btn-primary-hover);
    color: #fff;
}

.ios-btn-secondary {
    background: var(--ios-tertiary-bg);
    color: var(--ios-label);
}

.category-btn, .manba-btn, .supplier-btn {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.ios-btn-secondary:hover {
    background: var(--ios-gray4);
    color: var(--ios-label);
}

.ios-btn-danger {
    background: var(--btn-danger-bg);
    color: #fff;
}

.ios-btn-outline {
    background: transparent;
    color: var(--ios-blue);
    border: 1.5px solid var(--ios-blue);
}

.ios-btn-text {
    background: transparent;
    color: var(--ios-blue);
    height: auto;
    padding: 8px;
}

.ios-btn-block {
    width: 100%;
}

.ios-btn-sm {
    height: 36px;
    padding: 0 16px;
    font-size: 15px;
    border-radius: 10px;
}

.ios-btn-lg {
    height: 56px;
    font-size: 20px;
    border-radius: 16px;
}

/* ---------- iOS Segmented Control ---------- */
.ios-segmented {
    display: flex;
    background: var(--ios-tertiary-bg);
    border-radius: 9px;
    padding: 2px;
    position: relative;
}

.ios-segmented-btn {
    flex: 1;
    height: 32px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--ios-label);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    letter-spacing: -0.08px;
}

.ios-segmented-btn.active {
    background: var(--ios-grouped-secondary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
}

/* ---------- iOS Tab Bar ---------- */
.ios-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ios-frosted);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--ios-separator);
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 1000;
}

.ios-tab-bar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 49px;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 8px;
}

.ios-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--ios-gray);
    transition: color 0.2s ease;
    position: relative;
    gap: 2px;
}

.ios-tab-item.active {
    color: var(--ios-green);
}

.ios-tab-item-icon {
    font-size: 24px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ios-tab-item-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.07px;
}

.ios-tab-item-dashboard {
    position: relative;
}

.ios-tab-item-dashboard .ios-tab-item-icon {
    width: 50px;
    height: 50px;
    background: var(--ios-green);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-tab-item-dashboard:active .ios-tab-item-icon {
    transform: scale(0.92);
}

/* ---------- iOS Alert Banner ---------- */
.ios-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    animation: iosSlideDown 0.3s ease;
}

@keyframes iosSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ios-alert-success {
    background: var(--alert-success-bg);
    color: var(--ios-green);
}

.ios-alert-danger {
    background: var(--alert-danger-bg);
    color: var(--ios-red);
}

.ios-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.ios-alert-text {
    flex: 1;
}

.ios-alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

/* ---------- iOS Modal / Sheet ---------- */
.ios-modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--ios-overlay);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ios-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.ios-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ios-grouped-secondary);
    border-radius: 13px 13px 0 0;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.ios-sheet.active {
    transform: translateY(0);
}

.ios-sheet-handle {
    width: 36px;
    height: 5px;
    background: var(--ios-gray4);
    border-radius: 3px;
    margin: 8px auto 0;
}

.ios-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
}

.ios-sheet-title {
    font-size: 17px;
    font-weight: 600;
}

.ios-sheet-close {
    background: var(--ios-tertiary-bg);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ios-secondary-label);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-sheet-body {
    padding: 0 20px 20px;
}

.ios-sheet-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 0;
    font-size: 17px;
    font-family: inherit;
    color: var(--ios-blue);
    background: none;
    border: none;
    border-bottom: 0.5px solid var(--ios-separator);
    cursor: pointer;
    text-align: left;
    transition: opacity 0.15s ease;
}

.ios-sheet-option:last-child {
    border-bottom: none;
}

.ios-sheet-option:active {
    opacity: 0.5;
}

.ios-sheet-option.destructive {
    color: var(--ios-red);
}

/* ---------- iOS Stat Card ---------- */
.ios-stat {
    background: var(--ios-grouped-secondary);
    border-radius: 13px;
    padding: 16px;
    box-shadow: var(--ios-shadow);
    text-align: center;
}

.ios-stat-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ios-stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ios-stat-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--ios-secondary-label);
}

/* ---------- iOS Balance Card ---------- */
.ios-balance-card {
    background: linear-gradient(135deg, #34C759 0%, #30D158 50%, #28A745 100%);
    border-radius: 16px;
    padding: 16px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(52, 199, 89, 0.3);
}

.ios-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ios-balance-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.ios-balance-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.ios-balance-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
}

.ios-balance-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.ios-balance-unit {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.7;
}

/* ---------- iOS Calculator ---------- */
.ios-calculator {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--ios-grouped-secondary);
    border-radius: 16px;
    box-shadow: var(--ios-shadow);
}

.ios-calc-btn {
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ios-tertiary-bg);
    color: var(--ios-label);
}

.ios-calc-btn:active {
    opacity: 0.6;
    transform: scale(0.95);
}

.ios-calc-btn-operator {
    background: var(--ios-orange);
    color: #fff;
}

.ios-calc-btn-clear {
    background: var(--ios-gray);
    color: var(--ios-label);
}

.ios-calc-btn-zero {
    grid-column: span 2;
    border-radius: 30px;
    height: 60px;
}

.ios-calc-btn-save {
    grid-column: span 2;
    border-radius: 30px;
    height: 60px;
    background: var(--ios-green);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.ios-calc-btn-save:active {
    background: var(--btn-primary-hover);
}

/* ---------- iOS Back Button ---------- */
.ios-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ios-blue);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    padding: 8px 0;
    transition: opacity 0.15s ease;
}

.ios-back-btn:active {
    opacity: 0.5;
}

.ios-back-btn i {
    font-size: 20px;
}

/* ---------- iOS Header ---------- */
.ios-page-header {
    padding: 8px 20px 12px;
}

.ios-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ios-page-header .ios-large-title {
    margin-top: 4px;
}

/* ---------- Content Area ---------- */
.ios-content {
    padding: 0 16px 100px;
    max-width: 500px;
    margin: 0 auto;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* ---------- Animations ---------- */
@keyframes iosFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes iosSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ios-fade-in {
    animation: iosFadeIn 0.3s ease;
}

.ios-slide-up {
    animation: iosSlideUp 0.3s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .ios-balance-value {
        font-size: 30px;
    }

    .ios-calc-btn {
        height: 52px;
        font-size: 20px;
    }

    .ios-calc-btn-save {
        font-size: 18px;
    }

    .ios-stat-value {
        font-size: 18px;
    }
}

/* ---------- Image Grid ---------- */
.ios-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.ios-image-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ios-image-grid img:active {
    transform: scale(0.95);
}

/* ---------- Tab Pane Control ---------- */
.tab-pane {
    display: none;
}
.tab-pane.active.show {
    display: block;
    animation: iosFadeIn 0.25s ease;
}

/* ---------- Header Action Buttons ---------- */
.ios-header-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ios-tertiary-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--ios-label);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ios-header-action:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* ---------- Profile Button ---------- */
.ios-profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ios-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.ios-profile-btn:active {
    transform: scale(0.9);
}

/* ---------- Image Upload Buttons ---------- */
.ios-upload-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--ios-tertiary-bg);
    border: 1.5px dashed var(--ios-gray3);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-label);
    cursor: pointer;
    transition: background 0.15s ease;
}

.ios-upload-btn:active {
    background: var(--ios-quaternary-bg);
}

.ios-upload-btn i {
    font-size: 20px;
    color: var(--ios-green);
}

/* ---------- Image Preview Grid ---------- */
.ios-upload-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ios-upload-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
}

.ios-upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ios-upload-preview-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* ---------- Textarea ---------- */
.ios-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    color: var(--ios-label);
    background: var(--ios-tertiary-bg);
    border: none;
    border-radius: 10px;
    resize: vertical;
    outline: none;
    transition: background 0.2s ease;
}

.ios-textarea:focus {
    background: var(--ios-quaternary-bg);
}

/* ---------- Hidden File Input ---------- */
.ios-hidden-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ---------- Image Counter ---------- */
.ios-image-counter {
    font-size: 13px;
    color: var(--ios-secondary-label);
    margin-top: 6px;
}

/* ---------- iOS Checkbox ---------- */
.ios-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.ios-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--ios-green);
    border-radius: 6px;
    cursor: pointer;
}

.ios-checkbox label {
    font-size: 15px;
    color: var(--ios-secondary-label);
    cursor: pointer;
}

/* ---------- Pagination ---------- */
.ios-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ios-pagination li {
    margin: 0;
    padding: 0;
}

.ios-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--ios-tertiary-bg);
    color: var(--ios-label);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border: none;
    outline: none;
    line-height: 1;
    box-sizing: border-box;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

.ios-page-btn:active {
    transform: scale(0.93);
    opacity: 0.7;
}

.ios-page-active {
    background: var(--ios-green);
    color: #fff;
    font-weight: 600;
}

.ios-page-disabled {
    color: var(--ios-gray3);
    pointer-events: none;
    opacity: 0.5;
}

.ios-page-ellipsis {
    background: none;
    pointer-events: none;
    min-width: auto;
    padding: 0 4px;
}
