:root {
    --primaryColor: #0d9488;
    --primaryLightColor: #14b8a6;
    --primaryDarkColor: #0f766e;
    --primarySoftColor: #f0fdfa;
    --primaryRingColor: rgba(20, 184, 166, 0.1);

    --mainBgColor: #f1f5f9;
    --surfaceColor: #ffffff;
    --surfaceMutedColor: #f8fafc;
    --surfaceHoverColor: #f8fafc;

    --mainTextColor: #0f172a;
    --secondaryTextColor: #475569;
    --mutedTextColor: #64748b;
    --lightTextColor: #94a3b8;

    --borderColor: #e2e8f0;
    --borderHoverColor: #cbd5e1;

    --successColor: #059669;
    --successSoftColor: #ecfdf5;
    --successBorderColor: #a7f3d0;

    --dangerColor: #dc2626;
    --dangerSoftColor: #fef2f2;
    --dangerBorderColor: #fecaca;

    --warningColor: #d97706;
    --warningSoftColor: #fffbeb;
    --warningBorderColor: #fde68a;

    --infoColor: #2563eb;
    --infoSoftColor: #eff6ff;
    --infoBorderColor: #bfdbfe;

    --shadowSmall: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadowCard: 0 8px 24px rgba(15, 23, 42, 0.05);
    --shadowHover: 0 14px 32px rgba(15, 23, 42, 0.08);

    --sidebarWidth: 250px;
    --sidebarCollapsedWidth: 70px;
    --contentMaxWidth: 1440px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--mainBgColor);
    color: var(--mainTextColor);
    -webkit-font-smoothing: antialiased;
}

body.modalOpen {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}


/* =========================================================
   APPLICATION SHELL
   ========================================================= */

.backupManagerApp {
    min-height: 100vh;
}

.backupManagerSidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebarWidth);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: var(--surfaceColor);
    border-right: 1px solid var(--borderColor);
    z-index: 100;
    transition:
        width 0.22s ease,
        padding 0.22s ease;
}

.backupManagerMain {
    min-height: 100vh;
    margin-left: var(--sidebarWidth);
    transition: margin-left 0.22s ease;
}

.backupManagerMainInner {
    width: 100%;
    max-width: var(--contentMaxWidth);
    margin: 0 auto;
    padding: 34px 36px 56px;
}


/* =========================================================
   BRAND
   ========================================================= */

.backupManagerBrand {
    padding: 4px 6px 24px;
}

.backupManagerBrandLink {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.backupManagerBrandLogo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background:
        linear-gradient(
            135deg,
            var(--primaryDarkColor),
            var(--primaryLightColor)
        );
    color: #ffffff;
    box-shadow:
        0 7px 18px rgba(13, 148, 136, 0.18);
}

.backupManagerBrandLogoMark {
    display: grid;
    place-items: center;
    font-size: 19px;
}

.backupManagerBrandText {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.backupManagerBrandName {
    color: var(--mainTextColor);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.backupManagerBrandSubtitle {
    margin-top: 3px;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.backupManagerNavigation {
    flex: 1;
    overflow-y: auto;
    padding-right: 2px;
}

.backupManagerNavigationSection {
    margin-bottom: 23px;
}

.backupManagerNavigationLabel {
    display: block;
    margin: 0 10px 7px;
    color: var(--lightTextColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.backupManagerNavItem {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 11px;
    border-radius: 10px;
    color: var(--secondaryTextColor);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition:
        background 0.16s ease,
        color 0.16s ease;
}

.backupManagerNavItem i {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: var(--mutedTextColor);
    font-size: 15px;
    transition: color 0.16s ease;
}

.backupManagerNavItem:hover {
    background: var(--surfaceMutedColor);
    color: var(--mainTextColor);
}

.backupManagerNavItem:hover i {
    color: var(--primaryColor);
}

.backupManagerNavItem.active {
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
}

.backupManagerNavItem.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--primaryColor);
}

.backupManagerNavItem.active i {
    color: var(--primaryColor);
}

.backupManagerNavText {
    white-space: nowrap;
}


/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.backupManagerSidebarFooter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--borderColor);
}

.backupManagerSystemIndicator {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 7px;
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.backupManagerSystemIndicatorDot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--successColor);
    box-shadow:
        0 0 0 3px rgba(5, 150, 105, 0.08);
}

.backupManagerSystemIndicatorText {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.backupManagerSystemIndicatorTitle {
    color: var(--mainTextColor);
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.backupManagerSystemIndicatorStatus {
    margin-top: 2px;
    color: var(--successColor);
    font-size: 9px;
    font-weight: 600;
}

.backupManagerSidebarCollapse {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    transition:
        background 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}

.backupManagerSidebarCollapse:hover {
    background: var(--surfaceMutedColor);
    border-color: var(--borderHoverColor);
    color: var(--mainTextColor);
}


/* =========================================================
   COLLAPSED SIDEBAR
   ========================================================= */

.backupManagerApp.sidebarCollapsed .backupManagerSidebar {
    width: var(--sidebarCollapsedWidth);
    padding-left: 10px;
    padding-right: 10px;
}

.backupManagerApp.sidebarCollapsed .backupManagerMain {
    margin-left: var(--sidebarCollapsedWidth);
}

.backupManagerApp.sidebarCollapsed .backupManagerBrand {
    padding-left: 0;
    padding-right: 0;
}

.backupManagerApp.sidebarCollapsed .backupManagerBrandLink {
    justify-content: center;
}

.backupManagerApp.sidebarCollapsed .backupManagerBrandText,
.backupManagerApp.sidebarCollapsed .backupManagerNavigationLabel,
.backupManagerApp.sidebarCollapsed .backupManagerNavText,
.backupManagerApp.sidebarCollapsed .backupManagerSystemIndicatorText {
    display: none;
}

.backupManagerApp.sidebarCollapsed .backupManagerNavItem {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.backupManagerApp.sidebarCollapsed .backupManagerNavItem.active::before {
    left: -10px;
}

.backupManagerApp.sidebarCollapsed .backupManagerSystemIndicator {
    justify-content: center;
    padding: 9px 0;
}

.backupManagerApp.sidebarCollapsed .backupManagerSidebarFooter {
    justify-content: center;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.pageHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.pageHeaderContent {
    min-width: 0;
}

.pageHeaderActions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.pageEyebrow,
.sectionEyebrow {
    color: var(--primaryColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pageEyebrow {
    margin-bottom: 7px;
}

.sectionEyebrow {
    margin-bottom: 5px;
}

.pageHeaderTitle {
    margin: 0 0 7px;
    color: var(--mainTextColor);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.pageHeaderDescription {
    max-width: 700px;
    margin: 0;
    color: var(--mutedTextColor);
    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        color 0.16s ease;
}

.btn i {
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btnPrimary {
    background:
        linear-gradient(
            135deg,
            var(--primaryDarkColor),
            var(--primaryLightColor)
        );
    color: #ffffff;
    box-shadow:
        0 7px 16px rgba(13, 148, 136, 0.14);
}

.btnPrimary:hover {
    box-shadow:
        0 9px 20px rgba(13, 148, 136, 0.19);
}

.btnSecondary {
    background: var(--surfaceColor);
    border-color: var(--borderColor);
    color: var(--secondaryTextColor);
}

.btnSecondary:hover {
    background: var(--surfaceMutedColor);
    border-color: var(--borderHoverColor);
    color: var(--mainTextColor);
}

.btnSuccess {
    background: var(--successSoftColor);
    border-color: var(--successBorderColor);
    color: var(--successColor);
}

.btnDanger {
    background: var(--dangerSoftColor);
    border-color: var(--dangerBorderColor);
    color: var(--dangerColor);
}

.btnWarning {
    background: var(--warningSoftColor);
    border-color: var(--warningBorderColor);
    color: var(--warningColor);
}

.btnSmall {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 10px;
}

.btnIcon {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}


/* =========================================================
   SURFACE CARDS
   ========================================================= */

.surfaceCard,
.contentCard {
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 15px;
    box-shadow: var(--shadowSmall);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.surfaceCard:hover,
.contentCard:hover {
    border-color: #d8e0ea;
    box-shadow: var(--shadowCard);
}

.cardHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--borderColor);
}

.cardHeaderContent {
    min-width: 0;
}

.cardTitle,
.cardHeader h2 {
    margin: 0 0 5px;
    color: var(--mainTextColor);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.3;
}

.cardDescription,
.cardHeader p {
    margin: 0;
    color: var(--mutedTextColor);
    font-size: 11px;
    line-height: 1.5;
}

.cardBody {
    padding: 20px;
}

.cardEyebrow {
    margin-bottom: 5px;
    color: var(--primaryColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sectionIcon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid #ccfbf1;
    border-radius: 9px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 14px;
}


/* =========================================================
   TARGET METRICS
   ========================================================= */

.targetMetrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metricCard {
    min-width: 0;
    padding: 18px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 14px;
    box-shadow: var(--shadowSmall);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.metricCard:hover {
    border-color: var(--borderHoverColor);
    box-shadow: var(--shadowCard);
    transform: translateY(-1px);
}

.metricCardTop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metricLabel {
    display: block;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 650;
}

.metricValue {
    display: block;
    margin-top: 6px;
    color: var(--mainTextColor);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.metricValueSuccess {
    color: var(--successColor);
}

.metricValueWarning {
    color: var(--warningColor);
}

.metricDescription {
    display: block;
    margin-top: 9px;
    color: var(--lightTextColor);
    font-size: 9px;
    line-height: 1.4;
}

.metricIcon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 16px;
}

.metricIconNeutral {
    background: var(--primarySoftColor);
    color: var(--primaryColor);
}

.metricIconSuccess {
    background: var(--successSoftColor);
    color: var(--successColor);
}

.metricIconWarning {
    background: var(--warningSoftColor);
    color: var(--warningColor);
}


/* =========================================================
   DASHBOARD STATS
   ========================================================= */

.dashboardStats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboardStatCard {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    min-height: 126px;
    padding: 18px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 14px;
    box-shadow: var(--shadowSmall);
}

.dashboardStatIcon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 16px;
}

.dashboardStatCardSuccess .dashboardStatIcon {
    background: var(--successSoftColor);
    color: var(--successColor);
}

.dashboardStatCardDanger .dashboardStatIcon {
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
}

.dashboardStatContent {
    min-width: 0;
}

.dashboardStatLabel {
    display: block;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 600;
}

.dashboardStatValue {
    display: block;
    margin-top: 6px;
    color: var(--mainTextColor);
    font-size: 29px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.dashboardStatMeta {
    display: block;
    margin-top: 8px;
    color: var(--lightTextColor);
    font-size: 9px;
    line-height: 1.4;
}


/* =========================================================
   DASHBOARD LAYOUT
   ========================================================= */

.dashboardLayout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(310px, 0.75fr);
    gap: 18px;
}

.dashboardMainColumn,
.dashboardSideColumn {
    min-width: 0;
}

.dashboardSection {
    margin-bottom: 18px;
}

.dashboardSection:last-child {
    margin-bottom: 0;
}


/* =========================================================
   TABLES
   ========================================================= */

.dashboardTableWrap,
.tableWrap {
    width: 100%;
    overflow-x: auto;
}

.dataTable,
table {
    width: 100%;
    border-collapse: collapse;
}

.dataTable th,
.dataTable td,
table th,
table td {
    padding: 13px 17px;
    border-bottom: 1px solid var(--borderColor);
    text-align: left;
    vertical-align: middle;
}

.dataTable th,
table th {
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dataTable td,
table td {
    color: var(--secondaryTextColor);
    font-size: 11px;
}

.dataTable td strong,
table td strong {
    color: var(--mainTextColor);
    font-weight: 700;
}

.dataTable tbody tr,
table tbody tr {
    transition: background 0.14s ease;
}

.dataTable tbody tr:hover,
table tbody tr:hover {
    background: var(--surfaceMutedColor);
}

.dataTable tbody tr:last-child td,
table tbody tr:last-child td {
    border-bottom: 0;
}

.tableActionColumn {
    width: 1%;
    text-align: right !important;
    white-space: nowrap;
}

.rightAlign {
    text-align: right !important;
}


/* =========================================================
   TARGET TOOLBAR / SEARCH
   ========================================================= */

.targetToolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.searchBox {
    position: relative;
    display: flex;
    align-items: center;
    width: min(270px, 100%);
}

.searchBox > i {
    position: absolute;
    left: 12px;
    color: var(--mutedTextColor);
    font-size: 13px;
    pointer-events: none;
}

.searchBox input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    outline: none;
    background: var(--surfaceColor);
    color: var(--mainTextColor);
    font-size: 11px;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.searchBox input::placeholder {
    color: var(--lightTextColor);
}

.searchBox input:focus {
    border-color: var(--primaryColor);
    box-shadow:
        0 0 0 3px var(--primaryRingColor);
}


/* =========================================================
   STATUS BADGES
   ========================================================= */

.statusBadge,
.statusPill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.statusBadgeDot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.statusBadgeNeutral {
    color: var(--mutedTextColor);
    border-color: var(--borderColor);
    background: var(--surfaceMutedColor);
}

.statusSuccess,
.statusPill.enabled {
    color: var(--successColor);
    border-color: var(--successBorderColor);
    background: var(--successSoftColor);
}

.statusWarning {
    color: var(--warningColor);
    border-color: var(--warningBorderColor);
    background: var(--warningSoftColor);
}

.statusDanger {
    color: var(--dangerColor);
    border-color: var(--dangerBorderColor);
    background: var(--dangerSoftColor);
}

.statusPill.disabled {
    color: var(--mutedTextColor);
    border-color: var(--borderColor);
    background: var(--surfaceMutedColor);
}


/* =========================================================
   ATTENTION
   ========================================================= */

.attentionItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 14px;
    padding: 13px;
    border: 1px solid var(--warningBorderColor);
    border-radius: 11px;
    background: var(--warningSoftColor);
}

.attentionItem:first-child {
    margin-top: 14px;
}

.attentionItem:last-child {
    margin-bottom: 14px;
}

.attentionText {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.attentionTitle {
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 700;
}

.attentionMessage {
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.4;
}

.dashboardSuccess {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px;
    padding: 15px;
    border: 1px solid var(--successBorderColor);
    border-radius: 11px;
    background: var(--successSoftColor);
}

.successIcon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #d1fae5;
    color: var(--successColor);
    font-size: 13px;
    font-weight: 800;
}

.dashboardSuccess strong {
    display: block;
    color: var(--mainTextColor);
    font-size: 11px;
}

.dashboardSuccess p {
    margin: 4px 0 0;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.45;
}


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.quickActions {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.quickAction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 64px;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 11px;
    background: var(--surfaceColor);
    color: var(--mainTextColor);
    text-decoration: none;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.quickAction:hover {
    background: var(--surfaceMutedColor);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadowSmall);
}

.quickActionContent {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quickActionIcon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 14px;
}

.quickActionText {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.quickActionText strong {
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
}

.quickActionText small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--mutedTextColor);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quickActionArrow {
    flex: 0 0 auto;
    color: var(--lightTextColor);
    font-size: 13px;
}


/* =========================================================
   SYSTEM STATE
   ========================================================= */

#systemState {
    padding: 5px 20px 14px;
}

.systemStateList,
.statusList {
    display: flex;
    flex-direction: column;
}

.systemStateItem,
.statusRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--borderColor);
}

.systemStateItem:last-child,
.statusRow:last-child {
    border-bottom: 0;
}

.systemStateItem > span:first-child {
    color: var(--secondaryTextColor);
    font-size: 10px;
    font-weight: 600;
}


/* =========================================================
   EMPTY / LOADING STATES
   ========================================================= */

.emptyDashboard,
.emptyState,
.loadingState {
    padding: 38px 20px;
    text-align: center;
    color: var(--mutedTextColor);
    font-size: 11px;
    line-height: 1.5;
}

.activityEmpty {
    padding: 34px 20px;
    text-align: center;
}

.activityEmpty h3 {
    margin-bottom: 7px;
    color: var(--mainTextColor);
    font-size: 14px;
}

.activityEmpty p {
    max-width: 580px;
    margin: 0 auto;
    color: var(--mutedTextColor);
    font-size: 11px;
    line-height: 1.6;
}

.emptyIcon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border: 1px solid var(--borderColor);
    border-radius: 12px;
    background: var(--surfaceMutedColor);
    color: var(--primaryColor);
    font-size: 21px;
}

.loadingIndicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.loadingSpinner {
    width: 15px;
    height: 15px;
    border: 2px solid var(--borderColor);
    border-top-color: var(--primaryColor);
    border-radius: 50%;
    animation: spinner 0.7s linear infinite;
}


/* =========================================================
   FORM SYSTEM
   ========================================================= */

.formRow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.formRowThree {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.formGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    padding: 20px;
}

.formGroup {
    min-width: 0;
    margin-bottom: 18px;
}

.formGroup.fullWidth,
.fullWidth {
    grid-column: 1 / -1;
}

.formLabel {
    display: block;
    margin-bottom: 7px;
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 700;
}

.formHint {
    display: block;
    margin-top: 6px;
    color: var(--mutedTextColor);
    font-size: 9px;
    line-height: 1.5;
}

.formControl,
.formSelect,
.formTextarea {
    width: 100%;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    outline: none;
    background: var(--surfaceColor);
    color: var(--mainTextColor);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.formControl,
.formSelect {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 11px;
}

.formTextarea {
    min-height: 110px;
    padding: 10px 11px;
    resize: vertical;
    font-size: 11px;
}

.formControl::placeholder,
.formTextarea::placeholder {
    color: var(--lightTextColor);
}

.formControl:focus,
.formSelect:focus,
.formTextarea:focus {
    border-color: var(--primaryColor);
    box-shadow:
        0 0 0 3px var(--primaryRingColor);
}

.formActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--borderColor);
}

.inputWithIcon {
    position: relative;
    display: flex;
    align-items: center;
}

.inputWithIcon > i:first-child {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--mutedTextColor);
    font-size: 13px;
    pointer-events: none;
}

.inputWithIcon .formControl {
    padding-left: 34px;
}

.fieldHeading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}


/* =========================================================
   SWITCH
   ========================================================= */

.switchRow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    padding: 12px 14px;
    border: 1px solid var(--borderColor);
    border-radius: 11px;
    background: var(--surfaceMutedColor);
    cursor: pointer;
}

.switchContent {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.switchContent strong {
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 700;
}

.switchContent small {
    color: var(--mutedTextColor);
    font-size: 9px;
    line-height: 1.45;
}

.switchRow > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switchControl {
    position: relative;
    width: 40px;
    height: 22px;
    flex: 0 0 40px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.18s ease;
}

.switchControl::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.18s ease;
}

.switchRow > input:checked + .switchControl {
    background: var(--primaryColor);
}

.switchRow > input:checked + .switchControl::after {
    transform: translateX(18px);
}


/* =========================================================
   PROFILE SELECTION
   ========================================================= */

.profileSelection {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 2px;
}

.profileOption {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceColor);
    transition:
        border-color 0.16s ease,
        background 0.16s ease;
}

.profileOption:hover {
    border-color: var(--borderHoverColor);
    background: var(--surfaceMutedColor);
}

.profileOption input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    accent-color: var(--primaryColor);
}

.profileOption label {
    min-width: 0;
    cursor: pointer;
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 650;
}

.profileEmpty {
    padding: 22px;
    border: 1px dashed var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
    text-align: center;
    font-size: 10px;
}


/* =========================================================
   TARGET DETAILS
   ========================================================= */

.targetDetails {
    margin-top: 9px;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceMutedColor);
    color: var(--secondaryTextColor);
    font-size: 10px;
    line-height: 1.5;
}

.targetDetails[hidden] {
    display: none;
}


/* =========================================================
   RUN STATUS
   ========================================================= */

.runStatus {
    min-height: 0;
    margin-top: 10px;
}

.runStatus:empty {
    display: none;
}

.runStatus.success,
.runStatusSuccess {
    padding: 11px 13px;
    border: 1px solid var(--successBorderColor);
    border-radius: 9px;
    background: var(--successSoftColor);
    color: var(--successColor);
    font-size: 10px;
}

.runStatus.error,
.runStatusError {
    padding: 11px 13px;
    border: 1px solid var(--dangerBorderColor);
    border-radius: 9px;
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
    font-size: 10px;
}

.runStatus.info,
.runStatusInfo {
    padding: 11px 13px;
    border: 1px solid var(--infoBorderColor);
    border-radius: 9px;
    background: var(--infoSoftColor);
    color: var(--infoColor);
    font-size: 10px;
}


/* =========================================================
   PAYLOAD PREVIEW
   ========================================================= */

.payloadCard {
    min-width: 0;
}

.payloadCardBody {
    padding: 0;
}

.payloadMeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--borderColor);
    background: var(--surfaceMutedColor);
}

.payloadLanguage {
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.mono {
    font-family:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.payloadPreview {
    min-height: 420px;
    overflow: auto;
    padding: 18px;
    background: #0f172a;
}

.payloadPreview pre {
    margin: 0;
    color: #dbeafe;
    font-family:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 10px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}


/* =========================================================
   SEARCH WRAP
   ========================================================= */

.searchWrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(280px, 100%);
    padding: 0 11px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceColor);
}

.searchWrap:focus-within {
    border-color: var(--primaryColor);
    box-shadow:
        0 0 0 3px var(--primaryRingColor);
}

.searchWrap input {
    width: 100%;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mainTextColor);
    font-size: 11px;
}

.searchWrap input::placeholder {
    color: var(--lightTextColor);
}

.searchWrap span,
.searchWrap i {
    color: var(--mutedTextColor);
}


/* =========================================================
   MESSAGE BOXES
   ========================================================= */

.messageBox {
    margin: 15px 20px 0;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.5;
}

.messageBox.success {
    border: 1px solid var(--successBorderColor);
    background: var(--successSoftColor);
    color: var(--successColor);
}

.messageBox.error {
    border: 1px solid var(--dangerBorderColor);
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
}

.messageBox.info {
    border: 1px solid var(--infoBorderColor);
    background: var(--infoSoftColor);
    color: var(--infoColor);
}


/* =========================================================
   TABS
   ========================================================= */

.tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--borderColor);
}

.tab {
    position: relative;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 700;
}

.tab:hover {
    color: var(--mainTextColor);
}

.tab.active {
    color: var(--primaryDarkColor);
}

.tab.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--primaryColor);
}


/* =========================================================
   PROGRESS
   ========================================================= */

.progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.progressBar {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--primaryDarkColor),
            var(--primaryLightColor)
        );
    transition: width 0.3s ease;
}


/* =========================================================
   MODAL
   ========================================================= */

.modalBackdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
}

.modalBackdrop[aria-hidden="true"] {
    display: none;
}

.modal,
.modalCard {
    width: min(620px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 16px;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.18);
    animation: modalIn 0.2s ease both;
}

.modalHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--borderColor);
}

.modalHeaderContent {
    min-width: 0;
}

.modalEyebrow {
    margin-bottom: 6px;
    color: var(--primaryColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.modalHeader h2 {
    margin: 0;
    color: var(--mainTextColor);
    font-size: 18px;
    font-weight: 800;
}

.modalDescription {
    max-width: 500px;
    margin: 6px 0 0;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.5;
}

.iconButton {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    font-size: 14px;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}

.iconButton:hover {
    background: var(--surfaceMutedColor);
    border-color: var(--borderHoverColor);
    color: var(--mainTextColor);
}

.modalActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--borderColor);
}


/* =========================================================
   DATABASE PROFILE
   ========================================================= */

/* Password / input icon */

.inputWithIcon {
    position: relative;
    display: flex;
    align-items: center;
}

.inputWithIcon > i:first-child {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--mutedTextColor);
    font-size: 13px;
    pointer-events: none;
}

.inputWithIcon .formControl {
    padding-left: 36px;
    padding-right: 46px;
}


/* Password eye button */

.inputWithIcon .passwordToggle {
    position: absolute;
    top: 50%;
    right: 5px;
    z-index: 3;
    width: 34px;
    height: 34px;
    min-height: 34px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    transform: translateY(-50%);
    background: transparent;
    color: var(--mutedTextColor);
    cursor: pointer;
}

.inputWithIcon .passwordToggle:hover {
    background: var(--surfaceMutedColor);
    color: var(--mainTextColor);
}

.inputWithIcon .passwordToggle:focus-visible {
    outline: 2px solid var(--primaryColor);
    outline-offset: 1px;
}

.inputWithIcon .passwordToggle i {
    position: static;
    left: auto;
    top: auto;
    z-index: auto;
    transform: none;
    color: inherit;
    font-size: 13px;
    pointer-events: none;
}


/* Database profile checkbox */

.checkboxLabel {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceMutedColor);
    color: var(--secondaryTextColor);
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}

.checkboxLabel input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: var(--primaryColor);
}


/* =========================================================
   DATABASE PROFILE VIEW MODAL
   ========================================================= */

#profileViewModal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
}

#profileViewModal[aria-hidden="true"] {
    display: none;
}

#profileViewModal .profileViewModalCard,
#profileViewModal .profileViewModal {
    width: min(720px, 100%);
    max-height: min(760px, 92vh);
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 16px;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.18);
    animation: modalIn 0.2s ease both;
}

#profileViewModal > .profileViewModal {
    width: min(720px, 100%);
}


/* =========================================================
   PROFILE VIEW BODY
   ========================================================= */

.profileViewBody {
    max-height: 58vh;
    overflow-y: auto;
    padding: 20px;
}


/* =========================================================
   PROFILE VIEW IDENTITY
   ========================================================= */

.profileViewIdentity {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--borderColor);
    border-radius: 12px;
    background: var(--surfaceMutedColor);
}

.profileViewIdentityIcon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 17px;
}

.profileViewIdentityContent {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profileViewLabel {
    display: block;
    margin-bottom: 4px;
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profileViewProfileName {
    display: block;
    overflow: hidden;
    color: var(--mainTextColor);
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   PROFILE VIEW SECTIONS
   ========================================================= */

.profileViewSection {
    margin-bottom: 12px;
    padding: 15px;
    border: 1px solid var(--borderColor);
    border-radius: 12px;
    background: var(--surfaceColor);
}

.profileViewSection:last-child {
    margin-bottom: 0;
}

.profileViewSectionHeader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}

.profileViewSectionIcon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 13px;
}

.profileViewSectionHeader h3 {
    margin: 0;
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 800;
}

.profileViewSectionHeader p {
    margin: 3px 0 0;
    color: var(--mutedTextColor);
    font-size: 9px;
    line-height: 1.4;
}


/* =========================================================
   PROFILE VIEW GRID
   ========================================================= */

.profileViewGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.profileViewItem {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.profileViewItemLabel {
    display: block;
    margin-bottom: 5px;
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.profileViewItemValue {
    display: block;
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profileViewUrl {
    color: var(--primaryDarkColor);
}


/* =========================================================
   PROFILE VIEW STATS
   ========================================================= */

.profileViewStats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.profileViewStat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.profileViewStatIcon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 12px;
}

.profileViewStatContent {
    min-width: 0;
}

.profileViewStatLabel {
    display: block;
    color: var(--mutedTextColor);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.profileViewStatValue {
    display: block;
    margin-top: 3px;
    color: var(--mainTextColor);
    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   DATABASE PROFILE RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    #profileViewModal {
        padding: 12px;
    }

    #profileViewModal .profileViewModalCard,
    #profileViewModal .profileViewModal {
        max-height: 94vh;
    }

    .profileViewBody {
        max-height: 60vh;
        padding: 16px;
    }

    .profileViewGrid {
        grid-template-columns: 1fr;
    }

    .profileViewStats {
        grid-template-columns: 1fr;
    }

    .profileViewIdentity {
        align-items: flex-start;
    }

    .profileViewSection {
        padding: 13px;
    }
}


/* =========================================================
   UTILITY
   ========================================================= */

.hidden {
    display: none !important;
}

.textMuted {
    color: var(--mutedTextColor);
}

.textSuccess {
    color: var(--successColor);
}

.textDanger {
    color: var(--dangerColor);
}

.textWarning {
    color: var(--warningColor);
}

.textPrimary {
    color: var(--primaryColor);
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

.fadeIn {
    animation:
        fadeIn 0.28s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation:
        spinner 0.7s linear infinite;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {

    .dashboardStats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboardLayout {
        grid-template-columns: 1fr;
    }

    .targetMetrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 950px) {

    .backupManagerSidebar {
        width: var(--sidebarCollapsedWidth);
        padding-left: 10px;
        padding-right: 10px;
    }

    .backupManagerMain {
        margin-left: var(--sidebarCollapsedWidth);
    }

    .backupManagerBrand {
        padding-left: 0;
        padding-right: 0;
    }

    .backupManagerBrandLink {
        justify-content: center;
    }

    .backupManagerBrandText,
    .backupManagerNavigationLabel,
    .backupManagerNavText,
    .backupManagerSystemIndicatorText {
        display: none;
    }

    .backupManagerNavItem {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .backupManagerNavItem.active::before {
        left: -10px;
    }

    .backupManagerSystemIndicator {
        justify-content: center;
        padding: 9px 0;
    }

    .backupManagerSidebarFooter {
        justify-content: center;
    }

    .backupManagerMainInner {
        padding-left: 26px;
        padding-right: 26px;
    }

    .formRowThree {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 700px) {

    .backupManagerMainInner {
        padding:
            24px 16px 42px;
    }

    .pageHeader {
        flex-direction: column;
        align-items: stretch;
    }

    .pageHeaderActions {
        width: 100%;
    }

    .pageHeaderActions .btn {
        width: 100%;
    }

    .dashboardStats {
        grid-template-columns: 1fr;
    }

    .targetMetrics {
        grid-template-columns: 1fr;
    }

    .formRow {
        grid-template-columns: 1fr;
    }

    .formGrid {
        grid-template-columns: 1fr;
    }

    .formGroup.fullWidth,
    .fullWidth {
        grid-column: auto;
    }

    .cardHeader {
        flex-direction: column;
        align-items: stretch;
    }

    .targetToolbar {
        justify-content: stretch;
    }

    .targetToolbar .searchBox {
        width: 100%;
    }

    .cardHeader > .btn,
    .cardHeader > a.btn {
        align-self: flex-start;
    }

    .payloadPreview {
        min-height: 300px;
    }

    .formActions,
    .modalActions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .formActions .btn,
    .modalActions .btn {
        width: 100%;
    }

    .switchRow {
        align-items: flex-start;
    }
}


@media (max-width: 500px) {

    .backupManagerSidebar {
        width: 62px;
    }

    .backupManagerMain {
        margin-left: 62px;
    }

    .backupManagerMainInner {
        padding-left: 12px;
        padding-right: 12px;
    }

    .dashboardStatCard {
        min-height: 112px;
        padding: 15px;
    }

    .dashboardStatValue {
        font-size: 26px;
    }

    .metricValue {
        font-size: 27px;
    }

    .dataTable th,
    .dataTable td,
    table th,
    table td {
        padding:
            11px 12px;
    }

    .attentionItem {
        align-items: flex-start;
        flex-direction: column;
    }

    .attentionItem .miniButton {
        width: 100%;
    }

    .dashboardSuccess {
        align-items: flex-start;
    }

    .modalBackdrop {
        padding: 10px;
    }

    .modal,
    .modalCard {
        max-height: 96vh;
        border-radius: 13px;
    }

    .modalHeader {
        padding: 16px;
    }

    .formGrid {
        padding: 16px;
    }

    .modalActions {
        padding:
            14px 16px 16px;
    }
}


@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   DATABASE PROFILE — PASSWORD TOOLS & STRENGTH METER
   ========================================================= */

.passwordTools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.passwordTools .btn {
    flex: 0 0 auto;
}

.passwordStrength {
    margin-top: 12px;
}

.passwordStrengthHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 650;
}

.passwordStrengthHeader strong {
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 800;
}

.passwordStrengthBar {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--borderColor);
}

.passwordStrengthBarFill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--dangerColor), var(--warningColor), var(--successColor));
    transition: width 0.25s ease;
}

/* Responsive: stack tools on narrow modals */
@media (max-width: 500px) {

    .passwordTools {
        flex-wrap: wrap;
    }

    .passwordTools .btn {
        flex: 1 1 calc(50% - 4px);
    }
}

/* =========================================================
   BACKUP HISTORY
   ========================================================= */

.backupHistoryPage {
    width: 100%;
}

.backupHistorySummary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.backupHistorySummaryCard {
    min-width: 0;
    padding: 17px 18px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 14px;
    box-shadow: var(--shadowSmall);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.backupHistorySummaryCard:hover {
    border-color: var(--borderHoverColor);
    box-shadow: var(--shadowCard);
    transform: translateY(-1px);
}

.backupHistorySummaryTop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.backupHistorySummaryLabel {
    display: block;
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 650;
}

.backupHistorySummaryValue {
    display: block;
    margin-top: 6px;
    color: var(--mainTextColor);
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.backupHistorySummaryMeta {
    display: block;
    margin-top: 8px;
    color: var(--lightTextColor);
    font-size: 9px;
    line-height: 1.4;
}

.backupHistorySummaryIcon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 15px;
}

.backupHistorySummarySuccess .backupHistorySummaryIcon {
    background: var(--successSoftColor);
    color: var(--successColor);
}

.backupHistorySummaryDanger .backupHistorySummaryIcon {
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
}

.backupHistorySummaryWarning .backupHistorySummaryIcon {
    background: var(--warningSoftColor);
    color: var(--warningColor);
}

.backupHistoryOverview {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.backupHistoryOverviewCard {
    min-width: 0;
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 15px;
    box-shadow: var(--shadowSmall);
}

.backupHistoryChartHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 13px;
}

.backupHistoryChartHeaderContent {
    min-width: 0;
}

.backupHistoryChartTitle {
    margin: 0;
    color: var(--mainTextColor);
    font-size: 14px;
    font-weight: 750;
}

.backupHistoryChartDescription {
    margin: 5px 0 0;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.5;
}

.backupHistoryChartLegend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 650;
}

.backupHistoryLegendItem {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.backupHistoryLegendDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primaryColor);
}

.backupHistoryLegendDotSuccess {
    background: var(--successColor);
}

.backupHistoryLegendDotDanger {
    background: var(--dangerColor);
}

.backupHistoryLegendDotWarning {
    background: var(--warningColor);
}

.backupHistoryChart {
    position: relative;
    min-height: 220px;
    padding: 10px 18px 18px;
}

.backupHistoryChart canvas {
    display: block;
    width: 100%;
    max-width: 100%;
}

.backupHistoryChartEmpty {
    min-height: 190px;
    display: grid;
    place-items: center;
    padding: 25px;
    color: var(--mutedTextColor);
    text-align: center;
    font-size: 10px;
}

.backupHistoryModeChart {
    min-height: 220px;
    padding: 10px 18px 18px;
}

.backupHistoryModeChartInner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    min-height: 190px;
}

.backupHistoryModeDonut {
    position: relative;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--primaryColor) 0deg,
            var(--primaryColor) var(--backupHistoryWeeklyAngle, 0deg),
            #dbeafe var(--backupHistoryWeeklyAngle, 0deg),
            #dbeafe 360deg
        );
}

.backupHistoryModeDonut::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--surfaceColor);
}

.backupHistoryModeDonutContent {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.backupHistoryModeDonutValue {
    color: var(--mainTextColor);
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
}

.backupHistoryModeDonutLabel {
    margin-top: 4px;
    color: var(--mutedTextColor);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.backupHistoryModeLegend {
    display: grid;
    gap: 12px;
}

.backupHistoryModeLegendItem {
    display: flex;
    align-items: center;
    gap: 9px;
}

.backupHistoryModeLegendIcon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 12px;
}

.backupHistoryModeLegendItemWeekly
    .backupHistoryModeLegendIcon {
    background: var(--infoSoftColor);
    color: var(--infoColor);
}

.backupHistoryModeLegendText {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.backupHistoryModeLegendText strong {
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
}

.backupHistoryModeLegendText span {
    color: var(--mutedTextColor);
    font-size: 9px;
}

.backupHistoryTableCard {
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 15px;
    box-shadow: var(--shadowSmall);
}

.backupHistoryTableHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--borderColor);
}

.backupHistoryTableHeaderContent {
    min-width: 0;
}

.backupHistoryTableTitle {
    margin: 0;
    color: var(--mainTextColor);
    font-size: 15px;
    font-weight: 750;
}

.backupHistoryTableDescription {
    margin: 5px 0 0;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.5;
}

.backupHistoryFilters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.backupHistoryFilter {
    height: 38px;
    min-width: 125px;
    padding: 0 10px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    outline: none;
    background: var(--surfaceColor);
    color: var(--secondaryTextColor);
    font-size: 10px;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.backupHistoryFilter:focus {
    border-color: var(--primaryColor);
    box-shadow:
        0 0 0 3px var(--primaryRingColor);
}

.backupHistorySearch {
    width: 220px;
}

.backupHistoryTableWrap {
    width: 100%;
    overflow-x: auto;
}

.backupHistoryTable {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.backupHistoryTable th,
.backupHistoryTable td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--borderColor);
    text-align: left;
    vertical-align: middle;
}

.backupHistoryTable th {
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.backupHistoryTable td {
    color: var(--secondaryTextColor);
    font-size: 10px;
}

.backupHistoryTable tbody tr {
    cursor: pointer;
    transition:
        background 0.14s ease,
        box-shadow 0.14s ease;
}

.backupHistoryTable tbody tr:hover {
    background: var(--primarySoftColor);
}

.backupHistoryTable tbody tr:last-child td {
    border-bottom: 0;
}

.backupHistoryTablePrimary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.backupHistoryTableIcon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 13px;
}

.backupHistoryTablePrimaryContent {
    min-width: 0;
}

.backupHistoryTablePrimaryTitle {
    display: block;
    overflow: hidden;
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupHistoryTablePrimaryMeta {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--mutedTextColor);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupHistoryRunId {
    display: inline-flex;
    max-width: 180px;
    overflow: hidden;
    padding: 4px 7px;
    border-radius: 6px;
    background: var(--surfaceMutedColor);
    color: var(--secondaryTextColor);
    font-family:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupHistoryModeBadge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid var(--borderColor);
    border-radius: 999px;
    background: var(--surfaceMutedColor);
    color: var(--secondaryTextColor);
    font-size: 8px;
    font-weight: 750;
}

.backupHistoryModeBadgeDaily {
    border-color: #ccfbf1;
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
}

.backupHistoryModeBadgeWeekly {
    border-color: var(--infoBorderColor);
    background: var(--infoSoftColor);
    color: var(--infoColor);
}

.backupHistoryDate {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.backupHistoryDatePrimary {
    color: var(--mainTextColor);
    font-size: 9px;
    font-weight: 650;
}

.backupHistoryDateSecondary {
    color: var(--mutedTextColor);
    font-size: 8px;
}

.backupHistoryStatus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}

.backupHistoryStatusDot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
}

.backupHistoryStatusSuccess {
    border: 1px solid var(--successBorderColor);
    background: var(--successSoftColor);
    color: var(--successColor);
}

.backupHistoryStatusFailed {
    border: 1px solid var(--dangerBorderColor);
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
}

.backupHistoryStatusRunning {
    border: 1px solid var(--warningBorderColor);
    background: var(--warningSoftColor);
    color: var(--warningColor);
}

.backupHistoryStatusUnknown {
    border: 1px solid var(--borderColor);
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
}

.backupHistoryAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.backupHistoryAction:hover {
    border-color: var(--primaryColor);
    background: var(--primarySoftColor);
    color: var(--primaryColor);
}

.backupHistoryPagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid var(--borderColor);
}

.backupHistoryPaginationInfo {
    color: var(--mutedTextColor);
    font-size: 9px;
}

.backupHistoryPaginationControls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.backupHistoryPaginationButton {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--secondaryTextColor);
    font-size: 9px;
    font-weight: 700;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.backupHistoryPaginationButton:hover:not(:disabled) {
    border-color: var(--primaryColor);
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
}

.backupHistoryPaginationButton.active {
    border-color: var(--primaryColor);
    background: var(--primaryColor);
    color: #ffffff;
}

.backupHistoryPaginationButton:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.backupHistoryEmpty {
    padding: 50px 20px;
    text-align: center;
}

.backupHistoryEmptyIcon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    border: 1px solid var(--borderColor);
    border-radius: 13px;
    background: var(--surfaceMutedColor);
    color: var(--primaryColor);
    font-size: 21px;
}

.backupHistoryEmptyTitle {
    margin: 0 0 5px;
    color: var(--mainTextColor);
    font-size: 13px;
    font-weight: 750;
}

.backupHistoryEmptyDescription {
    max-width: 480px;
    margin: 0 auto;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.55;
}


/* =========================================================
   BACKUP DETAILS
   ========================================================= */

.backupDetailsPage {
    width: 100%;
}

.backupDetailsHero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 22px;
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 15px;
    box-shadow: var(--shadowSmall);
}

.backupDetailsHeroContent {
    min-width: 0;
}

.backupDetailsHeroEyebrow {
    margin-bottom: 6px;
    color: var(--primaryColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.backupDetailsHeroTitle {
    margin: 0;
    color: var(--mainTextColor);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.backupDetailsHeroDescription {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--mutedTextColor);
    font-size: 11px;
    line-height: 1.55;
}

.backupDetailsHeroActions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.backupDetailsStatus {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 29px;
    padding: 0 10px;
    border: 1px solid var(--borderColor);
    border-radius: 999px;
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.backupDetailsStatusDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.backupDetailsStatusSuccess {
    border-color: var(--successBorderColor);
    background: var(--successSoftColor);
    color: var(--successColor);
}

.backupDetailsStatusFailed {
    border-color: var(--dangerBorderColor);
    background: var(--dangerSoftColor);
    color: var(--dangerColor);
}

.backupDetailsStatusRunning {
    border-color: var(--warningBorderColor);
    background: var(--warningSoftColor);
    color: var(--warningColor);
}

.backupDetailsStatusUnknown {
    border-color: var(--borderColor);
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
}

.backupDetailsStats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.backupDetailsStat {
    min-width: 0;
    padding: 16px 17px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 13px;
    box-shadow: var(--shadowSmall);
}

.backupDetailsStatLabel {
    display: block;
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 700;
}

.backupDetailsStatValue {
    display: block;
    margin-top: 6px;
    color: var(--mainTextColor);
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.backupDetailsStatMeta {
    display: block;
    margin-top: 7px;
    color: var(--lightTextColor);
    font-size: 8px;
    line-height: 1.4;
}

.backupDetailsLayout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(300px, 0.75fr);
    gap: 18px;
}

.backupDetailsMainColumn,
.backupDetailsSideColumn {
    min-width: 0;
}

.backupDetailsSection {
    margin-bottom: 18px;
}

.backupDetailsSection:last-child {
    margin-bottom: 0;
}

.backupDetailsCard {
    overflow: hidden;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 15px;
    box-shadow: var(--shadowSmall);
}

.backupDetailsCardHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--borderColor);
}

.backupDetailsCardHeaderContent {
    min-width: 0;
}

.backupDetailsCardEyebrow {
    margin-bottom: 5px;
    color: var(--primaryColor);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.backupDetailsCardTitle {
    margin: 0;
    color: var(--mainTextColor);
    font-size: 14px;
    font-weight: 750;
}

.backupDetailsCardDescription {
    margin: 5px 0 0;
    color: var(--mutedTextColor);
    font-size: 10px;
    line-height: 1.5;
}

.backupDetailsCardIcon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid #ccfbf1;
    border-radius: 9px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 14px;
}

.backupDetailsCardBody {
    padding: 20px;
}

.backupDetailsInfoGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.backupDetailsInfoItem {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.backupDetailsInfoItemFull {
    grid-column: 1 / -1;
}

.backupDetailsInfoLabel {
    display: block;
    margin-bottom: 5px;
    color: var(--mutedTextColor);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.backupDetailsInfoValue {
    display: block;
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.backupDetailsInfoValue.mono {
    font-size: 9px;
}

.backupDetailsProfiles {
    display: grid;
    gap: 10px;
}

.backupDetailsProfile {
    overflow: hidden;
    border: 1px solid var(--borderColor);
    border-radius: 11px;
    background: var(--surfaceColor);
}

.backupDetailsProfileHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    background: var(--surfaceMutedColor);
    border-bottom: 1px solid var(--borderColor);
}

.backupDetailsProfileIdentity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.backupDetailsProfileIcon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 12px;
}

.backupDetailsProfileName {
    display: block;
    overflow: hidden;
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupDetailsProfileMeta {
    display: block;
    margin-top: 3px;
    color: var(--mutedTextColor);
    font-size: 8px;
}

.backupDetailsProfileBody {
    padding: 13px;
}

.backupDetailsDatabase {
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.backupDetailsDatabase + .backupDetailsDatabase {
    margin-top: 8px;
}

.backupDetailsDatabaseHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.backupDetailsDatabaseName {
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
}

.backupDetailsDatabaseMeta {
    color: var(--mutedTextColor);
    font-size: 8px;
}

.backupDetailsTables {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--borderColor);
}

.backupDetailsTable {
    padding: 8px 0;
}

.backupDetailsTable + .backupDetailsTable {
    border-top: 1px dashed var(--borderColor);
}

.backupDetailsTableName {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondaryTextColor);
    font-size: 9px;
    font-weight: 700;
}

.backupDetailsTableName i {
    color: var(--primaryColor);
    font-size: 10px;
}

.backupDetailsColumns {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.backupDetailsColumn {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 0 6px;
    border: 1px solid var(--borderColor);
    border-radius: 6px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    font-family:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 7px;
}

.backupDetailsArchiveList {
    display: grid;
    gap: 8px;
}

.backupDetailsArchive {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceMutedColor);
}

.backupDetailsArchiveIcon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 13px;
}

.backupDetailsArchiveContent {
    min-width: 0;
    flex: 1;
}

.backupDetailsArchiveName {
    display: block;
    overflow: hidden;
    color: var(--mainTextColor);
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupDetailsArchiveMeta {
    display: block;
    margin-top: 3px;
    color: var(--mutedTextColor);
    font-size: 8px;
}

.backupDetailsArchiveStatus {
    flex: 0 0 auto;
}

.backupDetailsFileCard {
    padding: 16px;
}

.backupDetailsFileIdentity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.backupDetailsFileIcon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primarySoftColor);
    color: var(--primaryColor);
    font-size: 17px;
}

.backupDetailsFileContent {
    min-width: 0;
}

.backupDetailsFileName {
    display: block;
    overflow: hidden;
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backupDetailsFileMeta {
    display: block;
    margin-top: 3px;
    color: var(--mutedTextColor);
    font-size: 8px;
}

.backupDetailsFileLink {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 36px;
    margin-top: 13px;
    padding: 0 10px;
    border: 1px solid var(--primaryColor);
    border-radius: 9px;
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
    text-decoration: none;
    font-size: 9px;
    font-weight: 750;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease;
}

.backupDetailsFileLink:hover {
    background: #ccfbf1;
    border-color: var(--primaryDarkColor);
    transform: translateY(-1px);
}

.backupDetailsSecurity {
    padding: 15px;
    border: 1px solid var(--infoBorderColor);
    border-radius: 11px;
    background: var(--infoSoftColor);
}

.backupDetailsSecurityHeader {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}

.backupDetailsSecurityIcon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #dbeafe;
    color: var(--infoColor);
    font-size: 12px;
}

.backupDetailsSecurityTitle {
    color: var(--mainTextColor);
    font-size: 10px;
    font-weight: 750;
}

.backupDetailsSecurityText {
    margin: 0;
    color: var(--secondaryTextColor);
    font-size: 9px;
    line-height: 1.55;
}

.backupDetailsMessage {
    padding: 14px;
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    background: var(--surfaceMutedColor);
    color: var(--secondaryTextColor);
    font-size: 9px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.backupDetailsMessageSuccess {
    border-color: var(--successBorderColor);
    background: var(--successSoftColor);
}

.backupDetailsMessageError {
    border-color: var(--dangerBorderColor);
    background: var(--dangerSoftColor);
}

.backupDetailsRaw {
    margin-top: 18px;
}

.backupDetailsRawToggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.backupDetailsRawToggle:hover {
    border-color: var(--borderHoverColor);
    background: var(--surfaceMutedColor);
    color: var(--mainTextColor);
}

.backupDetailsRawContent {
    margin-top: 9px;
    overflow: hidden;
    border: 1px solid var(--borderColor);
    border-radius: 11px;
}

.backupDetailsRawContent[hidden] {
    display: none;
}

.backupDetailsRawContent pre {
    max-height: 500px;
    overflow: auto;
    margin: 0;
    padding: 16px;
    background: #0f172a;
    color: #dbeafe;
    font-family:
        "JetBrains Mono",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
    font-size: 8px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.backupDetailsExtraList {
    display: grid;
    gap: 8px;
}

.backupDetailsExtraItem {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr);
    gap: 12px;
    padding: 10px 11px;
    border: 1px solid var(--borderColor);
    border-radius: 9px;
    background: var(--surfaceMutedColor);
}

.backupDetailsExtraLabel {
    color: var(--mutedTextColor);
    font-size: 8px;
    font-weight: 750;
}

.backupDetailsExtraValue {
    color: var(--mainTextColor);
    font-size: 9px;
    font-weight: 650;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   BACKUP HISTORY + DETAILS RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {

    .backupHistorySummary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .backupHistoryOverview {
        grid-template-columns: 1fr;
    }

    .backupDetailsStats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .backupDetailsLayout {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 950px) {

    .backupHistoryTableHeader {
        flex-direction: column;
        align-items: stretch;
    }

    .backupHistoryFilters {
        width: 100%;
    }

    .backupHistorySearch {
        flex: 1 1 220px;
        width: auto;
    }

    .backupHistoryFilter {
        flex: 1 1 130px;
    }

    .backupDetailsHero {
        flex-direction: column;
        align-items: stretch;
    }

    .backupDetailsHeroActions {
        justify-content: flex-start;
    }
}


@media (max-width: 700px) {

    .backupHistorySummary {
        grid-template-columns: 1fr;
    }

    .backupHistoryChartHeader {
        flex-direction: column;
        align-items: stretch;
    }

    .backupHistoryModeChartInner {
        flex-direction: column;
        gap: 18px;
    }

    .backupHistoryPagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .backupHistoryPaginationControls {
        width: 100%;
        overflow-x: auto;
    }

    .backupDetailsStats {
        grid-template-columns: 1fr;
    }

    .backupDetailsCardHeader {
        align-items: flex-start;
    }

    .backupDetailsCardBody {
        padding: 16px;
    }

    .backupDetailsInfoGrid {
        grid-template-columns: 1fr;
    }

    .backupDetailsInfoItemFull {
        grid-column: auto;
    }

    .backupDetailsExtraItem {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}


@media (max-width: 500px) {

    .backupHistoryFilters {
        flex-direction: column;
        align-items: stretch;
    }

    .backupHistorySearch,
    .backupHistoryFilter {
        width: 100%;
        flex: none;
    }

    .backupHistoryChart {
        padding-left: 10px;
        padding-right: 10px;
    }

    .backupHistoryModeChart {
        padding-left: 10px;
        padding-right: 10px;
    }

    .backupHistoryTableCard {
        border-radius: 12px;
    }

    .backupDetailsHero {
        padding: 17px;
    }

    .backupDetailsHeroActions {
        flex-direction: column;
        align-items: stretch;
    }

    .backupDetailsHeroActions .btn {
        width: 100%;
    }

    .backupDetailsCardHeader {
        padding: 16px;
    }

    .backupDetailsProfileHeader {
        align-items: flex-start;
        flex-direction: column;
    }

    .backupDetailsArchive {
        align-items: flex-start;
    }

    .backupDetailsFileIdentity {
        align-items: flex-start;
    }
}

/* =========================================================
   BACKUP HISTORY — LAYOUT
   ========================================================= */

.backupHistoryPage {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* Compact stat strip — single row, no cards */

.historyStatStrip {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 22px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 14px;
    box-shadow: var(--shadowSmall);
    flex-wrap: wrap;
}

.historyStatItem {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.historyStatItemValue {
    color: var(--mainTextColor);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.historyStatSuccess { color: var(--successColor); }
.historyStatDanger { color: var(--dangerColor); }

.historyStatItemLabel {
    color: var(--mutedTextColor);
    font-size: 10px;
    font-weight: 650;
}

.historyStatDivider {
    width: 1px;
    height: 26px;
    background: var(--borderColor);
}

.historyStatItemRate {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

.historyRateTrack {
    width: 70px;
    height: 6px;
    border-radius: 999px;
    background: var(--surfaceMutedColor);
    overflow: hidden;
}

.historyRateFill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primaryDarkColor), var(--primaryLightColor));
    transition: width 0.4s ease;
}


/* Insight card — trend + mode split side by side */

.historyInsightCard {
    padding: 0;
}

.historyInsightGrid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr);
}

.historyTrendPane {
    padding: 18px 20px;
    border-right: 1px solid var(--borderColor);
}

.historyMixPane {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}

.historyPaneHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.historyTrendLegend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 9.5px;
    font-weight: 650;
    color: var(--mutedTextColor);
}

.historyTrendLegend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.historyTrendLegend i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--successColor);
}

.historyTrendLegend .failed i {
    background: var(--dangerColor);
}


/* SVG trend chart */

.backupTrendChart {
    width: 100%;
}

.historyTrendSvg {
    width: 100%;
    height: 150px;
    display: block;
}

.historyTrendAxis {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    padding: 0 24px;
    color: var(--lightTextColor);
    font-size: 9px;
}

.historyLoading {
    width: 100%;
    padding: 46px 10px;
    text-align: center;
    color: var(--mutedTextColor);
    font-size: 11px;
}


/* Horizontal split bar (replaces donut) */

.backupModeSplit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    gap: 16px;
}

.backupModeBarTrack {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surfaceMutedColor);
}

.backupModeBarSegment {
    height: 100%;
    transition: width 0.4s ease;
}

.backupModeBarDaily {
    background: var(--primaryColor);
}

.backupModeBarWeekly {
    background: #6d28d9;
}

.backupModeSplitRows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.backupModeSplitRow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.backupModeSplitDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
}

.backupModeDotDaily { background: var(--primaryColor); }
.backupModeDotWeekly { background: #6d28d9; }

.backupModeSplitLabel {
    color: var(--secondaryTextColor);
    font-weight: 650;
}

.backupModeSplitValue {
    margin-left: auto;
    color: var(--mainTextColor);
    font-weight: 800;
}

.backupModeSplitPercent {
    color: var(--mutedTextColor);
    font-size: 10px;
    min-width: 32px;
    text-align: right;
}


/* Table card */

.historyPasswordCell {
    min-width: 180px;
}

.historyPasswordWrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 220px;
}

.historyPasswordField {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 38px 0 10px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceMutedColor);
    color: var(--mainTextColor);
    font-size: 9px;
    font-family: inherit;
    outline: none;
}

.historyPasswordField:focus {
    border-color: var(--primaryColor);
}

.historyPasswordToggle {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--mutedTextColor);
    cursor: pointer;
    transform: translateY(-50%);
}

.historyPasswordToggle:hover {
    background: var(--primarySoftColor);
    color: var(--primaryColor);
}

.historyPasswordToggle i {
    font-size: 12px;
    pointer-events: none;
}

.historyTableTopBar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 19px 20px 16px;
    border-bottom: 1px solid var(--borderColor);
}

.historyTableTitle .cardTitle {
    margin-bottom: 3px;
}

.historyTableTitle .cardDescription {
    margin: 0;
}


/* Compact toolbar — search + pill filters, single slim row */

.historyCompactToolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.historySearchBox {
    position: relative;
    display: flex;
    align-items: center;
    width: 200px;
}

.historySearchBox > i {
    position: absolute;
    left: 10px;
    color: var(--mutedTextColor);
    font-size: 12px;
    pointer-events: none;
}

.historySearchBox input {
    width: 100%;
    height: 32px;
    padding: 0 10px 0 30px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--mainTextColor);
    font-size: 10.5px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.historySearchBox input:focus {
    border-color: var(--primaryColor);
    box-shadow: 0 0 0 3px var(--primaryRingColor);
}

.historyPillFilters {
    display: flex;
    align-items: center;
    gap: 6px;
}

.historyPillDropdown {
    position: relative;
}

.historyPillButton {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--secondaryTextColor);
    font-size: 10.5px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease;
}

.historyPillButton:hover {
    background: var(--surfaceMutedColor);
}

.historyPillButton i {
    font-size: 9px;
    color: var(--mutedTextColor);
    transition: transform 0.14s ease;
}

.historyPillDropdown.open .historyPillButton {
    border-color: var(--primaryColor);
}

.historyPillDropdown.open .historyPillButton i {
    transform: rotate(180deg);
}

.historyPillMenu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    display: none;
    flex-direction: column;
    min-width: 150px;
    padding: 5px;
    background: var(--surfaceColor);
    border: 1px solid var(--borderColor);
    border-radius: 10px;
    box-shadow: var(--shadowHover);
}

.historyPillDropdown.open .historyPillMenu {
    display: flex;
}

.historyPillOption {
    display: block;
    width: 100%;
    padding: 7px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--secondaryTextColor);
    font-size: 10.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.historyPillOption:hover {
    background: var(--surfaceMutedColor);
}

.historyPillOption.active {
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
}


/* Table */

.historyTableScroll {
    overflow-x: auto;
}

.backupHistoryTableContainer {
    min-height: 200px;
}

.backupHistoryTable {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.backupHistoryTable th {
    padding: 11px 18px;
    text-align: left;
    background: var(--surfaceMutedColor);
    color: var(--mutedTextColor);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--borderColor);
}

.backupHistoryTable td {
    padding: 13px 18px;
    color: var(--secondaryTextColor);
    font-size: 11px;
    border-bottom: 1px solid var(--borderColor);
    vertical-align: middle;
}

.backupHistoryTable tbody tr:last-child td {
    border-bottom: 0;
}

.backupHistoryRow {
    cursor: pointer;
    transition: background 0.14s ease;
}

.backupHistoryRow:hover {
    background: var(--surfaceMutedColor);
}

.backupHistoryRow:focus-visible {
    outline: 2px solid var(--primaryColor);
    outline-offset: -2px;
}

.historyRunId {
    display: block;
    color: var(--mainTextColor);
    font-weight: 700;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10.5px;
}

.historyRunMessage {
    display: block;
    margin-top: 3px;
    max-width: 240px;
    overflow: hidden;
    color: var(--mutedTextColor);
    font-size: 9.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.historyModePill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--primarySoftColor);
    color: var(--primaryDarkColor);
    font-size: 9.5px;
    font-weight: 700;
}

.historyModePill.weekly {
    background: #f3ecff;
    color: #6d28d9;
}

.historyDateCell strong {
    display: block;
    color: var(--mainTextColor);
    font-size: 11px;
    font-weight: 700;
}

.historyDateCell small {
    display: block;
    margin-top: 3px;
    color: var(--lightTextColor);
    font-size: 9px;
}

.historyDetailsLink {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--mutedTextColor);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.historyDetailsLink:hover {
    background: var(--primarySoftColor);
    border-color: #ccfbf1;
    color: var(--primaryColor);
}


/* Skeleton loading */

.historySkeleton {
    display: flex;
    flex-direction: column;
    padding: 4px 18px;
}

.historySkeletonRow {
    height: 46px;
    margin: 7px 0;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--surfaceMutedColor) 25%, #eef2f6 37%, var(--surfaceMutedColor) 63%);
    background-size: 400% 100%;
    animation: historySkeletonShimmer 1.4s ease infinite;
}

@keyframes historySkeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}


/* Empty / error state */

.historyEmptyState {
    padding: 54px 20px;
    text-align: center;
}

.historyEmptyIcon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border: 1px solid var(--borderColor);
    border-radius: 12px;
    background: var(--surfaceMutedColor);
    color: var(--primaryColor);
    font-size: 20px;
}

.historyEmptyTitle {
    color: var(--mainTextColor);
    font-size: 13px;
    font-weight: 750;
}

.historyEmptyMessage {
    max-width: 380px;
    margin: 6px auto 0;
    color: var(--mutedTextColor);
    font-size: 11px;
    line-height: 1.55;
}


/* Pagination */

.backupHistoryPagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--borderColor);
}

.historyPaginationInfo {
    color: var(--mutedTextColor);
    font-size: 10.5px;
}

.historyPaginationControls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.historyPageButton {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--borderColor);
    border-radius: 8px;
    background: var(--surfaceColor);
    color: var(--secondaryTextColor);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.historyPageButton:hover:not(:disabled) {
    background: var(--surfaceMutedColor);
    border-color: var(--borderHoverColor);
}

.historyPageButton.active {
    background: var(--primaryColor);
    border-color: var(--primaryColor);
    color: #fff;
}

.historyPageButton:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.historyPaginationEllipsis {
    padding: 0 4px;
    color: var(--lightTextColor);
    font-size: 10.5px;
}


/* Toast */

.historyToast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    max-width: 380px;
    padding: 12px 13px;
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.5;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
    animation: fadeIn 0.2s ease both;
}

.historyToastError {
    background: var(--dangerSoftColor);
    border: 1px solid var(--dangerBorderColor);
    color: var(--dangerColor);
}

.historyToastInfo {
    background: var(--infoSoftColor);
    border: 1px solid var(--infoBorderColor);
    color: var(--infoColor);
}

.historyToastClose {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
}

.historyToastClose:hover {
    opacity: 1;
}


/* Status pills */

.historyStatusPill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 700;
    border: 1px solid transparent;
}

.historyStatusSuccess {
    color: var(--successColor);
    background: var(--successSoftColor);
    border-color: var(--successBorderColor);
}

.historyStatusFailed {
    color: var(--dangerColor);
    background: var(--dangerSoftColor);
    border-color: var(--dangerBorderColor);
}

.historyStatusRunning {
    color: var(--warningColor);
    background: var(--warningSoftColor);
    border-color: var(--warningBorderColor);
}

.historyStatusPending,
.historyStatusUnknown {
    color: var(--mutedTextColor);
    background: var(--surfaceMutedColor);
    border-color: var(--borderColor);
}


/* Responsive */

@media (max-width: 1100px) {
    .historyInsightGrid {
        grid-template-columns: 1fr;
    }

    .historyTrendPane {
        border-right: 0;
        border-bottom: 1px solid var(--borderColor);
    }
}

@media (max-width: 760px) {
    .backupHistoryPage .pageHeaderActions {
        width: 100%;
    }

    .historyStatStrip {
        gap: 14px;
    }

    .historyStatItemRate {
        margin-left: 0;
        width: 100%;
    }

    .historyTableTopBar {
        flex-direction: column;
        align-items: stretch;
    }

    .historyCompactToolbar {
        width: 100%;
    }

    .historySearchBox {
        width: 100%;
    }

    .historyPillFilters {
        width: 100%;
        flex-wrap: wrap;
    }

    .historyPillDropdown {
        flex: 1;
        min-width: 0;
    }

    .historyPillButton {
        width: 100%;
        justify-content: space-between;
    }

    .backupHistoryPagination {
        flex-direction: column;
        align-items: stretch;
    }

    .historyPaginationControls {
        justify-content: center;
        flex-wrap: wrap;
    }
}