/* Κέλυφος διαχείρισης πλατφόρμας και διάταξη φορμών/φίλτρων. */
:root {
    font-family:
        system-ui,
        -apple-system,
        'Segoe UI',
        sans-serif;
    color: #29313a;
    background: #f8f5ef;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: white;
    border-bottom: 1px solid #dedbd5;
    padding: 18px 28px;
}
/* Το λογότυπο διατηρεί το πλάτος του ως σύνδεσμος μέσα στο flex header. */
header .brand-link {
    display: inline-flex;
    flex-shrink: 0;
}
header img {
    width: 140px;
    flex-shrink: 0;
    height: auto;
}
header span {
    color: #666;
    font-size: 14px;
}
main {
    max-width: 620px;
    margin: 48px auto;
    padding: 0 22px;
}
h1 {
    font-size: 28px;
}
section {
    padding: 28px;
    border: 1px solid #dedbd5;
    border-radius: 12px;
    background: white;
}
form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}
.field {
    display: grid;
    gap: 8px;
}
label {
    display: block;
    margin-bottom: 8px;
}
input:not([type='hidden']):not([type='checkbox']):not([type='radio']) {
    width: 100%;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 6px;
    font: inherit;
}
button {
    padding: 12px 20px;
    border: 0;
    border-radius: 6px;
    color: white;
    background: #b7232a;
    font: inherit;
    cursor: pointer;
}
button:hover {
    background: #961a20;
}
input:focus-visible,
button:focus-visible {
    outline: 3px solid #ce8845;
    outline-offset: 3px;
}
[role='alert'] {
    color: #a41f26;
}
@media (max-width: 480px) {
    header {
        gap: 12px;
        padding: 14px;
    }
    header img {
        width: 110px;
    }
    main {
        margin: 28px auto;
    }
    section {
        padding: 20px;
    }
}
.directory-main {
    max-width: 1800px;
    margin: 28px auto;
}
header {
    flex-wrap: wrap;
}
header nav {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 20px;
    align-items: center;
}
header nav a {
    color: #555;
    text-decoration: none;
    white-space: nowrap;
}
header nav a[aria-current='page'] {
    color: #a81d25;
    font-weight: 600;
}
.admin-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}
.admin-account form {
    display: block;
    margin: 0;
}
.admin-account button {
    padding: 8px 14px;
}
.directory-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 18px;
    padding: 22px;
    background: white;
    border: 1px solid #dedbd5;
    border-radius: 10px;
    margin: 22px 0;
}
.directory-filters .field {
    min-width: 260px;
    flex: 1;
    max-width: 420px;
}
.directory-filters select {
    min-width: 180px;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 6px;
    font: inherit;
}
.directory-filters a {
    padding: 12px 0;
}
.directory-results {
    padding: 20px;
}
.directory-results .datagrid-wrapper {
    overflow-x: auto;
}
.directory-results table {
    width: 100%;
    border-collapse: collapse;
}
.directory-results th,
.directory-results td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}
.directory-results th {
    background: #f8f5ef;
}
.directory-results a,
.directory-main a {
    color: #a81d25;
}
.directory-results .pagination {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
@media (max-width: 700px) {
    header nav {
        order: 3;
        width: 100%;
        gap: 16px;
    }
    .admin-account {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    .directory-main {
        padding: 0 14px;
    }
    .directory-filters {
        padding: 16px;
    }
    .directory-filters .field {
        min-width: 0;
        max-width: none;
        width: 100%;
        flex-basis: 100%;
    }
    .directory-results {
        padding: 14px;
    }
}
/* Align filter controls despite the shared Field component's default bottom spacing. */
.directory-filters .field {
    margin-bottom: 0;
    row-gap: 8px;
}
.directory-filters .field-label label {
    margin-bottom: 0;
}
.directory-filters input:not([type='hidden']),
.directory-filters select,
.directory-filters button,
.directory-filters > a {
    box-sizing: border-box;
    height: 46px;
}
.directory-filters .field-control > input,
.directory-filters select {
    padding: 10px 12px;
}
.directory-filters > a {
    display: inline-flex;
    align-items: center;
    padding: 0;
}
.tenant-editor {
    max-width: 820px;
}
.tenant-new-link {
    display: inline-block;
    padding: 12px 20px;
    background: #b7232a;
    border-radius: 6px;
    color: white !important;
    text-decoration: none;
}

.itemcontrol-table-scroll {
    overflow-x: auto;
}

.itemcontrol-table {
    width: 100%;
    border-collapse: collapse;
}

.itemcontrol-table th,
.itemcontrol-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.itemcontrol-table [role='radiogroup'] {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ITEMCONTROL renders each table row as a complete labelled field, without a separate heading cell. */
.itemcontrol-table .field {
    margin: 0;
}

.password-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.password-tools input {
    flex: 1 1 15rem;
    min-width: 0;
}

.password-tools button {
    flex: 0 0 auto;
}

.platform-language {
    width: auto;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.875rem;
}

/* Directory containers fill the viewport while datagrids keep their content-sized width. */
.directory-main:has(.listcontrol-results) {
    max-width: none;
    width: 100%;
}
