/* ===== iPad App Design ===== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --app-bg: #f5f5f7;
    --surface: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --app-border: rgba(0, 0, 0, 0.1);
}

body[data-bs-theme="dark"] {
    --app-bg: #000000;
    --surface: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --app-border: rgba(255, 255, 255, 0.1);
}

.ipad-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--app-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.ipad-app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--app-bg);
}

/* ===== Status Bar ===== */
.ipad-status-bar {
    height: 44px;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.ipad-status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipad-battery {
    width: 36px;
    height: 16px;
    border: 2px solid var(--text-primary);
    border-radius: 4px;
    padding: 2px;
    position: relative;
}

.ipad-battery::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 0 2px 2px 0;
}

.ipad-battery-fill {
    width: 70%;
    height: 100%;
    background-color: var(--primary);
    border-radius: 2px;
}

/* ===== Header ===== */
.ipad-header {
    height: 88px;
    background: linear-gradient(180deg, rgba(245,245,247,0.9) 0%, rgba(245,245,247,0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body[data-bs-theme="dark"] .ipad-header {
    background: linear-gradient(180deg, rgba(28,28,30,0.9) 0%, rgba(28,28,30,0.7) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ipad-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipad-brand-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ipad-brand-link:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.ipad-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
    display: grid;
    place-items: center;
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.ipad-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.ipad-offline-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.ipad-offline-card {
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 246, 255, 0.9) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.08);
}

.ipad-offline-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ipad-offline-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.ipad-offline-badges,
.ipad-offline-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ipad-offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: var(--text-primary);
    font-size: 13px;
}

.ipad-offline-actions {
    margin-bottom: 18px;
}

.ipad-offline-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ipad-offline-help-item {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.ipad-offline-help-item p,
.ipad-offline-note {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.ipad-offline-help-title {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

.ipad-offline-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.08);
}

.ipad-offline-conflicts-wrapper {
    margin-top: 18px;
}

.ipad-offline-empty {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(37, 99, 235, 0.16);
    color: var(--text-secondary);
    font-size: 14px;
}

.ipad-offline-conflict-item {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(245, 158, 11, 0.22);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.ipad-offline-conflict-item + .ipad-offline-conflict-item {
    margin-top: 14px;
}

.ipad-offline-conflict-head,
.ipad-offline-conflict-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ipad-offline-conflict-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.ipad-offline-conflict-meta,
.ipad-offline-conflict-body {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.ipad-offline-conflict-body {
    margin: 10px 0 14px;
}

.ipad-ios-modal {
    border-radius: 28px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    overflow: hidden;
}

.ipad-ios-modal .modal-header,
.ipad-ios-modal .modal-footer {
    border-color: rgba(37, 99, 235, 0.08);
}

.ipad-ios-steps {
    display: grid;
    gap: 14px;
}

.ipad-ios-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.06);
}

.ipad-ios-step-number {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipad-ios-step-title {
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.ipad-ios-step p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.ipad-offline-form-indicator {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.78);
}

.ipad-offline-form-indicator.ready {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.ipad-offline-form-indicator.pending {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.ipad-offline-form-indicator-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.ipad-offline-form-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.ipad-offline-form-indicator.ready .ipad-offline-form-indicator-dot {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.ipad-offline-form-indicator-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.ipad-offline-form-indicator-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.ipad-offline-form-indicator-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.ipad-summary-trigger {
    width: 100%;
    border: none;
    text-align: left;
    background: var(--glass-bg);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ipad-summary-trigger:hover,
.ipad-summary-trigger[aria-expanded="true"] {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.ipad-summary-trigger-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.ipad-summary-trigger[aria-expanded="true"] .ipad-summary-trigger-footer i {
    transform: rotate(180deg);
}

.ipad-summary-trigger-footer i {
    transition: transform 0.2s ease;
}

.ipad-hidden-panel {
    margin-top: -4px;
}

.ipad-maintenance-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ipad-maintenance-panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ipad-maintenance-selection-summary {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.ipad-maintenance-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.ipad-maintenance-select-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ipad-maintenance-select-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.ipad-maintenance-select-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ipad-maintenance-select-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
}

.ipad-maintenance-select-input:checked + .ipad-maintenance-select-check {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    border-color: transparent;
    color: #fff;
}

.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-body,
.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-image {
    opacity: 1;
}

.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-image,
.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-body {
    filter: none;
}

.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-image,
.ipad-maintenance-select-input:checked ~ .ipad-maintenance-select-body,
.ipad-maintenance-select-input:checked + .ipad-maintenance-select-check + .ipad-maintenance-select-image,
.ipad-maintenance-select-input:checked + .ipad-maintenance-select-check + .ipad-maintenance-select-image + .ipad-maintenance-select-body {
    border-color: inherit;
}

.ipad-maintenance-select-input:checked + .ipad-maintenance-select-check + .ipad-maintenance-select-image,
.ipad-maintenance-select-input:checked + .ipad-maintenance-select-check + .ipad-maintenance-select-placeholder {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.ipad-maintenance-select-card.is-selected {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.16);
}

.ipad-maintenance-select-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.12);
}

.ipad-maintenance-select-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 34px;
}

.ipad-maintenance-select-body h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.ipad-maintenance-select-body p {
    margin: 0 0 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ipad-maintenance-select-top,
.ipad-maintenance-select-details,
.ipad-maintenance-select-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ipad-maintenance-select-top {
    margin-bottom: 12px;
}

.ipad-maintenance-select-meta,
.ipad-maintenance-select-details span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.ipad-maintenance-select-actions {
    margin-top: 16px;
}

@media (max-width: 991.98px) {
    .ipad-offline-card-head {
        flex-direction: column;
    }

    .ipad-offline-help-grid {
        grid-template-columns: 1fr;
    }

    .ipad-maintenance-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ipad-maintenance-panel-actions {
        justify-content: stretch;
    }

    .ipad-maintenance-panel-actions .ipad-btn {
        width: 100%;
        justify-content: center;
    }
}

.ipad-app-name {
    font-size: 24px;
    font-weight: 700;
}

.ipad-search-bar {
    flex: 1;
    max-width: 400px;
    height: 44px;
    background-color: rgba(142, 142, 147, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    margin: 0 48px;
}

.ipad-search-bar i {
    color: var(--text-secondary);
    font-size: 18px;
}

.ipad-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: var(--text-primary);
    outline: none;
}

.ipad-search-bar input::placeholder {
    color: var(--text-secondary);
}

.ipad-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ipad-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: rgba(142, 142, 147, 0.12);
    border: none;
    color: var(--text-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.ipad-icon-btn:hover {
    background-color: rgba(142, 142, 147, 0.2);
    transform: scale(1.05);
}

.ipad-icon-btn:active {
    transform: scale(0.95);
}

.ipad-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.ipad-user-menu {
    position: relative;
}

.ipad-user-menu summary {
    list-style: none;
    cursor: pointer;
}

.ipad-user-menu summary::-webkit-details-marker {
    display: none;
}

.ipad-user-menu[open] .ipad-user-avatar {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.ipad-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ipad-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--app-border);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1200;
}

body[data-bs-theme="dark"] .ipad-user-dropdown {
    background: rgba(28, 28, 30, 0.95);
}

.ipad-user-dropdown-link,
.ipad-user-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ipad-user-dropdown-link:hover,
.ipad-user-dropdown-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    transform: translateY(-1px);
}

.ipad-user-dropdown-btn {
    cursor: pointer;
}

/* ===== Main Content ===== */
.ipad-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 48px;
}

/* ===== Dashboard Grid ===== */
.ipad-dashboard {
    width: 100%;
}

.ipad-quick-access-panel {
    margin-bottom: 36px;
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.08) 50%, rgba(255, 255, 255, 0.86) 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.08);
}

body[data-bs-theme="dark"] .ipad-quick-access-panel {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.18) 55%, rgba(28, 28, 30, 0.94) 100%);
    border-color: rgba(96, 165, 250, 0.18);
}

.ipad-quick-access-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.ipad-quick-access-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.ipad-quick-access-copy {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.ipad-quick-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ipad-quick-access-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ipad-quick-access-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.ipad-quick-access-card::after {
    content: "";
    position: absolute;
    inset: auto -18% -40% auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(6px);
}

.ipad-quick-access-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    flex-shrink: 0;
}

.ipad-quick-access-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ipad-quick-access-body strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.ipad-quick-access-body small {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.ipad-quick-access-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ipad-quick-access-meta span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.quick-tech-card .ipad-quick-access-icon,
.techportal-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 50%, #1d4ed8 100%);
}

.quick-operators-card .ipad-quick-access-icon {
    background: linear-gradient(135deg, #34d399 0%, #10b981 55%, #059669 100%);
}

.quick-admin-card .ipad-quick-access-icon {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 55%, #6d28d9 100%);
}

.ipad-app-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px;
    justify-items: center;
}

@media (max-width: 1024px) {
    .ipad-quick-access-grid {
        grid-template-columns: 1fr;
    }

    .member-highlight-grid {
        grid-template-columns: 1fr;
    }

    .ipad-app-icon-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .ipad-main-content {
        padding: 24px 18px 32px;
    }

    .ipad-quick-access-panel {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .ipad-quick-access-title {
        font-size: 22px;
    }

    .ipad-quick-access-card {
        min-height: auto;
        padding: 18px;
        border-radius: 20px;
    }

    .ipad-quick-access-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .ipad-app-icon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .ipad-app-icon {
        width: 100%;
        gap: 10px;
    }

    .ipad-app-icon-box {
        width: min(100%, 108px);
        height: 108px;
        border-radius: 24px;
        font-size: 44px;
    }

    .ipad-app-icon-label {
        font-size: 15px;
    }

    .ipad-members-table,
    .ipad-members-table thead,
    .ipad-members-table tbody,
    .ipad-members-table th,
    .ipad-members-table td,
    .ipad-members-table tr {
        display: block;
        width: 100%;
    }

    .ipad-members-table {
        min-width: 0;
    }

    .ipad-members-table thead {
        display: none;
    }

    .ipad-members-table tbody {
        display: grid;
        gap: 14px;
        padding: 14px;
    }

    .ipad-members-table tbody tr {
        border-radius: 20px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid var(--app-border);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    body[data-bs-theme="dark"] .ipad-members-table tbody tr {
        background: rgba(28, 28, 30, 0.9);
    }

    .ipad-members-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 14px;
        border: 0;
        text-align: right;
    }

    .ipad-members-table td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        text-align: left;
        color: var(--text-secondary);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .ipad-members-table td[data-label="Nombre"] {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
        gap: 6px;
        background: rgba(37, 99, 235, 0.06);
    }

    .ipad-members-table td[data-label="Nombre"]::before {
        flex: none;
    }

    .ipad-members-table td[data-label="Acciones"] {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ipad-members-table td[data-label="Acciones"]::before {
        flex: none;
    }

    .ipad-member-actions {
        width: 100%;
        justify-content: stretch;
    }

    .ipad-member-actions > form,
    .ipad-member-actions > button {
        flex: 1 1 auto;
    }

    .member-direct-access-btn,
    .ipad-member-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .member-search-shell {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .member-search-clear {
        width: 100%;
    }

    .member-filter-chips {
        gap: 8px;
    }

    .member-filter-chip {
        width: 100%;
        justify-content: space-between;
    }
}

.ipad-app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.ipad-app-icon:hover {
    transform: scale(1.1);
}

.ipad-app-icon:active {
    transform: scale(0.95);
}

.ipad-app-icon-box {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 56px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .ipad-app-icon {
        width: 100%;
        gap: 10px;
    }

    .ipad-app-icon-box {
        width: min(100%, 108px);
        height: 108px;
        border-radius: 24px;
        font-size: 44px;
    }

    .ipad-app-icon-label {
        font-size: 15px;
    }
}

/* ===== App Icon Gradients ===== */
.create-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #ffffff 0%, #e5e5ea 100%);
    color: #2563eb;
    border: 1px solid rgba(0,0,0,0.1);
}

.summary-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
}

.assets-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
}

.receipts-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
}

.maintenance-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
}

.workorders-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #7c3aed 100%);
}

.inventory-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
}

.reports-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
}

.expenses-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 50%, #db2777 100%);
}

.users-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
}

.mines-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #facc15 0%, #eab308 50%, #ca8a04 100%);
}

.config-icon .ipad-app-icon-box {
    background: linear-gradient(135deg, #a8a29e 0%, #78716c 50%, #57534e 100%);
}

.ipad-app-icon-label {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.ipad-members-table-wrap {
    border-radius: 24px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body[data-bs-theme="dark"] .ipad-members-table-wrap {
    background: rgba(28, 28, 30, 0.76);
}

.ipad-members-table {
    margin-bottom: 0;
    min-width: 980px;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(142, 142, 147, 0.04);
    --bs-table-hover-bg: rgba(37, 99, 235, 0.06);
    --bs-table-border-color: var(--app-border);
    --bs-table-color: var(--text-primary);
}

.ipad-members-table thead th {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: rgba(142, 142, 147, 0.08);
}

.ipad-members-table td,
.ipad-members-table th {
    padding: 15px 16px;
    vertical-align: middle;
}

.ipad-member-actions {
    align-items: center;
}

.member-direct-access-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.member-direct-access-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

.member-direct-access-btn:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.member-direct-access-btn--tecnicos {
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
}

.member-direct-access-btn--operadores {
    background: linear-gradient(135deg, #34d399 0%, #10b981 55%, #059669 100%);
}

.member-direct-access-btn--administradores {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 55%, #6d28d9 100%);
}

.member-soft-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.member-soft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.member-highlight-panel {
    padding: 20px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0.78) 50%, rgba(56, 189, 248, 0.08) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

body[data-bs-theme="dark"] .member-highlight-panel {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(28, 28, 30, 0.9) 50%, rgba(56, 189, 248, 0.12) 100%);
}

.member-highlight-head {
    margin-bottom: 16px;
}

.member-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.member-highlight-card-form {
    display: block;
}

.member-highlight-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    color: inherit;
    text-align: left;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body[data-bs-theme="dark"] .member-highlight-card {
    background: rgba(28, 28, 30, 0.84);
    border-color: rgba(255, 255, 255, 0.08);
}

.member-highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.member-highlight-card:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.member-highlight-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 50%, #1d4ed8 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.member-highlight-avatar--photo {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
}

.member-highlight-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-highlight-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.member-highlight-body strong {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.member-highlight-body small {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.member-highlight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.member-highlight-meta span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
}

.member-highlight-action {
    margin-left: auto;
    color: var(--primary);
    font-size: 22px;
    flex-shrink: 0;
}

.member-search-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--app-border);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

body[data-bs-theme="dark"] .member-search-shell {
    background: rgba(28, 28, 30, 0.82);
}

.member-search-shell i {
    color: var(--text-secondary);
    font-size: 18px;
}

.member-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.member-search-input::placeholder {
    color: var(--text-secondary);
}

.member-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.member-search-clear:hover {
    background: rgba(37, 99, 235, 0.14);
    color: var(--primary-dark);
}

.member-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.member-live-summary {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.member-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--app-border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

body[data-bs-theme="dark"] .member-filter-chip {
    background: rgba(28, 28, 30, 0.84);
}

.member-filter-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.22);
}

.member-filter-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.member-filter-chip.is-active {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.member-filter-chip.is-active span {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.member-empty-search {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: var(--text-primary);
    font-size: 14px;
}

.member-side-panel {
    position: sticky;
    top: 18px;
}

.member-side-panel-card {
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(239, 246, 255, 0.92) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

body[data-bs-theme="dark"] .member-side-panel-card {
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.94) 0%, rgba(30, 41, 59, 0.92) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.member-side-panel-label {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.member-side-panel-card h3 {
    margin: 14px 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.member-side-panel-card p {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.member-side-nav {
    display: grid;
    gap: 12px;
}

.member-side-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(37, 99, 235, 0.1);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body[data-bs-theme="dark"] .member-side-nav-link {
    background: rgba(15, 23, 42, 0.4);
}

.member-side-nav-link:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.member-side-nav-link.is-active {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.22);
}

.member-side-nav-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.member-side-nav-copy strong {
    font-size: 15px;
    font-weight: 800;
}

.member-side-nav-copy small {
    font-size: 12px;
    color: inherit;
    opacity: 0.8;
}

.member-side-nav-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.member-side-nav-link.is-active .member-side-nav-total {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* ===== Tech Portal ===== */
.techportal-hero-card {
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(255, 255, 255, 0.9) 42%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

body[data-bs-theme="dark"] .techportal-hero-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(28, 28, 30, 0.94) 44%, rgba(56, 189, 248, 0.16) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.techportal-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.techportal-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.techportal-avatar {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 50%, #1d4ed8 100%);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.techportal-hero-copy {
    min-width: 0;
}

.techportal-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.techportal-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.techportal-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.08);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

body[data-bs-theme="dark"] .techportal-hero-meta span {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.techportal-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: min(100%, 280px);
}

.techportal-segmented {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

body[data-bs-theme="dark"] .techportal-segmented {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

.techportal-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.techportal-segment:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
}

.techportal-segment.is-active {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
}

.techportal-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.techportal-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.techportal-stat-card {
    min-height: 118px;
    padding: 18px 18px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(37, 99, 235, 0.08);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

body[data-bs-theme="dark"] .techportal-stat-card {
    background: rgba(28, 28, 30, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
}

.techportal-stat-card .soft-item-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

.techportal-stat-card .soft-item-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.techportal-stat-card--primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, rgba(255, 255, 255, 0.9) 60%);
}

.techportal-stat-card--secondary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(255, 255, 255, 0.9) 60%);
}

.techportal-section-card {
    overflow: hidden;
}

.techportal-section-head {
    align-items: center;
}

.techportal-filter-bar {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

body[data-bs-theme="dark"] .techportal-filter-bar {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(255, 255, 255, 0.08);
}

.techportal-filter-btn {
    min-height: 48px;
    border-radius: 16px;
    font-weight: 800;
}

.techportal-table-wrap {
    border-radius: 24px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body[data-bs-theme="dark"] .techportal-table-wrap {
    background: rgba(28, 28, 30, 0.78);
}

.techportal-table {
    margin-bottom: 0;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0 12px;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(142, 142, 147, 0.04);
    --bs-table-hover-bg: rgba(37, 99, 235, 0.06);
    --bs-table-border-color: var(--app-border);
    --bs-table-color: var(--text-primary);
}

.techportal-table thead th {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: rgba(142, 142, 147, 0.08);
}

.techportal-table td,
.techportal-table th {
    padding: 15px 16px;
    vertical-align: middle;
}

.techportal-table-row td {
    --techportal-accent: #2563eb;
    --techportal-accent-soft: rgba(37, 99, 235, 0.08);
    --techportal-accent-border: rgba(37, 99, 235, 0.14);
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid var(--techportal-accent-border);
    border-bottom: 1px solid var(--techportal-accent-border);
    transition: transform 0.24s ease, background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

body[data-bs-theme="dark"] .techportal-table-row td {
    background: rgba(28, 28, 30, 0.9);
    border-top-color: rgba(255, 255, 255, 0.06);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.techportal-table-row td:first-child {
    border-left: 1px solid var(--techportal-accent-border);
    border-radius: 22px 0 0 22px;
}

.techportal-table-row td:last-child {
    border-right: 1px solid var(--techportal-accent-border);
    border-radius: 0 22px 22px 0;
}

body[data-bs-theme="dark"] .techportal-table-row td:first-child,
body[data-bs-theme="dark"] .techportal-table-row td:last-child {
    border-left-color: rgba(255, 255, 255, 0.06);
    border-right-color: rgba(255, 255, 255, 0.06);
}

.techportal-table-row--ot td:first-child {
    box-shadow: inset 4px 0 0 var(--techportal-accent);
}

.techportal-table-row--mp td:first-child {
    box-shadow: inset 4px 0 0 var(--techportal-accent);
}

.techportal-row-state--pendiente td {
    --techportal-accent: #f59e0b;
    --techportal-accent-soft: rgba(245, 158, 11, 0.1);
    --techportal-accent-border: rgba(245, 158, 11, 0.18);
}

.techportal-row-state--en-proceso td {
    --techportal-accent: #2563eb;
    --techportal-accent-soft: rgba(37, 99, 235, 0.1);
    --techportal-accent-border: rgba(37, 99, 235, 0.18);
}

.techportal-row-state--finalizada td,
.techportal-row-state--finalizado td {
    --techportal-accent: #10b981;
    --techportal-accent-soft: rgba(16, 185, 129, 0.1);
    --techportal-accent-border: rgba(16, 185, 129, 0.18);
}

.techportal-row-state--programada td,
.techportal-row-state--programado td {
    --techportal-accent: #06b6d4;
    --techportal-accent-soft: rgba(6, 182, 212, 0.1);
    --techportal-accent-border: rgba(6, 182, 212, 0.18);
}

.techportal-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.techportal-row-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.techportal-cell-stack--wide {
    gap: 6px;
}

.techportal-state-orb {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.88);
    color: var(--techportal-accent);
    border: 1px solid var(--techportal-accent-border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

body[data-bs-theme="dark"] .techportal-state-orb {
    background: rgba(15, 23, 42, 0.9);
}

.techportal-state-orb::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--techportal-accent-soft) 0%, rgba(255, 255, 255, 0) 72%);
    z-index: 0;
    opacity: 0.88;
    transform: scale(0.94);
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.techportal-state-orb i {
    position: relative;
    z-index: 1;
    font-size: 16px;
    transition: transform 0.24s ease;
}

.techportal-row-code {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
}

.techportal-row-caption {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.techportal-date-chip,
.techportal-time-chip,
.techportal-asset-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--techportal-accent-soft);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.techportal-time-chip {
    background: var(--techportal-accent-soft);
}

.techportal-asset-chip {
    max-width: 100%;
    border-radius: 16px;
    white-space: normal;
    line-height: 1.45;
}

.techportal-work-title {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.techportal-state-pill,
.techportal-priority-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.techportal-state-pill {
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1);
}

.techportal-report-box {
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 18px;
    background: var(--techportal-accent-soft);
    border: 1px solid var(--techportal-accent-border);
    transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.techportal-report-box--done {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.14);
}

.techportal-report-box--pending {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.16);
}

.techportal-actions .btn,
.techportal-actions form .btn {
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.techportal-collapse-row td {
    padding: 0;
    background: transparent;
    border: 0;
}

.techportal-inline-form {
    margin-top: -2px;
    padding: 18px;
    border-radius: 22px;
    background: var(--techportal-accent-soft);
    border: 1px solid var(--techportal-accent-border);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

body[data-bs-theme="dark"] .techportal-inline-form {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
    .techportal-table-row:hover td {
        background: color-mix(in srgb, var(--techportal-accent-soft) 38%, rgba(255, 255, 255, 0.92));
    }

    body[data-bs-theme="dark"] .techportal-table-row:hover td {
        background: color-mix(in srgb, var(--techportal-accent-soft) 28%, rgba(28, 28, 30, 0.94));
    }

    .techportal-table-row:hover .techportal-state-orb {
        transform: translateY(-1px) scale(1.04);
        box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
    }

    .techportal-table-row:hover .techportal-state-orb::before {
        opacity: 1;
        transform: scale(1.08);
    }

    .techportal-table-row:hover .techportal-state-orb i {
        transform: scale(1.08);
    }

    .techportal-table-row:hover .techportal-date-chip,
    .techportal-table-row:hover .techportal-time-chip,
    .techportal-table-row:hover .techportal-asset-chip,
    .techportal-table-row:hover .techportal-state-pill,
    .techportal-table-row:hover .techportal-priority-pill,
    .techportal-table-row:hover .techportal-report-box {
        transform: translateY(-1px);
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
    }

    .techportal-actions .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    }
}

.techportal-table-row:active td,
.techportal-actions .btn:active,
.techportal-inline-form:active {
    transform: scale(0.997);
}

@media (prefers-reduced-motion: reduce) {
    .techportal-table-row td,
    .techportal-state-orb,
    .techportal-state-orb::before,
    .techportal-state-orb i,
    .techportal-date-chip,
    .techportal-time-chip,
    .techportal-asset-chip,
    .techportal-state-pill,
    .techportal-priority-pill,
    .techportal-report-box,
    .techportal-actions .btn,
    .techportal-inline-form {
        transition: none;
    }
}

@media (max-width: 1199px) {
    .member-side-panel {
        position: static;
    }

    .member-side-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .techportal-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .techportal-hero-actions {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .member-highlight-grid,
    .member-side-nav {
        grid-template-columns: 1fr;
    }

    .member-side-panel-card {
        padding: 18px;
        border-radius: 24px;
    }

    .techportal-hero-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .techportal-avatar {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        font-size: 24px;
    }

    .techportal-segmented {
        grid-template-columns: 1fr;
    }

    .techportal-table,
    .techportal-table thead,
    .techportal-table tbody,
    .techportal-table th,
    .techportal-table td,
    .techportal-table tr {
        display: block;
        width: 100%;
    }

    .techportal-table {
        min-width: 0;
        border-spacing: 0;
    }

    .techportal-table thead {
        display: none;
    }

    .techportal-table tbody {
        display: grid;
        gap: 14px;
        padding: 14px;
    }

    .techportal-table tbody tr {
        border-radius: 20px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid var(--app-border);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    body[data-bs-theme="dark"] .techportal-table tbody tr {
        background: rgba(28, 28, 30, 0.9);
    }

    .techportal-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 14px;
        border: 0;
        text-align: right;
    }

    .techportal-table-row td {
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .techportal-table td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        text-align: left;
        color: var(--text-secondary);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .techportal-table td[data-label="Trabajo"],
    .techportal-table td[data-label="Titulo"],
    .techportal-table td[data-label="Accion"],
    .techportal-table td[data-label="#"] {
        align-items: flex-start;
        flex-direction: column;
        text-align: left;
    }

    .techportal-table td[data-label="Trabajo"]::before,
    .techportal-table td[data-label="Titulo"]::before,
    .techportal-table td[data-label="Accion"]::before,
    .techportal-table td[data-label="#"]::before {
        flex: none;
    }

    .techportal-table td[data-label="Accion"] .d-flex {
        width: 100%;
    }

    .techportal-table td[data-label="Accion"] .btn,
    .techportal-table td[data-label="Accion"] form {
        width: 100%;
    }

    .techportal-table td[data-label="Accion"] form .btn {
        width: 100%;
    }

    .techportal-row-head {
        width: 100%;
    }

    .techportal-state-pill,
    .techportal-priority-pill,
    .techportal-report-box,
    .techportal-date-chip,
    .techportal-time-chip,
    .techportal-asset-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .techportal-inline-form {
        margin-top: 8px;
        padding: 16px;
    }
}

/* ===== Home Indicator ===== */
.ipad-home-indicator {
    width: 160px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 100px;
    margin: 16px auto;
    opacity: 0.3;
}

/* ===== Page Header ===== */
.ipad-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.ipad-nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.ipad-nav-button:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.ipad-page-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Section ===== */
.ipad-section {
    margin-bottom: 48px;
}

.ipad-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* ===== Info Cards Grid ===== */
.ipad-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .ipad-info-grid {
        grid-template-columns: 1fr;
    }
}

.ipad-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--surface);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.ipad-info-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    display: grid;
    place-items: center;
    color: white;
    font-size: 28px;
    flex-shrink: 0;
}

.ipad-info-text h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    margin-bottom: 4px;
}

.ipad-info-text p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Add Button ===== */
.ipad-add-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    color: white;
    display: grid;
    place-items: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ipad-add-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.ipad-add-button:active {
    transform: scale(0.95);
}

/* ===== Alert ===== */
.ipad-alert-success {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #d1fae5;
    color: #065f46;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 32px;
}

.ipad-alert-success i {
    font-size: 22px;
}

/* ===== Assets Grid ===== */
.ipad-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.ipad-asset-card {
    background-color: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.ipad-asset-photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: block;
}

.ipad-asset-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ipad-asset-photo:hover img {
    transform: scale(1.05);
}

.ipad-asset-photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f0f0f5 0%, #e5e5ea 100%);
    display: grid;
    place-items: center;
    color: #8e8e93;
    font-size: 64px;
}

body[data-bs-theme="dark"] .ipad-asset-photo-placeholder {
    background: linear-gradient(135deg, #3a3a4a 0%, #2d2d3d 100%);
    color: #636370;
}

.ipad-asset-info {
    padding: 20px;
    flex-grow: 1;
}

.ipad-asset-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ipad-asset-details {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.ipad-asset-details span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ipad-asset-code {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.ipad-asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.ipad-asset-meta span {
    font-size: 14px;
    color: var(--text-secondary);
}

.ipad-asset-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
}

.ipad-asset-status-badge.activo {
    background-color: #d1fae5;
    color: #065f46;
}

.ipad-asset-status-badge.en-mantenimiento {
    background-color: #fef3c7;
    color: #92400e;
}

.ipad-asset-status-badge.inactivo,
.ipad-asset-status-badge.desabilitado {
    background-color: #e5e7eb;
    color: #374151;
}

body[data-bs-theme="dark"] .ipad-asset-status-badge.activo {
    background-color: #064e3b;
    color: #6ee7b7;
}

body[data-bs-theme="dark"] .ipad-asset-status-badge.en-mantenimiento {
    background-color: #78350f;
    color: #fbbf24;
}

body[data-bs-theme="dark"] .ipad-asset-status-badge.inactivo,
body[data-bs-theme="dark"] .ipad-asset-status-badge.desabilitado {
    background-color: #374151;
    color: #d1d5db;
}

.ipad-asset-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

body[data-bs-theme="dark"] .ipad-asset-actions {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.ipad-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    display: grid;
    place-items: center;
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    background-color: transparent;
}

.ipad-action-btn:hover {
    transform: scale(1.1);
}

.ipad-action-btn.view {
    color: #059669;
}

.ipad-action-btn.view:hover {
    background-color: rgba(5, 150, 105, 0.1);
}

.ipad-action-btn.pdf {
    color: #ea580c;
}

.ipad-action-btn.pdf:hover {
    background-color: rgba(234, 88, 12, 0.1);
}

.ipad-action-btn.edit {
    color: #2563eb;
}

.ipad-action-btn.edit:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.ipad-action-btn.delete {
    color: #dc2626;
}

.ipad-action-btn.delete:hover {
    background-color: rgba(220, 38, 38, 0.1);
}

/* ===== Empty State ===== */
.ipad-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.ipad-empty-icon {
    width: 120px;
    height: 120px;
    border-radius: 32px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: grid;
    place-items: center;
    color: #4f46e5;
    font-size: 56px;
    margin: 0 auto 24px;
}

body[data-bs-theme="dark"] .ipad-empty-icon {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
    color: #a5b4fc;
}

.ipad-empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ipad-empty-state p {
    font-size: 17px;
    color: var(--text-secondary);
}

/* ===== Pagination ===== */
.ipad-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.ipad-pagination .pagination {
    gap: 8px;
}

.ipad-pagination .page-link {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    background-color: var(--surface);
    color: var(--text-primary);
    font-weight: 500;
}

.ipad-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    color: white;
}

/* ===== Login Page ===== */
.ipad-login-container {
    width: 100%;
    min-height: 100vh;
    background-color: var(--app-bg);
}

.ipad-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .ipad-login-grid {
        grid-template-columns: 1fr;
    }
    .ipad-login-brand {
        display: none;
    }
}

.ipad-login-brand {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #60a5fa 100%);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ipad-login-brand-inner {
    max-width: 500px;
}

.ipad-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 32px;
}

.ipad-login-badge i {
    font-size: 18px;
}

.ipad-login-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.ipad-login-description {
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 48px;
}

.ipad-login-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ipad-login-feature {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ipad-login-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: rgba(255,255,255,0.2);
    display: grid;
    place-items: center;
    font-size: 24px;
    flex-shrink: 0;
}

.ipad-login-feature-title {
    font-size: 17px;
    font-weight: 600;
}

.ipad-login-feature-desc {
    font-size: 14px;
    opacity: 0.8;
}

.ipad-login-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.ipad-login-form {
    width: 100%;
    max-width: 440px;
}

.ipad-login-logo {
    width: 120px;
    height: 120px;
    border-radius: 32px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #60a5fa 100%);
    display: grid;
    place-items: center;
    margin: 0 auto 32px;
    overflow: hidden;
}

.ipad-login-logo img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.ipad-login-welcome {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ipad-login-copy {
    font-size: 17px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.ipad-alert-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fef3c7;
    color: #92400e;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 24px;
}

.ipad-alert-warning i {
    font-size: 22px;
}

body[data-bs-theme="dark"] .ipad-alert-warning {
    background-color: #78350f;
    color: #fbbf24;
}

.ipad-form-group {
    margin-bottom: 24px;
}

.ipad-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ipad-form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border-radius: 16px;
    border: 2px solid var(--app-border);
    background-color: var(--surface);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipad-form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.ipad-form-error {
    margin-top: 8px;
    font-size: 14px;
    color: #dc2626;
}

.ipad-login-btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #60a5fa 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.ipad-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.ipad-login-btn:active {
    transform: translateY(0);
}

.ipad-login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== Form Styles ===== */
.ipad-form-card {
    background-color: var(--surface);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.ipad-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .ipad-form-grid {
        grid-template-columns: 1fr;
    }
}

.ipad-form-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border-radius: 16px;
    border: 2px solid var(--app-border);
    background-color: var(--surface);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipad-form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.ipad-form-textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    border-radius: 16px;
    border: 2px solid var(--app-border);
    background-color: var(--surface);
    color: var(--text-primary);
    outline: none;
    min-height: 120px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipad-form-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.ipad-btn-group {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
}

.ipad-btn {
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ipad-btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #60a5fa 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.ipad-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.ipad-btn-secondary {
    background-color: var(--app-border);
    color: var(--text-primary);
}

.ipad-btn-secondary:hover {
    background-color: rgba(0,0,0,0.12);
}

body[data-bs-theme="dark"] .ipad-btn-secondary:hover {
    background-color: rgba(255,255,255,0.12);
}

.ipad-btn-danger {
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.ipad-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
}

/* ===== Card Grid for Lists ===== */
.ipad-list-card {
    background-color: var(--surface);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ipad-list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ipad-list-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ipad-list-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
}

.ipad-list-card-content {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ipad-list-card-item {
    font-size: 14px;
    color: var(--text-secondary);
}

.ipad-list-card-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Search Page Styles ===== */
.ipad-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--app-border);
    transition: background-color 0.2s ease;
}

.ipad-list-item:last-child {
    border-bottom: none;
}

.ipad-list-item:hover {
    background-color: rgba(142, 142, 147, 0.05);
}

.ipad-list-item-left {
    flex-shrink: 0;
}

.ipad-list-item-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.ipad-list-item-content {
    flex: 1;
}

.ipad-list-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ipad-list-item-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.ipad-list-item-right {
    flex-shrink: 0;
}

.ipad-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
}

.ipad-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.ipad-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.ipad-badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.ipad-badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.ipad-badge-secondary {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Activo Card for Search */
.ipad-activo-card {
    background-color: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.ipad-activo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.ipad-activo-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.ipad-activo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ipad-activo-initials {
    font-size: 64px;
    font-weight: 800;
    color: #4f46e5;
}

body[data-bs-theme="dark"] .ipad-activo-image {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
}

body[data-bs-theme="dark"] .ipad-activo-initials {
    color: #a5b4fc;
}

.ipad-activo-info {
    padding: 20px;
}

.ipad-activo-status {
    margin-top: 12px;
}

/* ===== Activo Detail iPad ===== */
.activo-ipad-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activo-ipad-page .row.g-3 {
    --bs-gutter-y: 1.25rem;
    --bs-gutter-x: 1.25rem;
}

.activo-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(96, 165, 250, 0.18) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

body[data-bs-theme="dark"] .activo-hero-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.26) 100%);
    border-color: rgba(96, 165, 250, 0.18);
}

.activo-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activo-hero-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.activo-hero-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.activo-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.activo-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

body[data-bs-theme="dark"] .activo-hero-meta span {
    background-color: rgba(28, 28, 30, 0.72);
}

.activo-hero-status {
    flex-shrink: 0;
}

.activo-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.activo-summary-card {
    background-color: var(--surface);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activo-summary-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.activo-summary-value {
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
    color: var(--text-primary);
}

.activo-summary-text {
    font-size: 18px;
    line-height: 1.3;
}

.activo-header-btn {
    white-space: nowrap;
}

.activo-form-page {
    gap: 28px;
}

.activo-form-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

body[data-bs-theme="dark"] .activo-form-hero {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(37, 99, 235, 0.22) 100%);
    border-color: rgba(96, 165, 250, 0.16);
}

.activo-form-hero-copy {
    max-width: 760px;
}

.activo-form-hero-text {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.activo-form-hero-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.activo-form-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

body[data-bs-theme="dark"] .activo-form-hero-tags span {
    background-color: rgba(28, 28, 30, 0.72);
}

.activo-form-media-card {
    padding: 18px;
    border-radius: 20px;
    background-color: rgba(142, 142, 147, 0.05);
    border: 1px solid rgba(142, 142, 147, 0.12);
}

body[data-bs-theme="dark"] .activo-form-media-card {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.activo-form-placeholder,
.activo-form-doc-placeholder {
    width: 100%;
    min-height: 220px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(96, 165, 250, 0.14) 100%);
    border: 1px dashed rgba(37, 99, 235, 0.2);
}

.activo-form-placeholder i,
.activo-form-doc-placeholder i {
    font-size: 42px;
    color: var(--primary);
}

.activo-form-doc-placeholder {
    min-height: 120px;
}

.activo-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
}

.activo-index-page {
    gap: 24px;
}

.activo-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.activo-index-card {
    border: 1px solid var(--app-border);
}

.activo-index-photo-link {
    text-decoration: none;
    color: inherit;
}

.activo-index-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.activo-index-people {
    margin-top: 14px;
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.activo-index-people strong {
    color: var(--text-primary);
}

.activo-ipad-page .panel-card {
    background-color: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--app-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.activo-ipad-page .panel-card .panel-card {
    box-shadow: none;
    border-radius: 20px;
    background-color: rgba(142, 142, 147, 0.05);
}

body[data-bs-theme="dark"] .activo-ipad-page .panel-card .panel-card {
    background-color: rgba(255, 255, 255, 0.03);
}

.activo-ipad-page .panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 28px 0;
}

.activo-ipad-page .panel-body {
    padding: 24px 28px 28px;
}

.activo-ipad-page .panel-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.activo-ipad-page .panel-subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.activo-ipad-page .asset-image-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(96, 165, 250, 0.14) 100%);
}

.activo-ipad-page .asset-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.activo-ipad-page .soft-item {
    border-radius: 18px;
    padding: 16px 18px;
    background-color: rgba(142, 142, 147, 0.08);
    border: 1px solid rgba(142, 142, 147, 0.12);
}

body[data-bs-theme="dark"] .activo-ipad-page .soft-item {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.activo-ipad-page .soft-item-text {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.activo-ipad-page .soft-item-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.activo-ipad-page .table-responsive {
    border-radius: 20px;
    overflow: auto;
    border: 1px solid var(--app-border);
}

.activo-ipad-page .table {
    margin-bottom: 0;
    min-width: 920px;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(142, 142, 147, 0.04);
    --bs-table-hover-bg: rgba(37, 99, 235, 0.05);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--app-border);
}

.activo-ipad-page .table thead th {
    background-color: rgba(142, 142, 147, 0.08);
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.activo-ipad-page .table td,
.activo-ipad-page .table th {
    padding: 14px 16px;
    vertical-align: middle;
}

.activo-ipad-page .form-control,
.activo-ipad-page .form-select,
.activo-ipad-page textarea {
    border-radius: 16px;
    border: 1px solid var(--app-border);
    background-color: var(--surface);
    color: var(--text-primary);
    padding: 14px 16px;
}

.activo-ipad-page .form-control:focus,
.activo-ipad-page .form-select:focus,
.activo-ipad-page textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.activo-ipad-page .form-label {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.activo-ipad-page .btn {
    border-radius: 14px;
}

.activo-ipad-page .btn-action {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.activo-ipad-page .btn-action-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.activo-ipad-page .btn-action-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.activo-ipad-page .btn-action-primary { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.activo-ipad-page .btn-action-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.activo-ipad-page .modal-content {
    background-color: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--app-border);
}

.activo-ipad-page .modal-header,
.activo-ipad-page .modal-body {
    padding: 24px;
}

@media (max-width: 1024px) {
    .activo-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .activo-hero-card,
    .activo-form-hero,
    .activo-ipad-page .panel-head,
    .ipad-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .activo-summary-grid {
        grid-template-columns: 1fr;
    }

    .activo-ipad-page .panel-body,
    .activo-ipad-page .panel-head,
    .activo-hero-card,
    .activo-form-hero {
        padding-left: 20px;
        padding-right: 20px;
    }

    .activo-form-hero-tags {
        width: 100%;
    }
}

/* ===== Compatibility for existing pages ===== */
@media (min-width: 768px) {
    .container {
        max-width: 100%;
    }
}
