:root {
    --bg:   #fae5cf;
    --ink:  #333;
    --line: rgba(51, 51, 51, .18);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 32px;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 15px;
}

/* ---------------------------------------------------------- Login */

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login {
    width: 100%;
    max-width: 340px;
    padding: 36px 30px;
    background: rgba(255, 255, 255, .55);
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}

.login h1 { margin: 0 0 22px; font-size: 20px; font-weight: 600; text-align: center; }

.login label { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 500; }

.login input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(51, 51, 51, .3);
    border-radius: 2px;
    font: inherit;
    background: #fff;
}

.login button {
    width: 100%;
    height: 44px;
    border: 2px solid #000;
    border-radius: 9999px;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.login button:hover { background: #000; color: var(--bg); }

.alert {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 2px;
    background: rgba(183, 28, 28, .1);
    color: #b71c1c;
    font-size: 13px;
}

/* ---------------------------------------------------------- Topbar */

.topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.topbar h1 { margin: 0; font-size: 22px; font-weight: 600; }

.topbar__actions { display: flex; gap: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 18px;
    border: 2px solid #000;
    border-radius: 9999px;
    background: transparent;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover { background: #000; color: var(--bg); }

.btn--ghost { border-color: rgba(51, 51, 51, .35); }

/* ---------------------------------------------------------- Stats */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.stat {
    padding: 18px 20px;
    background: rgba(255, 255, 255, .5);
    border-radius: 4px;
}

.stat__num   { display: block; font-size: 30px; font-weight: 600; line-height: 1.1; }
.stat__label { display: block; margin-top: 4px; font-size: 13px; opacity: .7; }

/* ---------------------------------------------------------- Πίνακας */

.table-wrap {
    overflow-x: auto;
    background: rgba(255, 255, 255, .5);
    border-radius: 4px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th { font-weight: 600; font-size: 13px; white-space: nowrap; }

tr:last-child td { border-bottom: 0; }

.notes { max-width: 320px; }

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.pill--yes { background: rgba(46, 125, 50, .15); color: #2e7d32; }
.pill--no  { background: rgba(183, 28, 28, .12); color: #b71c1c; }

.empty { padding: 40px; text-align: center; opacity: .65; }

/* ---------------------------------------------------------- Flash */

.flash {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.flash--ok    { background: rgba(46, 125, 50, .14); color: #2e7d32; }
.flash--error { background: rgba(183, 28, 28, .10); color: #b71c1c; }

/* ------------------------------------------------- Ενέργειες γραμμής */

td.actions { white-space: nowrap; }

.inline-form { display: inline; }

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    color: #333;
    text-decoration: underline;
    text-underline-position: under;
    cursor: pointer;
}

.link-btn:hover { opacity: .65; }

.link-btn--danger { color: #b71c1c; margin-left: 12px; }

/* ------------------------------------------------ Modal επεξεργασίας */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .45);
}

.modal.is-open { display: flex; }

.modal__panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    background: var(--bg);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.modal__panel h2 {
    margin: 0 0 20px;
    font-size: 19px;
    font-weight: 600;
}

.modal__panel label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
}

.modal__panel input,
.modal__panel select,
.modal__panel textarea {
    width: 100%;
    margin-top: 6px;
    padding: 9px 12px;
    border: 1px solid rgba(51, 51, 51, .3);
    border-radius: 2px;
    background: #fff;
    font: inherit;
    font-weight: 400;
}

.modal__panel textarea { min-height: 80px; resize: vertical; }

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}

.modal__close:hover { background: rgba(51, 51, 51, .1); }

.modal__actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal__actions .btn {
    justify-content: center;
    font-family: inherit;
}
