/*
 * Δικά μας στυλ, για τις όψεις που δεν είναι έτοιμα components του Filament.
 *
 * ΓΙΑΤΙ ΥΠΑΡΧΕΙ ΑΥΤΟ ΤΟ ΑΡΧΕΙΟ: το Filament 5 στέλνει ένα στυλ που περιέχει
 * μόνο τις δικές του κλάσεις `fi-*`. Δεν περιέχει τα utilities του Tailwind
 * (`flex`, `w-48`, `absolute`…). Γράφοντάς τα σε δική μας Blade όψη, απλώς
 * δεν υπάρχουν — και η όψη εμφανίζεται άστυλη.
 *
 * Επειδή η εφαρμογή δεν έχει βήμα build (ούτε Vite, ούτε npm), η λύση είναι
 * αυτό το μικρό αρχείο με δικά μας ονόματα. Φορτώνεται από render hook στον
 * AdminPanelProvider.
 *
 * Τα χρώματα ακολουθούν τις μεταβλητές του Filament, ώστε να συμβαδίζουν με
 * το θέμα και με το σκοτεινό θέμα χωρίς διπλή συντήρηση.
 */

/* ===================================================== επιλογέας γλώσσας */

.nylc-lang {
    position: relative;
    display: flex;
    align-items: center;
}

.nylc-lang__button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: rgb(113 113 122);
    background: none;
    border: 0;
    cursor: pointer;
    transition: background-color 150ms, color 150ms;
}

.nylc-lang__button:hover {
    background-color: rgb(244 244 245);
    color: rgb(63 63 70);
}

.dark .nylc-lang__button {
    color: rgb(161 161 170);
}

.dark .nylc-lang__button:hover {
    background-color: rgb(255 255 255 / 0.05);
    color: rgb(228 228 231);
}

.nylc-lang__chevron {
    width: 1rem;
    height: 1rem;
}

.nylc-lang__panel {
    position: absolute;
    inset-inline-end: 0;
    top: 100%;
    z-index: 50;
    margin-top: 0.25rem;
    /* Το πλάτος ήταν το ορατό σύμπτωμα: χωρίς αυτό τα στοιχεία στοιβάζονταν. */
    min-width: 13rem;
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    outline: 1px solid rgb(9 9 11 / 0.05);
}

.dark .nylc-lang__panel {
    background-color: rgb(24 24 27);
    outline-color: rgb(255 255 255 / 0.1);
}

.nylc-lang__heading {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgb(244 244 245);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(161 161 170);
    white-space: nowrap;
}

.dark .nylc-lang__heading {
    border-bottom-color: rgb(255 255 255 / 0.1);
    color: rgb(113 113 122);
}

.nylc-lang__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: rgb(63 63 70);
    text-decoration: none;
    /* Κρατά σημαία και όνομα στην ίδια γραμμή. */
    white-space: nowrap;
    transition: background-color 150ms;
}

.nylc-lang__item:hover {
    background-color: rgb(250 250 250);
}

.dark .nylc-lang__item {
    color: rgb(228 228 231);
}

.dark .nylc-lang__item:hover {
    background-color: rgb(255 255 255 / 0.05);
}

.nylc-lang__item--current {
    font-weight: 600;
    color: var(--primary-600, rgb(33 84 144));
    background-color: var(--primary-50, rgb(239 246 255));
}

.dark .nylc-lang__item--current {
    color: var(--primary-400, rgb(96 165 250));
    background-color: rgb(59 130 246 / 0.1);
}

.nylc-lang__name {
    flex: 1 1 auto;
}

.nylc-lang__check {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.nylc-flag {
    width: 1.25rem;
    height: 0.875rem;
    flex-shrink: 0;
    border-radius: 2px;
    object-fit: cover;
    outline: 1px solid rgb(0 0 0 / 0.1);
}

/* ================================================ μήτρα δικαιωμάτων */

.nylc-matrix__intro {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: rgb(82 82 91);
}

.dark .nylc-matrix__intro {
    color: rgb(161 161 170);
}

.nylc-matrix__wrap {
    overflow-x: auto;
    border: 1px solid rgb(228 228 231);
    border-radius: 0.75rem;
    background-color: white;
}

.dark .nylc-matrix__wrap {
    border-color: rgb(255 255 255 / 0.1);
    background-color: rgb(24 24 27);
}

.nylc-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

/* --- κεφαλίδα ---------------------------------------------------------- */

.nylc-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.75rem;
    background-color: rgb(250 250 250);
    border-bottom: 1px solid rgb(228 228 231);
    font-weight: 600;
    vertical-align: bottom;
}

.dark .nylc-matrix thead th {
    background-color: rgb(39 39 42);
    border-bottom-color: rgb(255 255 255 / 0.1);
}

.nylc-matrix__rolehead {
    text-align: center;
    min-width: 7.5rem;
}

.nylc-matrix__rolename {
    display: block;
    line-height: 1.2;
}

.nylc-matrix__badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.0625rem 0.375rem;
    border-radius: 9999px;
    background-color: rgb(244 244 245);
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgb(113 113 122);
}

.dark .nylc-matrix__badge {
    background-color: rgb(255 255 255 / 0.08);
    color: rgb(161 161 170);
}

.nylc-matrix__count {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 400;
    color: rgb(161 161 170);
}

/* --- πρώτη στήλη, παγωμένη --------------------------------------------- */

.nylc-matrix__label {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    padding: 0.5rem 0.875rem;
    background-color: inherit;
    text-align: start;
    min-width: 17rem;
}

.nylc-matrix thead .nylc-matrix__label {
    z-index: 3;
}

.nylc-matrix__name {
    display: block;
    color: rgb(39 39 42);
}

.dark .nylc-matrix__name {
    color: rgb(228 228 231);
}

.nylc-matrix__code {
    display: block;
    margin-top: 0.0625rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.6875rem;
    color: rgb(161 161 170);
}

/* --- ομάδες και γραμμές ------------------------------------------------- */

.nylc-matrix__group td {
    position: sticky;
    inset-inline-start: 0;
    padding: 0.5rem 0.875rem;
    background-color: var(--primary-50, rgb(239 246 255));
    border-top: 1px solid rgb(228 228 231);
    border-bottom: 1px solid rgb(228 228 231);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--primary-700, rgb(29 78 136));
}

.dark .nylc-matrix__group td {
    background-color: rgb(59 130 246 / 0.12);
    border-color: rgb(255 255 255 / 0.1);
    color: var(--primary-300, rgb(147 197 253));
}

.nylc-matrix tbody tr.nylc-matrix__row {
    background-color: white;
}

.dark .nylc-matrix tbody tr.nylc-matrix__row {
    background-color: rgb(24 24 27);
}

.nylc-matrix tbody tr.nylc-matrix__row:nth-of-type(even) {
    background-color: rgb(250 250 250);
}

.dark .nylc-matrix tbody tr.nylc-matrix__row:nth-of-type(even) {
    background-color: rgb(39 39 42);
}

.nylc-matrix tbody tr.nylc-matrix__row:hover {
    background-color: var(--primary-50, rgb(239 246 255));
}

.dark .nylc-matrix tbody tr.nylc-matrix__row:hover {
    background-color: rgb(59 130 246 / 0.08);
}

.nylc-matrix__cell {
    padding: 0.375rem;
    text-align: center;
}

.nylc-matrix__cell input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.25rem;
    border: 1px solid rgb(212 212 216);
    accent-color: var(--primary-600, rgb(33 84 144));
    cursor: pointer;
}

.dark .nylc-matrix__cell input[type="checkbox"] {
    border-color: rgb(82 82 91);
}

/* --- κουμπιά επιλογής στήλης ------------------------------------------- */

.nylc-matrix__toggle {
    display: inline-block;
    margin-top: 0.375rem;
    padding: 0.125rem 0.5rem;
    border: 1px solid rgb(228 228 231);
    border-radius: 9999px;
    background: none;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgb(113 113 122);
    cursor: pointer;
    transition: background-color 150ms;
}

.nylc-matrix__toggle:hover {
    background-color: rgb(244 244 245);
}

.dark .nylc-matrix__toggle {
    border-color: rgb(255 255 255 / 0.15);
    color: rgb(161 161 170);
}

.dark .nylc-matrix__toggle:hover {
    background-color: rgb(255 255 255 / 0.08);
}

/* --- πόδι σελίδας ------------------------------------------------------- */

.nylc-matrix__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.nylc-matrix__hint {
    font-size: 0.75rem;
    color: rgb(161 161 170);
}

/* ============================================ μπάρα «εργάζεσαι ως κέντρο» */

.nylc-banner {
    width: 100%;
    background-color: rgb(251 191 36);
    color: rgb(69 26 3);
}

.dark .nylc-banner {
    background-color: rgb(245 158 11);
}

.nylc-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.nylc-banner__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.nylc-banner__button {
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: 0.375rem;
    background-color: rgb(69 26 3 / 0.1);
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: background-color 150ms;
}

.nylc-banner__button:hover {
    background-color: rgb(69 26 3 / 0.2);
}

/* ====================================== σελίδα σύνδεσης: γλώσσα και φράση */

.nylc-login-langs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.nylc-login-langs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    color: rgb(113 113 122);
    text-decoration: none;
    transition: color 150ms;
}

.nylc-login-langs__item:hover {
    color: rgb(63 63 70);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dark .nylc-login-langs__item {
    color: rgb(161 161 170);
}

.dark .nylc-login-langs__item:hover {
    color: rgb(228 228 231);
}

.nylc-login-langs__item--current {
    font-weight: 600;
    color: var(--primary-600, rgb(33 84 144));
}

.dark .nylc-login-langs__item--current {
    color: var(--primary-400, rgb(96 165 250));
}

.nylc-tagline {
    margin-top: -0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgb(113 113 122);
}

.dark .nylc-tagline {
    color: rgb(161 161 170);
}

/* ================================================= σελίδα βαθμολόγησης */

.nylc-marks__bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.nylc-marks__bar--bottom {
    margin-top: 1rem;
    margin-bottom: 0;
}

.nylc-marks__wrap {
    overflow-x: auto;
    border: 1px solid rgb(228 228 231);
    border-radius: 0.75rem;
    background-color: white;
}

.dark .nylc-marks__wrap {
    border-color: rgb(255 255 255 / 0.1);
    background-color: rgb(24 24 27);
}

.nylc-marks {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.nylc-marks thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.625rem 0.75rem;
    background-color: rgb(250 250 250);
    border-bottom: 1px solid rgb(228 228 231);
    font-weight: 600;
    text-align: start;
    white-space: nowrap;
}

.dark .nylc-marks thead th {
    background-color: rgb(39 39 42);
    border-bottom-color: rgb(255 255 255 / 0.1);
}

.nylc-marks__num {
    text-align: end;
}

.nylc-marks tbody tr:nth-of-type(even) {
    background-color: rgb(250 250 250);
}

.dark .nylc-marks tbody tr:nth-of-type(even) {
    background-color: rgb(39 39 42);
}

.nylc-marks tbody tr:hover {
    background-color: var(--primary-50, rgb(239 246 255));
}

.dark .nylc-marks tbody tr:hover {
    background-color: rgb(59 130 246 / 0.08);
}

.nylc-marks td {
    padding: 0.375rem 0.75rem;
    border-top: 1px solid rgb(244 244 245);
}

.dark .nylc-marks td {
    border-top-color: rgb(255 255 255 / 0.06);
}

.nylc-marks__code {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nylc-marks__input {
    width: 5rem;
    padding: 0.3125rem 0.5rem;
    border: 1px solid rgb(212 212 216);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: end;
    font-variant-numeric: tabular-nums;
    background-color: white;
    color: inherit;
}

.nylc-marks__input:focus {
    outline: 2px solid var(--primary-500, rgb(59 130 246));
    outline-offset: -1px;
    border-color: transparent;
}

.dark .nylc-marks__input {
    border-color: rgb(255 255 255 / 0.1);
    background-color: rgb(255 255 255 / 0.05);
}

.nylc-marks__error {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgb(220 38 38);
}

/* --- εργαλεία ανά ρόλο στην κεφαλίδα ------------------------------------ */

.nylc-matrix__tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.nylc-matrix__tools .nylc-matrix__toggle {
    margin-top: 0;
}

.nylc-matrix__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid rgb(228 228 231);
    border-radius: 9999px;
    background: none;
    color: rgb(113 113 122);
    cursor: pointer;
    transition: background-color 150ms, color 150ms;
}

.nylc-matrix__icon:hover {
    background-color: rgb(244 244 245);
    color: rgb(63 63 70);
}

.nylc-matrix__icon--danger:hover {
    background-color: rgb(254 226 226);
    border-color: rgb(252 165 165);
    color: rgb(185 28 28);
}

.dark .nylc-matrix__icon {
    border-color: rgb(255 255 255 / 0.15);
    color: rgb(161 161 170);
}

.dark .nylc-matrix__icon:hover {
    background-color: rgb(255 255 255 / 0.08);
    color: rgb(228 228 231);
}

.dark .nylc-matrix__icon--danger:hover {
    background-color: rgb(127 29 29 / 0.3);
    border-color: rgb(153 27 27);
    color: rgb(252 165 165);
}

.nylc-matrix__iconsvg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ============================================================
   Banner βλάβης: ο κατάλογος δικαιωμάτων δεν έχει συγχρονιστεί
   ============================================================ */

.nylc-banner--danger {
    background-color: var(--danger-600);
}

.nylc-banner--danger code {
    padding: 0.0625rem 0.3125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    background-color: rgb(255 255 255 / 0.18);
    border-radius: 0.25rem;
}

/* ============================================================
   Πάνελ μαζικής ανάθεσης τηλεδιασκέψεων
   ============================================================
   Κάθεται πάνω από τον πίνακα. Η επιλογή γίνεται εδώ μία φορά
   και εφαρμόζεται από τη γραμμή επιλογής του πίνακα.
*/

.nylc-confbar {
    padding: 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
}

.nylc-confbar__hint {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    color: var(--gray-500);
}

.nylc-confbar__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nylc-confbar__field {
    flex: 1 1 16rem;
    min-width: 0;
}

/* Η ημερομηνία δεν χρειάζεται το πλάτος μιας λίστας ονομάτων. */
.nylc-confbar__field--narrow {
    flex: 0 1 11rem;
}

.nylc-confbar__label {
    display: block;
    margin-bottom: 0.3125rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--gray-950);
}

.dark .nylc-confbar {
    background-color: var(--gray-900);
    border-color: var(--gray-700);
}

.dark .nylc-confbar__hint {
    color: var(--gray-400);
}

.dark .nylc-confbar__label {
    color: var(--gray-200);
}
