﻿html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.oc-main-container img,
.oc-main-container video,
.oc-main-container iframe,
.oc-main-container canvas {
    max-width: 100%;
}

@media (min-width: 768px) and (max-width: 1279.98px) {
    html body .oc-main-container {
        padding: 16px 20px 28px !important;
    }

    html body .oc-topbar {
        padding: 0 20px !important;
    }
}

@media (max-width: 767.98px) {
    html body {
        overflow-x: clip;
    }

    html body .oc-main-container {
        padding: 12px 12px 32px !important;
    }

    html body .oc-topbar {
        height: 38px !important;
        padding: 0 12px !important;
    }

    html body .oc-breadcrumb {
        min-width: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        font-size: 11.5px !important;
    }

    html body .oc-breadcrumb > * {
        min-width: 0 !important;
    }

    html body .oc-breadcrumb .bc-current,
    html body .oc-breadcrumb .oc-breadcrumb-menu {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 46vw !important;
        display: inline-block !important;
    }

    html body .oc-navbar {
        padding: 0 6px 0 0 !important;
    }

    html body .oc-brand {
        padding: 0 10px 0 14px !important;
    }

    html body .oc-brand-logo {
        font-size: 16px !important;
    }

    html body .oc-btn-back {
        margin-left: 8px !important;
        padding: 0 !important;
        width: 34px !important;
        height: 34px !important;
        justify-content: center !important;
        font-size: 0 !important;
        gap: 0 !important;
    }

    html body .oc-btn-back i {
        font-size: 11px !important;
    }

    html body .oc-navbar-right {
        gap: 4px !important;
        padding-left: 4px !important;
    }

    html body .oc-icon-button {
        width: 34px !important;
        height: 34px !important;
    }

    html body .oc-profile-button {
        padding: 2px !important;
        margin-left: 0 !important;
        gap: 0 !important;
    }

    html body .oc-profile-button > div:not(.oc-avatar) {
        display: none !important;
    }

    html body .oc-mobile-toggle {
        margin-left: 0 !important;
        padding: 8px 6px !important;
    }

    html body .oc-notification-dropdown {
        position: fixed !important;
        top: 60px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
    }

    html body .oc-navbar-right .oc-dropdown-right {
        position: fixed !important;
        top: 60px !important;
        right: 8px !important;
        left: auto !important;
        width: min(290px, calc(100vw - 16px)) !important;
    }
}

@media (max-width: 767.98px) and (pointer: coarse) {
    html body .oc-main-container :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="color"]):not([type="hidden"]), select, textarea) {
        font-size: 16px !important;
    }
}

.oc-tview {
    display: none;
}

@media (max-width: 767.98px) {
    .oc-tview {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin: 0 0 8px;
        font-family: 'DM Sans', 'Segoe UI', sans-serif;
    }

    .oc-tview-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: #94a3b8;
    }

    .oc-tview-seg {
        display: inline-flex;
        padding: 3px;
        gap: 2px;
        border-radius: 9px;
        background: #eef2f7;
        border: 1px solid #e2e8f0;
    }

    .oc-tview-seg button {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 32px;
        padding: 4px 11px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: #64748b;
        font: 600 12px 'DM Sans', 'Segoe UI', sans-serif;
        cursor: pointer;
    }

    .oc-tview-seg button[aria-pressed="true"] {
        background: #ffffff;
        color: #0f2a4a;
        box-shadow: 0 1px 3px rgba(15,42,74,.14);
    }

    html body table.oc-cards,
    html body table.oc-cards > thead,
    html body table.oc-cards > tbody,
    html body table.oc-cards > tfoot {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        table-layout: auto !important;
    }

    html body table.oc-cards tr.oc-cards-head {
        display: none !important;
    }

    html body table.oc-cards > * > tr {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        margin: 0 0 10px !important;
        padding: 4px 14px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(15,42,74,.06) !important;
        height: auto !important;
    }

    html body table.oc-cards > * > tr > td,
    html body table.oc-cards > * > tr > th {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        padding: 9px 0 !important;
        border: 0 !important;
        border-bottom: 1px dashed #e8edf3 !important;
        background: transparent !important;
        text-align: right !important;
        white-space: normal !important;
        word-break: break-word !important;
        position: static !important;
        box-shadow: none !important;
    }

    html body table.oc-cards > * > tr > td:last-child {
        border-bottom: 0 !important;
    }

    html body table.oc-cards > * > tr > td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 46%;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .9px;
        text-transform: uppercase;
        color: #94a3b8;
        text-align: left;
        line-height: 1.35;
    }

    html body table.oc-cards > * > tr > td.oc-cell-actions {
        justify-content: flex-end !important;
        flex-wrap: wrap !important;
    }

    html body table.oc-cards > * > tr > td.oc-cell-first {
        justify-content: flex-start !important;
        text-align: left !important;
        font-weight: 600 !important;
    }

    html body table.oc-cards > * > tr > td.oc-cell-first::before {
        display: none !important;
    }

    html body table.oc-cards > * > tr > td[colspan] {
        display: block !important;
        text-align: center !important;
    }

    html body table.oc-cards > * > tr > td.oc-cell-empty,
    html body table.oc-cards > * > tr > td.oc-cell-hidden,
    html body table.oc-cards > * > tr > th.oc-cell-hidden,
    html body table.oc-cards > * > tr.oc-row-hidden {
        display: none !important;
    }

    html body table.oc-cards > * > tr > td > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        max-width: 62% !important;
    }

    html body table.oc-cards > * > tr > td.oc-cell-wide {
        display: block !important;
        text-align: left !important;
    }

    html body table.oc-cards > * > tr > td.oc-cell-wide::before {
        display: block !important;
        max-width: none !important;
        margin-bottom: 6px;
    }

    html body table.oc-cards > * > tr > td.oc-cell-wide > :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        max-width: 100% !important;
        width: 100% !important;
    }
}

html body table.oc-xscroll {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.oc-totop {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 5200;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: #0f2a4a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15,42,74,.28);
    opacity: 0;
    transform: translateY(12px) scale(.92);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, background .15s ease;
}

.oc-totop::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: #e08e0b;
}

.oc-totop.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.oc-totop:hover {
    background: #1e3a5f;
}

.oc-totop:focus-visible {
    outline: 2px solid #38a8e0;
    outline-offset: 2px;
}

body.oc-has-bottom-bar .oc-totop {
    bottom: calc(var(--oc-bottom-bar-h, 84px) + 12px);
}

.oc-offline {
    position: fixed;
    left: 50%;
    top: 68px;
    z-index: 7500;
    transform: translate(-50%, -16px);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 24px);
    padding: 9px 16px;
    border-radius: 12px;
    background: #7c2d12;
    color: #ffedd5;
    font: 600 12.5px 'DM Sans', 'Segoe UI', sans-serif;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.oc-offline.show {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.oc-offline.back {
    background: #065f46;
    color: #d1fae5;
}

.oc-kbd-hint {
    position: fixed;
    z-index: 7400;
    padding: 4px 8px;
    border-radius: 6px;
    background: #0f2a4a;
    color: #fff;
    font: 600 11px 'DM Sans', 'Segoe UI', sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
}

@media (max-width: 767.98px) {
    .oc-totop {
        right: 12px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oc-totop,
    .oc-offline {
        transition: none;
    }
}

@media print {
    .oc-totop,
    .oc-offline,
    .oc-tview {
        display: none !important;
    }
}

html[data-theme="dark"] .oc-tview-seg {
    background: #0a1420;
    border-color: #1e3247;
}

html[data-theme="dark"] .oc-tview-seg button {
    color: #7d93a8;
}

html[data-theme="dark"] .oc-tview-seg button[aria-pressed="true"] {
    background: #1e3247;
    color: #ffffff;
}

@media (max-width: 767.98px) {
    html[data-theme="dark"] body table.oc-cards > * > tr {
        background: #101f2e !important;
        border-color: #1e3247 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,.4) !important;
    }

    html[data-theme="dark"] body table.oc-cards > * > tr > td,
    html[data-theme="dark"] body table.oc-cards > * > tr > th {
        border-bottom-color: #1a2d42 !important;
    }

    html[data-theme="dark"] body table.oc-cards > * > tr > td[data-label]::before {
        color: #7d93a8;
    }
}

html[data-theme="dark"] .oc-totop {
    background: #152636;
    border-color: #2b4763;
    box-shadow: 0 8px 22px rgba(0,0,0,.5);
}

html[data-theme="dark"] .oc-totop:hover {
    background: #1e3247;
}
