:root {
    --ios-bg: #F2F2F7;
    --ios-card-bg: #FFFFFF;
    --ios-text: #000000;
    --ios-secondary: #8E8E93;
    --ios-text-secondary: #6C6C70;
    --ios-blue: #007AFF;
    --ios-blue-hover: #0066CC;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-red-hover: #D70015;
    --ios-orange: #FF9500;
    --ios-cyan: #32ADE6;
    --ios-cyan-light: #E0F8FF;
    --ios-gray-light: #E5E5EA;
    --ios-border-radius: 20px;
    --ios-input-bg: #F2F2F7;
    --ios-separator: rgba(60, 60, 67, 0.29);
    --ios-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --ios-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-bs-theme="light"],
.theme-light {
    --ios-bg: #F2F2F7;
    --ios-card-bg: #FFFFFF;
    --ios-text: #000000;
    --ios-secondary: #8E8E93;
    --ios-text-secondary: #6C6C70;
    --ios-blue: #007AFF;
    --ios-blue-hover: #0066CC;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-red-hover: #D70015;
    --ios-orange: #FF9500;
    --ios-cyan: #32ADE6;
    --ios-cyan-light: #E0F8FF;
    --ios-gray-light: #E5E5EA;
    --ios-input-bg: #F2F2F7;
    --ios-separator: rgba(60, 60, 67, 0.29);
    --ios-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"],
.theme-dark {
    --ios-bg: #000000;
    --ios-card-bg: #1C1C1E;
    --ios-text: #FFFFFF;
    --ios-secondary: #98989D;
    --ios-text-secondary: #EBEBF5;
    --ios-blue: #0A84FF;
    --ios-blue-hover: #0071E3;
    --ios-green: #30D158;
    --ios-red: #FF453A;
    --ios-red-hover: #FF6961;
    --ios-orange: #FF9F0A;
    --ios-cyan: #64D2FF;
    --ios-cyan-light: #1C1C1E;
    --ios-gray-light: #2C2C2E;
    --ios-input-bg: #1C1C1E;
    --ios-separator: rgba(84, 84, 88, 0.65);
    --ios-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

body {
    background-color: var(--ios-bg);
    font-family: var(--ios-font-family);
    color: var(--ios-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header & navigation */
.page-header {
    background: linear-gradient(180deg, #f7f7fa 0%, #f0f1f4 100%);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.title-ios {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f0f10;
    letter-spacing: -0.2px;
}

.btn-back-ios {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #dcdde3;
    background: #ffffff;
    color: #0f0f10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1;
}

.btn-back-ios:hover {
    background: #f5f5f7;
}

/* Card Styling */
.ios-card {
    background: var(--ios-card-bg);
    border-radius: var(--ios-border-radius);
    box-shadow: var(--ios-shadow);
    border: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
}

/* Button Styling */
.ios-btn {
    background-color: var(--ios-blue);
    color: white;
    border-radius: 14px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.ios-btn:hover {
    background-color: var(--ios-blue-hover);
    transform: scale(1.02);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.ios-btn:active {
    transform: scale(0.98);
}

.ios-btn-secondary {
    background-color: rgba(118, 118, 128, 0.12);
    color: var(--ios-blue);
}

.ios-btn-secondary:hover {
    background-color: rgba(118, 118, 128, 0.2);
    color: var(--ios-blue);
    box-shadow: none;
}

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

.ios-btn-danger:hover {
    background-color: var(--ios-red-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

.ios-btn-outline {
    background-color: transparent;
    border: 1px solid rgba(0, 122, 255, 0.3);
    color: var(--ios-blue);
}

.ios-btn-outline:hover {
    background-color: rgba(0, 122, 255, 0.05);
    color: var(--ios-blue);
    border-color: var(--ios-blue);
    box-shadow: none;
}

/* Input Styling */
.ios-input {
    background-color: var(--ios-input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    /* Prevents zoom on iOS */
    transition: all 0.2s ease;
    width: 100%;
}

.ios-input:focus {
    background-color: #fff;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    outline: none;
}

/* Badge Styling */
.badge {
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.badge-enterprise {
    background-color: var(--ios-cyan-light);
    color: #007AFF;
    /* Adjusted to match image blue text on light cyan */
}

/* Modal Styling */
.modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.modal-title {
    font-weight: 700;
    color: #000;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
}

.btn-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: rgba(118, 118, 128, 0.12);
    border-radius: 50%;
    opacity: 1;
    padding: 10px;
    background-size: 10px;
    transition: all 0.2s;
}

.btn-close:hover {
    background-color: rgba(118, 118, 128, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px 20px;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
    background-color: transparent;
}

/* Switch Styling */
.form-switch .form-check-input {
    height: 31px;
    width: 51px;
    min-width: 51px;
    flex-shrink: 0;
    border-radius: 31px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: left center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-position 0.2s ease-in-out, background-color 0.2s ease-in-out;
    margin: 0;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-color: var(--ios-green);
    border-color: var(--ios-green);
}

.form-switch .form-check-input:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

.form-check-label {
    font-weight: 500;
    color: var(--ios-text);
    margin-left: 12px;
    padding-top: 4px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}

.form-switch {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding-left: 0;
    min-height: 31px;
    width: fit-content;
}

/* Table Styling */
.ios-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.ios-table thead th {
    border: none;
    color: var(--ios-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding-left: 20px;
}

.ios-table tbody tr {
    background-color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    transition: transform 0.2s ease;
}

.ios-table tbody tr:hover {
    transform: scale(1.005);
}

.ios-table tbody td {
    border: none;
    padding: 20px;
    vertical-align: middle;
}

.ios-table tbody td:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.ios-table tbody td:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Details Section Styling */
.ios-details-container {
    background-color: #F2F8FF;
    /* Light blue background as seen in image */
    border-radius: 20px;
    padding: 24px;
    margin-top: 10px;
}

.ios-info-card {
    background-color: white;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.ios-info-label {
    color: var(--ios-blue);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.ios-info-value {
    font-weight: 700;
    color: #1d3557;
    font-size: 1.1rem;
    word-break: break-all;
}

.ios-copy-link {
    color: var(--ios-blue);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 600;
}

.ios-copy-link:hover {
    text-decoration: underline;
}

.ios-alert-cyan {
    background-color: #E0F8FF;
    color: #007AFF;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    border: none;
}

/* Additional iOS Card Styles */
.ios-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Tabs */
.tabs-wrapper {
    position: relative;
    margin: 6px 0 14px 0;
    padding: 10px 14px;
    /* space for arrows */
    background: #f8f9fc;
    border: 1px solid #e9ecf2;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 26px rgba(15, 23, 42, 0.06);
}

.tabs {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 4px 2px 2px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tabs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dcdde3;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0f0f10;
    transition: background 0.15s ease;
}

.tabs-nav:hover {
    background: #f5f5f7;
}

.tabs-nav.left {
    left: 6px;
}

.tabs-nav.right {
    right: 6px;
}

.tab-button {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid #e5e5e5;
    background: #f7f7fa;
    border-radius: 999px;
    cursor: pointer;
    color: #1c1c1e;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.18s ease;
    scroll-snap-align: start;
    min-height: 38px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.tab-button:hover {
    background: #f1f2f6;
}

.tab-button.active {
    background: linear-gradient(180deg, #0d6efd, #0a58ca);
    color: #fff;
    border-color: #0a58ca;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.tab-content {
    display: none;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e9ecf2;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.tab-content.active {
    display: block;
}

.tab-content .tabulator-root {
    border: 1px solid #e9ecf2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.07);
}

.tab-content .tabulator .tabulator-header {
    background: linear-gradient(180deg, #f9fafc, #f2f4f8);
    border-bottom: 1px solid #e5e7eb;
}

.tab-content .tabulator .tabulator-header .tabulator-col {
    border-right: 1px solid #e5e7eb;
}

.tab-content .tabulator .tabulator-tableholder {
    background: #fcfdff;
}

.tab-content .tabulator .tabulator-row.tabulator-row-even {
    background: #f9fbff;
}

.tab-content .tabulator .tabulator-row.tabulator-selectable:hover {
    background: #edf3ff;
}

.tab-content .tabulator .tabulator-row .tabulator-cell {
    border-color: #eef0f4;
}

.tab-content .tabulator .tabulator-footer {
    background: #f7f9fc;
}

.section-detail {
    background: linear-gradient(180deg, #f9fbff, #f3f6fb);
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.section-detail .tabulator {
    border: none;
    background: transparent;
}

.section-detail .tabulator .tabulator-header {
    background: linear-gradient(180deg, #f8faff, #f1f4f9);
    border-bottom: 1px solid #e2e8f0;
}

.section-detail .tabulator .tabulator-col {
    border-right: 1px solid #e2e8f0;
}

.section-detail .tabulator .tabulator-row.tabulator-row-even {
    background: #f9fbff;
}

.section-detail .tabulator .tabulator-row.tabulator-selectable:hover {
    background: #eef3ff;
}

.section-detail .tabulator .tabulator-row .tabulator-cell {
    border-color: #eef0f4;
}

.section-detail .tabulator .tabulator-footer {
    background: #f6f8fc;
}

.add-section-btn {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.add-section-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.32);
}

.add-section-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

/* Notices */
.notice {
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 0.95rem;
}

.error {
    color: #b00020;
    margin-bottom: 12px;
}

/* Account card */
.account-box {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px;
    background: #f9f9fb;
}

.account-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.account-id {
    font-family: monospace;
    font-size: 0.9rem;
    color: #555;
    word-break: break-all;
}

/* Desktop adjustments (mantener scroll en móvil) */
@media (min-width: 992px) {
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        scroll-snap-type: x mandatory;
        padding-right: 6px;
    }

    .tab-button {
        flex: 0 0 auto;
        min-width: auto;
    }
}

.ios-header {
    padding: 24px 24px 16px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ios-title {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: var(--ios-text);
}

.ios-subtitle {
    font-size: 0.95rem;
    color: var(--ios-secondary);
    font-weight: 400;
}

.ios-body {
    padding: 24px;
}

.ios-label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--ios-text);
    margin-left: 4px;
}

.ios-section {
    margin-bottom: 32px;
}

.ios-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--ios-text);
}

.ios-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 24px 0;
}

.ios-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ios-status-badge.success {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--ios-green);
}

.ios-status-badge.warning {
    background-color: rgba(255, 149, 0, 0.1);
    color: var(--ios-orange);
}

.ios-status-badge.error {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--ios-red);
}

.ios-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.ios-icon-box.blue {
    background: rgba(0, 122, 255, 0.1);
    color: var(--ios-blue);
}

.ios-icon-box.green {
    background: rgba(52, 199, 89, 0.1);
    color: var(--ios-green);
}

.ios-icon-box.orange {
    background: rgba(255, 149, 0, 0.1);
    color: var(--ios-orange);
}

.ios-icon-box.purple {
    background: rgba(175, 82, 222, 0.1);
    color: #AF52DE;
}

.form-text {
    margin-top: 8px;
    margin-left: 4px;
    font-size: 0.85rem;
    color: var(--ios-secondary);
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-slide-up {
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ios-table tbody td {
        padding: 16px;
    }

    .ios-details-container {
        padding: 16px;
    }

    .ios-btn {
        width: 100%;
        /* Full width buttons on mobile */
        justify-content: center;
        margin-bottom: 8px;
    }

    .ios-btn:last-child {
        margin-bottom: 0;
    }

    .d-flex.gap-2 {
        flex-direction: column;
    }

    .modal-dialog {
        margin: 10px;
    }

    .credential-row .d-flex {
        flex-direction: row;
        /* Keep copy button next to label */
    }
}

@media (min-width: 769px) {
    .ios-btn {
        width: auto;
        /* Auto width on desktop */
    }

    .d-flex.gap-2 {
        flex-direction: row;
    }
}

/* ========================================
   LOGIN PAGE STYLES - iOS 26 Design
   ======================================== */

.login-page body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.login-page body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: floatBackground 60s linear infinite;
    pointer-events: none;
}

@keyframes floatBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 95px 20px 20px 20px;
    /* Increased top padding to avoid header overlap */
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 28px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

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

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

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--ios-blue) 0%, #5856d6 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.login-logo svg {
    width: 40px;
    height: 40px;
    color: white;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ios-text);
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 15px;
    color: var(--ios-text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.form-group-ios {
    margin-bottom: 16px;
}

.input-ios {
    width: 100%;
    height: 52px;
    background: var(--ios-input-bg);
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 17px;
    color: var(--ios-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-weight: 400;
}

.input-ios:focus {
    background: #FFFFFF;
    border-color: var(--ios-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: translateY(-1px);
}

.input-ios::placeholder {
    color: var(--ios-secondary);
    font-weight: 400;
}

.forgot-password {
    text-align: right;
    margin: 12px 0 24px 0;
}

.forgot-password a {
    color: var(--ios-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.forgot-password a:hover {
    color: var(--ios-blue-hover);
}

.btn-ios {
    width: 100%;
    height: 52px;
    background: var(--ios-blue);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-ios::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ios:hover {
    background: var(--ios-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}

.btn-ios:hover::before {
    opacity: 1;
}

.btn-ios:active {
    background: #004099;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 28px 0;
    color: var(--ios-text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(60, 60, 67, 0.29);
}

.divider span {
    padding: 0 12px;
}

/* Redirect Screen */
.redirect-screen {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.success-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.spinner-ios {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ios-gray-light);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

/* Login Page Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px;
        border-radius: 24px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        font-size: 14px;
    }
}

/* Modals Dark Mode Support */
[data-bs-theme="dark"] .modal-content,
.theme-dark .modal-content {
    background-color: rgba(28, 28, 30, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .modal-header,
.theme-dark .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .modal-title,
.theme-dark .modal-title,
[data-bs-theme="dark"] .modal-header h5,
.theme-dark .modal-header h5 {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .modal-footer,
.theme-dark .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .btn-close,
.theme-dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] .text-muted,
.theme-dark .text-muted {
    color: rgba(235, 235, 245, 0.6) !important;
}

/* ===========================================
 * NAVBAR DARK MODE OVERRIDES
 * ===========================================
 */
[data-bs-theme="dark"] .navbar-glass-pill,
.theme-dark .navbar-glass-pill {
    background: rgba(28, 28, 30, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .navbar-glass-pill .nav-link,
.theme-dark .navbar-glass-pill .nav-link {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .navbar-glass-pill .nav-link:hover,
.theme-dark .navbar-glass-pill .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .navbar-glass-pill .nav-link i,
.theme-dark .navbar-glass-pill .nav-link i {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .navbar-glass-pill .navbar-toggler-icon,
.theme-dark .navbar-glass-pill .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Mobile Overrides for Dark Mode */
@media (max-width: 991.98px) {

    [data-bs-theme="dark"] .navbar-glass-pill .nav-link,
    .theme-dark .navbar-glass-pill .nav-link {
        background: rgba(44, 44, 46, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    [data-bs-theme="dark"] .navbar-glass-pill .nav-link:hover,
    .theme-dark .navbar-glass-pill .nav-link:hover {
        background: rgba(58, 58, 60, 0.8) !important;
    }
}

/* ===========================================
 * FREQUENT CUSTOMERS & CARDS DARK MODE
 * ===========================================
 */
[data-bs-theme="dark"] .card,
.theme-dark .card {
    background-color: rgba(28, 28, 30, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .card-title,
.theme-dark .card-title,
[data-bs-theme="dark"] h6.card-title,
.theme-dark h6.card-title {
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .text-muted,
.theme-dark .text-muted {
    color: rgba(235, 235, 245, 0.6) !important;
}

/* Fix for buttons in dark mode cards */
[data-bs-theme="dark"] .btn-light,
.theme-dark .btn-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
}

[data-bs-theme="dark"] .btn-light:hover,
.theme-dark .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Folio Badge Dark Mode */
[data-bs-theme="dark"] .position-absolute .badge.bg-white.text-dark,
.theme-dark .position-absolute .badge.bg-white.text-dark {
    background-color: rgba(44, 44, 46, 0.9) !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Credentials View Button Dark Mode */
[data-bs-theme="dark"] .credentials-view-btn,
.theme-dark .credentials-view-btn {
    background: rgba(44, 44, 46, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .credentials-view-btn i,
.theme-dark .credentials-view-btn i {
    color: #0d6efd !important;
    /* Keep primary color or adjust if needed */
}

/* Card Dropdown Menu Dark Mode */
[data-bs-theme="dark"] .dropdown-menu,
.theme-dark .dropdown-menu {
    background-color: rgba(28, 28, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .dropdown-item,
.theme-dark .dropdown-item {
    color: #FFFFFF;
}

[data-bs-theme="dark"] .dropdown-item:hover,
.theme-dark .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}