/* Framework.Web's window frame and generic pages. DevExpress's Fluent theme styles the components themselves. */

:root {
    --fw-border: #e3e5e8;
    --fw-muted: #616161;
    --fw-accent: #0f6cbd;
    --fw-nav-width: 260px;
    --fw-topbar-height: 48px;
}

html, body {
    margin: 0;
    height: 100%;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #242424;
    background: #fafafa;
}

.fw-splash, .fw-message {
    padding: 2rem;
    color: var(--fw-muted);
    font-size: 1.05rem;
}

.fw-muted { color: var(--fw-muted); }
.fw-spacer { flex: 1; }

/* ---------- sign-in */

.fw-signin {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: #f5f6f8;
}

.fw-signin-card {
    background: #fff;
    border: 1px solid var(--fw-border);
    border-radius: 10px;
    padding: 2rem 2.2rem;
    width: min(400px, calc(100vw - 64px));
}

.fw-signin-card h1 { margin: 0 0 .3rem; font-size: 1.5rem; }

.fw-signin-form {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: 1rem;
}

.fw-signin-form label { margin-top: .5rem; font-weight: 600; font-size: .9rem; }

.fw-signin-form input {
    font: inherit;
    padding: .55rem .7rem;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
}

.fw-signin-form input:focus { outline: 2px solid var(--fw-accent); outline-offset: -1px; border-color: var(--fw-accent); }

.fw-signin-button { margin-top: 1.2rem; }

/* ---------- messages */

.fw-error, .fw-warning, .fw-success {
    padding: .6rem .8rem;
    border-radius: 6px;
    margin: .4rem 0;
}

.fw-error { background: #fdf3f4; border: 1px solid #eeacb2; color: #a4262c; }
.fw-warning { background: #fff8e6; border: 1px solid #f2c661; color: #6d4e00; }
.fw-success { background: #f1faf1; border: 1px solid #9fd89f; color: #0e700e; }

.fw-problems { margin: 0 1rem .6rem; }

/* ---------- the window frame */

.fw-shell {
    display: grid;
    grid-template-columns: var(--fw-nav-width) 1fr;
    grid-template-rows: var(--fw-topbar-height) 1fr;
    grid-template-areas: "top top" "nav main";
    height: 100vh;
}

.fw-topbar {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    background: #fff;
    border-bottom: 1px solid var(--fw-border);
}

.fw-brand { font-weight: 700; font-size: 1.1rem; color: var(--fw-accent); text-decoration: none; }
.fw-customer { font-weight: 600; }
.fw-user { color: var(--fw-muted); }
.fw-signout { margin: 0; }

.fw-nav {
    grid-area: nav;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid var(--fw-border);
    padding: .5rem 0 2rem;
}

.fw-nav summary {
    cursor: pointer;
    padding: .45rem 1rem;
    font-weight: 600;
    list-style-position: inside;
}

.fw-nav-page > summary { font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; color: var(--fw-muted); }
.fw-nav-group > summary { padding-left: 1.4rem; }
.fw-nav-subgroup > summary { padding-left: 2rem; font-weight: 500; }

.fw-nav-home, .fw-nav-link {
    display: block;
    padding: .38rem 1rem .38rem 2.2rem;
    color: inherit;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.fw-nav-home { padding-left: 1rem; font-weight: 600; }
.fw-nav-subgroup .fw-nav-link { padding-left: 2.8rem; }

.fw-nav-home:hover, .fw-nav-link:hover { background: #f3f6fb; }
.fw-nav-home.active, .fw-nav-link.active { border-left-color: var(--fw-accent); background: #ebf3fc; color: var(--fw-accent); }

.fw-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.fw-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    background: #f0f0f0;
    border-bottom: 1px solid var(--fw-border);
    padding: 4px 6px 0;
}

.fw-tab {
    display: flex;
    align-items: center;
    max-width: 240px;
    background: #e6e6e6;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.fw-tab a {
    padding: .35rem .2rem .35rem .7rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fw-tab-active { background: #fff; border-color: var(--fw-border); font-weight: 600; }

.fw-tab-close {
    border: none;
    background: transparent;
    font-size: 1.05rem;
    line-height: 1;
    padding: .2rem .5rem;
    cursor: pointer;
    color: var(--fw-muted);
}

.fw-tab-close:hover { color: #a4262c; }

.fw-page {
    flex: 1;
    overflow: auto;
    padding-bottom: 1rem;
    background: #fff;
}

/* ---------- pages */

.fw-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1rem;
    flex-wrap: wrap;
}

.fw-toolbar h1 { margin: 0; font-size: 1.35rem; }

/* The page's title takes the focus on opening, for screen readers (FocusOnNavigate); it isn't something to click. */
.fw-toolbar h1:focus { outline: none; }

.fw-period { width: 190px; }
.fw-filter { width: 230px; }

.fw-grid { margin: 0 1rem; }

.fw-status { padding: .4rem 1rem; color: var(--fw-muted); font-size: .9rem; }

.fw-form { padding: 0 1rem; max-width: 1100px; }

.fw-collection-title { font-size: 1.1rem; margin: 1.4rem 1rem .5rem; }

/* The tabs under a record's fields: its other groups of fields, its lists and the application's own. */
.fw-record-tabs { margin: 1rem 1rem 0; }
.fw-record-tabs .fw-form { padding: .8rem 0 0; }
.fw-record-tabs .fw-grid { margin: .6rem 0 0; }

.fw-hint { color: var(--fw-muted); margin: .7rem 0 0; }

/* An operation running in the background, and its log. */
.fw-operation { margin: .8rem 0; padding: .6rem .8rem; border: 1px solid var(--fw-border); border-radius: 6px; background: #fafbfc; }
.fw-operation-progress { display: flex; align-items: center; gap: .8rem; }
.fw-operation-progress progress { width: 240px; }
.fw-operation-log { margin: .4rem 0 0; padding-left: 1.2rem; max-height: 220px; overflow-y: auto; }
.fw-log-error { color: #a4262c; }
.fw-log-warning { color: #6d4e00; }
.fw-log-success { color: #0e700e; }
.fw-list-toolbar { display: flex; gap: .4rem; margin: .6rem 0 0; }

.fw-readonly-value { display: inline-block; padding: .35rem 0; }

.fw-home { padding: 2rem; }

/* In a page's toolbar (a button that runs an operation, or says why it can't), a row of its own under all the buttons. */
.fw-toolbar .fw-operation, .fw-toolbar .fw-toolbar-line { flex-basis: 100%; margin: .3rem 0 0; order: 99; }

/* Formatted text that can't be changed, shown apart from the page. */
.fw-html-view { width: 100%; min-height: 260px; border: 1px solid var(--fw-border); border-radius: 4px; background: #fff; }

/* Lines about a record above its fields. */
.fw-remark { margin: .2rem 1rem .4rem; }
.fw-remark.fw-hint { margin-top: 0; }

/* A file to add: the browser's file input under a button's look. */
.fw-upload { position: relative; display: inline-flex; align-items: center; padding: .3rem .8rem; border: 1px solid var(--fw-accent);
             border-radius: 4px; color: var(--fw-accent); cursor: pointer; font-size: .9rem; }
.fw-upload:hover { background: #ebf3fc; }
.fw-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fw-choices { max-height: 320px; margin-top: .4rem; }

/* A printout shown as PDF in the browser's own viewer. */
.fw-pdf { width: 100%; height: 72vh; border: 1px solid #e1dfdd; display: block; }

/* A pivot table, and the fields it can show with where each goes. */
.fw-pivot-page { padding: 0 1rem; }
.fw-pivot-page .fw-pivot { margin-top: .7rem; }
.fw-pivot-fields { max-height: 60vh; overflow-y: auto; margin-top: .6rem; }
.fw-pivot-fields table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fw-pivot-fields th { text-align: left; font-weight: 600; padding: .3rem .4rem; border-bottom: 1px solid #e1dfdd;
                      position: sticky; top: 0; background: #fff; z-index: 1; }
.fw-pivot-fields td { padding: .2rem .4rem; border-bottom: 1px solid #f3f2f1; }
.fw-pivot-fields th:nth-child(1) { width: 32%; }
.fw-pivot-fields th:nth-child(2) { width: 24%; }

/* «Ρυθμίσεις χρήστη»: one section after another. */
.fw-settings { padding: 0 1rem 1rem; max-width: 820px; }
.fw-settings section { margin-top: 1rem; }
.fw-settings h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .3rem; }
.fw-settings-start { max-width: 480px; margin-top: .4rem; }
a.fw-user { color: inherit; text-decoration: none; }
a.fw-user:hover { text-decoration: underline; }

/* «Εισαγωγή δεδομένων»: the file chosen beside its button, the start, and what the import said about each row. */
.fw-import-file { display: flex; align-items: center; gap: .6rem; }
.fw-import-start { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; }
.fw-import-log { margin: .8rem 0 0; padding: .5rem .5rem .5rem 1.6rem; max-height: 40vh; overflow-y: auto; border: 1px solid #e1dfdd; border-radius: 4px; }
.fw-import-log li { margin: .15rem 0; }
.fw-import-error { color: #a4262c; }
.fw-import-warning { color: #8a5a00; }
.fw-import-success { color: #107c10; font-weight: 600; }

/* A custom table's fields, a row each. */
.fw-custom-fields { overflow-x: auto; margin-top: .6rem; }
.fw-custom-fields table { width: 100%; border-collapse: collapse; min-width: 980px; table-layout: fixed; }
.fw-custom-fields th:nth-child(1), .fw-custom-fields th:nth-child(2), .fw-custom-fields th:nth-child(4) { width: 17%; }
.fw-custom-fields th:nth-child(3) { width: 15%; }
.fw-custom-fields th:nth-child(5), .fw-custom-fields th:nth-child(7) { width: 8%; }
.fw-custom-fields th:nth-child(6) { width: 11%; }
.fw-custom-fields th:nth-child(8) { width: 7%; }
.fw-custom-fields th { text-align: left; font-weight: 600; padding: .3rem .4rem; border-bottom: 1px solid #e1dfdd; }
.fw-custom-fields td { padding: .2rem .4rem; border-bottom: 1px solid #f3f2f1; vertical-align: middle; }

/* The automation editor: the flow on the left (the automation, its folders of items, its actions), what is chosen on the right. */
.fw-ae { display: flex; gap: 1rem; padding: 0 1rem 1rem; align-items: flex-start; }
.fw-ae-tree { flex: 0 0 38%; min-width: 300px; max-width: 520px; border: 1px solid var(--fw-border); border-radius: 4px; background: #fff; position: sticky; top: .5rem; }
.fw-ae-tree-tools { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; border-bottom: 1px solid var(--fw-border); }
.fw-ae-nodes { max-height: calc(100vh - 230px); overflow: auto; padding: .3rem 0; }
.fw-ae-node { display: flex; align-items: baseline; gap: .35rem; padding: .2rem .5rem; cursor: pointer; white-space: nowrap; }
.fw-ae-node:hover { background: #f3f2f1; }
.fw-ae-node:focus-visible { outline: 2px solid var(--fw-accent); outline-offset: -2px; }
.fw-ae-selected, .fw-ae-selected:hover { background: #e5f1fb; }
.fw-ae-disabled .fw-ae-name, .fw-ae-disabled .fw-ae-desc { color: #a19f9d; text-decoration: line-through; }
.fw-ae-toggle { flex: 0 0 1.1rem; width: 1.1rem; border: 0; background: none; padding: 0; cursor: pointer; color: var(--fw-muted); font-size: .85rem; }
.fw-ae-kind { flex: 0 0 auto; width: .6rem; height: .6rem; border-radius: 2px; align-self: center; }
.fw-ae-kind-automation { background: #0f6cbd; }
.fw-ae-kind-action { background: #107c10; }
.fw-ae-kind-variable { background: #8764b8; border-radius: 50%; }
.fw-ae-kind-validity { background: #ca5010; transform: rotate(45deg) scale(.85); }
.fw-ae-kind-assignment { background: #038387; border-radius: 50% 0 50% 0; }
.fw-ae-kind-folder { border: 1px solid #a19f9d; }
.fw-ae-name { font-weight: 600; }
.fw-ae-kind-folder + .fw-ae-name { font-weight: 400; color: var(--fw-muted); }
.fw-ae-desc { color: var(--fw-muted); font-size: .88em; overflow: hidden; text-overflow: ellipsis; }
.fw-ae-panel { flex: 1; min-width: 0; max-width: 760px; }
.fw-ae-group { background: #fff; border: 1px solid var(--fw-border); border-radius: 4px; padding: .6rem .8rem .8rem; margin-bottom: .8rem; }
.fw-ae-group h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .2rem; }
.fw-ae-field { margin-top: .55rem; }
.fw-ae-caption { display: flex; align-items: center; gap: .3rem; margin-bottom: .2rem; font-size: .92rem; }
.fw-ae-check .fw-ae-caption { margin-bottom: 0; }
.fw-ae-required { color: #c50f1f; }
.fw-ae-help-button { border: 0; background: none; color: var(--fw-accent); cursor: pointer; padding: 0 .15rem; font-size: .95rem; line-height: 1; }
.fw-ae-help { color: var(--fw-muted); font-size: .88rem; margin-top: .25rem; white-space: pre-line; }
.fw-ae-problem { margin-top: .3rem; padding: .3rem .5rem; font-size: .9rem; }
.fw-ae-code textarea { font-family: Consolas, "Cascadia Mono", monospace; font-size: .9rem; }
.fw-ae-insert { display: flex; gap: .4rem; margin-top: .3rem; }
.fw-ae-insert > * { flex: 1; max-width: 280px; }
.fw-ae-line { display: flex; align-items: center; gap: .6rem; }
.fw-ae-line > :first-child { flex: 1; }
.fw-ae-type { color: var(--fw-muted); white-space: nowrap; }
.fw-ae-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.fw-ae-note { margin-top: 0; }
.fw-ae-order { margin-top: .4rem; color: var(--fw-muted); font-size: .9rem; }
.fw-ae-order ol { margin: .2rem 0 0; padding-left: .2rem; list-style: none; }
.fw-ae-this { font-weight: 600; color: #242424; }
.fw-ae-table { width: 100%; border-collapse: collapse; margin-bottom: .4rem; }
.fw-ae-table th { text-align: left; font-weight: 600; padding: .25rem .3rem; border-bottom: 1px solid #e1dfdd; font-size: .9rem; }
.fw-ae-table td { padding: .2rem .3rem; border-bottom: 1px solid #f3f2f1; }
.fw-ae-table td:last-child { width: 1%; white-space: nowrap; }
.fw-ae-problems { margin: .3rem 0 0; padding-left: 1.2rem; }
.fw-ae-saved { margin: 0 .5rem 0 0; }
@media (max-width: 900px) {
    .fw-ae { flex-direction: column; }
    .fw-ae-tree { position: static; max-width: none; width: 100%; }
    .fw-ae-panel { max-width: none; width: 100%; }
}

/* The run of an automation from a list or a record's page: its questions, what it gives, its log by record and action. */
.fw-ae-run-ask h3 { font-size: 1.05rem; margin: 0 0 .6rem; }
.fw-ae-run-ask h4 { font-size: .95rem; margin: .8rem 0 .3rem; color: var(--fw-muted, #555); }
.fw-ae-run-question { display: flex; flex-direction: column; gap: .25rem; margin: 0 0 .7rem; }
.fw-ae-run-question > label { font-weight: 600; }
.fw-ae-run-range { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fw-ae-run-range > .dxbl-spin-edit, .fw-ae-run-range > .dxbl-date-edit { width: 12rem; }
.fw-ae-run-upload { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fw-ae-run-give { display: flex; flex-direction: column; gap: .3rem; margin: .6rem 0; padding: .5rem .7rem; border: 1px solid var(--fw-border); border-radius: 6px; }
.fw-ae-run-give > a { word-break: break-all; }
.fw-ae-run-file { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fw-ae-run-log { max-height: 50vh; }
.fw-ae-run-group { list-style: none; margin: .5rem 0 .1rem -1.2rem; font-weight: 600; }

/* «Σχεδίαση»: the report designer fills the page under its title. */
.fw-report-designer { height: calc(100vh - 7.5rem); min-height: 480px; padding: 0 1rem 1rem; }
