﻿/* ==== Fluent / Business Central tokens ==== */
:root {
    --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --c-text: #201F1E; /* neutralPrimary */
    --c-muted: #605E5C; /* neutralSecondary */
    --c-border: #EDEBE9; /* neutralLight */
    --c-border-strong: #D2D0CE; /* neutralQuaternaryAlt */
    --c-panel: #FAF9F8; /* neutralLighterAlt */
    --c-surface: #FFFFFF; /* base */
    --c-primary: #0078D4; /* themePrimary */
    --c-primary-hover: #106EBE; /* themeDarkAlt */
    --c-primary-soft: #EFF6FC; /* soft background */
    --c-focus: #0F6CBD; /* focus ring */
    --radius-sm: 4px;
    --radius-md: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,.06);
}

html, body {
    font-family: var(--font-sans);
    color: var(--c-text);
}

/* ===== Header / breadcrumb ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 12px;
}

.page-title {
    margin: 0;
    font-weight: 600;
    color: var(--c-text);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: .92rem;
    color: var(--c-muted);
}

    .breadcrumb a {
        color: var(--c-muted);
        text-decoration: none;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

/* ===== Cards (panel Fluent) ===== */
.card {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    background: var(--c-surface);
}

.card-body {
    padding: 16px;
}

.card + .card {
    margin-top: 14px;
}

/* ===== Botones estilo Fluent ===== */
.btn-back {
    border: 1px solid var(--c-border-strong);
    color: #323130;
    background: var(--c-surface);
    border-radius: var(--radius-sm);
    padding: .45rem .8rem;
    font-weight: 600;
}

    .btn-back:hover {
        background: #F3F2F1;
    }

.btn-primary-soft {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    border: 1px solid #D0E6FA;
    border-radius: var(--radius-sm);
    padding: .45rem .8rem;
    font-weight: 600;
}

    .btn-primary-soft:hover {
        background: #E6F0FB;
    }

.btn, .dx-button {
    border-radius: var(--radius-sm) !important;
    text-transform: none;
}

/* ===== Focus visible (accesibilidad estilo Fluent) ===== */
:focus-visible {
    outline: 2px solid var(--c-focus) !important;
    outline-offset: 2px;
}

/* ===== DevExtreme DataGrid ~ Fluent DetailsList ===== */
.dx-datagrid {
    border: 1px solid var(--c-border) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
}

    .dx-datagrid .dx-datagrid-headers {
        background: #F3F2F1; /* neutralLighter */
        border-bottom: 1px solid var(--c-border);
    }

.dx-datagrid-headers tr td {
    font-weight: 600;
    color: #323130;
    padding: 8px 10px;
    border-color: var(--c-border) !important;
}

.dx-datagrid-rowsview .dx-row > td {
    padding: 8px 10px;
    border-color: var(--c-border) !important;
}

.dx-datagrid .dx-row:hover td {
    background: #F8FBFF;
}
/* hover sutil */
.dx-datagrid .dx-row-alt > td {
    background: #FCFCFC;
}
/* alternado sutil */
.dx-datagrid .dx-selection > td {
    background: #E6F2FB !important;
}
/* selecci�n Fluent */
.dx-datagrid .dx-link {
    font-weight: 600;
}

/* Filtro y search compactos */
.dx-datagrid .dx-datagrid-filter-row .dx-texteditor-input {
    height: 32px;
}

.dx-texteditor.dx-editor-underlined {
    border-bottom: 1px solid var(--c-border-strong);
}

.dx-searchbox .dx-texteditor-input, .dx-texteditor-input {
    padding: 6px 8px;
}

/* Pager compacto */
.dx-pager .dx-page, .dx-pager .dx-navigation-button {
    border-radius: var(--radius-sm);
}

.dx-pager .dx-page {
    border: 1px solid transparent;
}

    .dx-pager .dx-page.dx-selection {
        border-color: #CFE4F8;
        background: #F0F7FE;
        color: #0F548C;
    }

/* Column buttons m�s �CommandBar� */
.dx-datagrid .dx-command-edit .dx-link {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

    .dx-datagrid .dx-command-edit .dx-link:hover {
        background: #F3F2F1;
    }

/* ===== Modales (panel tipo BC) ===== */
.modal {
    overflow-y: auto;
}

    .modal .modal-dialog {
        margin: 1.25rem auto;
    }

    .modal .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
    }

    .modal .modal-title {
        font-weight: 600;
    }

    .modal .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: var(--c-surface);
        border-top: 1px solid var(--c-border);
    }

    .modal .modal-content {
        border: 1px solid var(--c-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow);
    }

    .modal .modal-body {
        max-height: calc(100vh - 180px);
        overflow: auto;
        overscroll-behavior: contain;
    }

.modal-dialog.modal-full-width {
    max-width: 96vw;
}

/* Secciones dentro de modales */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #323130;
}

.bg-panel {
    background: var(--c-panel);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

/* ===== Utilidades ===== */
.text-muted-2 {
    color: var(--c-muted);
}

.small-muted {
    font-size: .9rem;
    color: var(--c-muted);
}

/* ===== (Opcional) Tema oscuro tipo Fluent Dark ===== */
/*
[data-theme="dark"]{
  --c-text:#F3F2F1; --c-muted:#C8C6C4; --c-border:#3B3A39; --c-border-strong:#605E5C;
  --c-panel:#2B2A29; --c-surface:#1F1E1D; --shadow:0 2px 10px rgba(0,0,0,.35);
  --c-primary:#3AA0F3; --c-primary-hover:#2891E6; --c-primary-soft:#0B2A44; --c-focus:#62B0FF;
  background:#111; color:var(--c-text);
}
[data-theme="dark"] .dx-datagrid .dx-datagrid-headers{ background:#292827; }
[data-theme="dark"] .dx-datagrid{ border-color:var(--c-border-strong)!important; }
[data-theme="dark"] .modal .modal-content{ background:var(--c-surface); }
*/
