/* =========================================
   OBEDY TMV – HLAVNÝ VZHĽAD
========================================= */

:root {
    --tmv-blue: #2f66ad;
    --tmv-blue-dark: #204f8d;
    --tmv-light: #eef5fc;
    --background: #f3f6fa;
    --card: #ffffff;
    --text: #202631;
    --muted: #707887;
    --border: #dce4ee;
    --shadow: 0 18px 45px rgba(39, 71, 110, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, #ffffff 0, #f5f8fc 38%, #edf2f7 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 4px solid rgba(47, 102, 173, 0.18);
    outline-offset: 2px;
}

/* =========================================
   HLAVNÝ OBAL
========================================= */

.app-wrapper {
    width: min(100% - 28px, 760px);
    margin: 0 auto;
    padding: 30px 0 48px;
}

.app-header {
    text-align: center;
    margin-bottom: 28px;
}

.app-header .logo {
    display: block;
    width: min(260px, 68vw);
    max-height: 145px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.app-header h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(42px, 9vw, 64px);
    line-height: 1;
    font-weight: 750;
    letter-spacing: -2px;
}

.app-header p {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 3.8vw, 20px);
}

/* Atribút hidden musí obrazovku skutočne skryť */
[hidden] {
    display: none !important;
}

.app-screen {
    animation: screenIn 0.22s ease;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   DOMOVSKÉ DLAŽDICE
========================================= */

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.home-card {
    appearance: none;
    min-height: 190px;
    padding: 25px 20px;
    border: 1px solid rgba(47, 102, 173, 0.12);
    border-radius: 26px;
    background:
        linear-gradient(145deg, #ffffff 0%, #f7faff 100%);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.home-card:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 102, 173, 0.3);
    box-shadow: 0 22px 55px rgba(39, 71, 110, 0.17);
}

.home-card:active {
    transform: scale(0.98);
}

.home-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 18px;
    background: var(--tmv-light);
    font-size: 29px;
}

.home-title {
    display: block;
    margin-bottom: 8px;
    font-size: 23px;
    font-weight: 750;
    color: var(--tmv-blue-dark);
}

.home-description {
    display: block;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.profile-link {
    appearance: none;
    display: block;
    margin: 22px auto 0;
    padding: 12px 20px;
    border: 0;
    background: transparent;
    color: var(--tmv-blue);
    font-weight: 700;
    font-size: 16px;
}

/* =========================================
   VŠEOBECNÉ KARTY A FORMULÁRE
========================================= */

.content-card,
.welcome-block {
    background: var(--card);
    border: 1px solid rgba(47, 102, 173, 0.1);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.content-card {
    padding: 28px;
}

.content-card h2,
.welcome-block h2 {
    margin: 0;
    color: var(--tmv-blue-dark);
    font-size: 30px;
    font-weight: 750;
}

.back-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--tmv-blue);
    font-weight: 700;
    padding: 8px 2px;
    margin-bottom: 12px;
}

.form-group {
    margin-top: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
}

.form-control,
.form-select {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    font-size: 17px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tmv-blue);
    box-shadow: 0 0 0 4px rgba(47, 102, 173, 0.1);
}

.remember-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 22px 0;
}

.remember-row input {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.main-button,
.secondary-button {
    appearance: none;
    width: 100%;
    min-height: 56px;
    border-radius: 17px;
    font-weight: 750;
    transition:
        transform 0.16s ease,
        filter 0.16s ease;
}

.main-button {
    border: 0;
    background: linear-gradient(135deg, var(--tmv-blue), var(--tmv-blue-dark));
    color: #ffffff;
    box-shadow: 0 11px 24px rgba(47, 102, 173, 0.22);
    font-size: 18px;
}

.secondary-button {
    margin-top: 12px;
    border: 1px solid #bdd0e8;
    background: #f8fbff;
    color: var(--tmv-blue-dark);
}

.main-button:hover,
.secondary-button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.message {
    min-height: 24px;
    margin-top: 16px;
    text-align: center;
    font-weight: 700;
}

.error-message {
    color: #b42318;
}

.success-message {
    color: #16803c;
}

/* =========================================
   OBJEDNÁVKA
========================================= */

.welcome-block {
    padding: 25px;
    margin-bottom: 18px;
}

.welcome-block p {
    margin: 7px 0 0;
    color: var(--muted);
}

#menuContainer {
    display: grid;
    gap: 15px;
}

.menu-card {
    padding: 22px;
    border: 1px solid rgba(47, 102, 173, 0.13);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(39, 71, 110, 0.08);
}

.menu-card-header {
    margin-bottom: 8px;
}

.menu-number {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--tmv-light);
    color: var(--tmv-blue-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.menu-card h3 {
    margin: 11px 0 18px;
    font-size: 21px;
    line-height: 1.35;
}

.menu-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.menu-option,
.soup-option {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f9fbfd;
    font-weight: 700;
}

.menu-option {
    min-height: 52px;
    padding: 13px;
}

.menu-option input,
.soup-option input {
    width: 21px;
    height: 21px;
    accent-color: var(--tmv-blue);
}

.soup-option {
    margin: 18px 0;
    padding: 16px;
}

/* =========================================
   VÝDAJ
========================================= */

.issue-card {
    text-align: center;
}

.chip-symbol {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 27px auto 15px;
    border-radius: 25px;
    background: var(--tmv-light);
    color: var(--tmv-blue);
    font-size: 48px;
}

.issue-main-text {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
}

.issue-help-text {
    max-width: 420px;
    margin: 11px auto 24px;
    color: var(--muted);
    line-height: 1.5;
}

/* =========================================
   MOBIL
========================================= */

@media (max-width: 620px) {
    .app-wrapper {
        width: min(100% - 22px, 540px);
        padding-top: 20px;
    }

    .app-header {
        margin-bottom: 22px;
    }

    .home-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .home-card {
        min-height: 135px;
        padding: 20px;
        display: grid;
        grid-template-columns: 54px 1fr;
        grid-template-rows: auto auto;
        column-gap: 15px;
        align-items: center;
    }

    .home-icon {
        grid-row: 1 / 3;
        width: 54px;
        height: 54px;
        margin: 0;
    }

    .home-title {
        margin: 0;
        font-size: 21px;
    }

    .home-description {
        align-self: start;
    }

    .content-card {
        padding: 22px;
    }

    .menu-options {
        grid-template-columns: 1fr;
    }
}
/* =====================================
   PRIHLÁSENIE RFID
===================================== */

.chip-login-box {
    text-align: center;
    background: #f8fbff;
    border: 1px solid #dce7f5;
    border-radius: 24px;
    padding: 30px 25px;
    margin-bottom: 30px;
}

.chip-login-icon {
    width: 90px;
    height: auto;
    margin-bottom: 18px;
}

.chip-login-title {
    color: #25579a;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.chip-login-help {
    color: #6b7789;
    margin-bottom: 0;
}

.chip-login-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}ved 
.login-subtitle {
    text-align: center;
    color: #25579a;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 24px 0 20px;
}

.login-divider {
    margin: 28px 0 18px;
    border: none;
    border-top: 1px solid #dbe3ee;
}
.issue-chip-icon {
    width: 120px;
    height: auto;
    display: block;
    margin: 10px auto 25px;
}
/* =====================================
   VÝDAJ OBEDOV
===================================== */

.issue-chip-icon {
    width: 95px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.issue-main-text {
    text-align: center;
    color: #25579a;
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.issue-help-text {
    text-align: center;
    color: #6b7789;
    font-size: 1rem;
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.issue-card {
    max-width: 650px;
    margin: 0 auto;
}
.issue-success{
    text-align:center;
    padding:28px 20px;
}

.issue-success-icon{
    font-size:56px;
    margin-bottom:12px;
}

.issue-success-name{
    font-size:34px;
    font-weight:800;
    color:var(--tmv-blue);
    margin-bottom:18px;
}

.issue-success-meal{
    font-size:24px;
    font-weight:700;
    line-height:1.6;
    margin-bottom:22px;
}

.issue-success-text{
    font-size:22px;
    color:#1a7f37;
    font-weight:700;
}
/* =====================================
   DASHBOARD VÝDAJA
===================================== */

.issue-dashboard{
    margin-top:35px;
}

.issue-stats{
    display:flex;
    gap:16px;
    margin-bottom:28px;
}

.stat-card{
    flex:1;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    padding:18px;
    box-shadow:var(--shadow);
}

.stat-number{
    display:block;
    font-size:34px;
    font-weight:800;
    color:var(--tmv-blue);
}

.stat-label{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-weight:700;
}

.issue-list-title{
    margin:10px 0 20px;
    text-align:left;
    color:var(--tmv-blue-dark);
}

.issue-cards{

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(170px,1fr));

    gap:16px;

}

.issue-item{

    background:#fff;

    border-radius:18px;

    border:2px solid #dce4ee;

    padding:18px;

    text-align:left;

    box-shadow:0 8px 18px rgba(0,0,0,.06);

    transition:.25s;

}

.issue-item.waiting{

    border-left:8px solid #24a148;

}

.issue-item.issued{

    border-left:8px solid #d93025;

    opacity:.75;

}

.issue-name{

    font-size:20px;

    font-weight:800;

    margin-bottom:10px;

}

.issue-menu{

    font-size:15px;

    margin-bottom:6px;

}

.issue-type{

    color:var(--muted);

    font-size:14px;

}
.issue-meal-row{
    padding:10px 0;
    border-top:1px solid var(--border);
}

.issue-meal-row:first-of-type{
    border-top:0;
}

.issue-status{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid var(--border);
    font-size:14px;
    font-weight:800;
}

.issue-item.waiting{
    background:#f2fff6;
    border-color:#9ad8aa;
}

.issue-item.issued{
    background:#fff4f3;
    border-color:#e4aaa6;
    opacity:1;
}
.email-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

#emailModal[hidden] {
    display: none !important;
}

#emailModal .modal-content,
#pinModal .modal-content {
    background: #ffffff;
    width: calc(100% - 40px);
    max-width: 460px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.modal-content input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #bdd3ee;
    border-radius: 14px;
    font-size: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.modal-actions button {
    flex: 1;
}
#emailModal[hidden],
#pinModal[hidden] {
    display: none !important;
}
.link-button {
    background: none;
    border: none;
    color: #0d6efd;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
    text-decoration: underline;
}

.link-button:hover {
    color: #084298;
}
/* Obnova PIN-u */

#resetPinModal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

#resetPinModal[hidden] {
    display: none;
}

#resetPinModal .reset-pin-box {
    width: 380px;
    max-width: calc(100% - 40px);

    background: #fff;
    padding: 24px;
    border-radius: 16px;

    box-shadow: 0 12px 35px rgba(0,0,0,.25);
}
[hidden] {
    display: none !important;
}

/* OKNO PO ÚSPEŠNOM ULOŽENÍ OBJEDNÁVKY */

#orderSuccessModal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
}

#orderSuccessModal[hidden] {
    display: none !important;
}

#orderSuccessModal .order-success-content {
    width: min(90vw, 420px);
    margin: 0;
    padding: 32px 24px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    text-align: center;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.order-success-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #e8f7ed;
    color: #16803c;

    font-size: 40px;
    font-weight: 700;
}

#orderSuccessText {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}
/* =====================================
   MODAL VÝDAJA OBEDA
===================================== */

#issueResultModal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
}

#issueResultModal[hidden] {
    display: none !important;
}

#issueResultModal .issue-result-content {
    width: min(90vw, 500px);
    margin: 0;
    padding: 32px 26px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;

    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.issue-result-icon {
    font-size: 56px;
}

.issue-result-name {
    margin: 0;
    color: var(--tmv-blue);
    font-size: 2rem;
    font-weight: 800;
}

.issue-result-meals {
    font-size: 1.2rem;
    line-height: 1.7;
}

.issue-result-text {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}
