:root {
    /* barvy dle brand manualu PrimmZone (zakaznik.primm.cz) */
    --color-navy: #1c406d;
    --color-teal: #46a9bc;
    --color-teal-dark: #368a9b;
}

* {
    box-sizing: border-box;
}

[x-cloak] {
    display: none !important;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
}

.page {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

h1 {
    font-size: 1.4rem;
}

.status {
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
}

.status-ok {
    background: #e3f7e8;
    color: #1a7a34;
}

.status-error {
    background: #fdeaea;
    color: #b3261e;
}

.muted {
    color: #5a6b7a;
}

/* ------------------------------------------------------------------ */
/* hlavicka appky                                                      */
/* ------------------------------------------------------------------ */

.app-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--color-navy);
    color: #fff;
}

.app-header-logo {
    width: 28px;
    height: 28px;
}

.app-header-back {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.app-header-title {
    font-weight: 700;
    flex: 1;
}

.app-header-logout {
    margin: 0;
}

.app-header-logout button {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* dlazdicova navigace na uvodni strance                               */
/* ------------------------------------------------------------------ */

.tile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.tile {
    display: block;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8ee;
    text-decoration: none;
    color: inherit;
}

.tile-title {
    display: block;
    font-weight: 700;
    color: var(--color-navy);
    font-size: 1.05rem;
}

.tile-desc {
    display: block;
    margin-top: 2px;
    font-size: 0.85rem;
    color: #5a6b7a;
}

.tile-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* karty a seznam stavu (stranka Stav)                                 */
/* ------------------------------------------------------------------ */

.card {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8ee;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--color-navy);
}

.h2-note {
    font-weight: 400;
}

.status-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #eef1f4;
}

.status-list li:first-child {
    border-top: none;
}

.badge {
    display: inline-block;
    min-width: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-teal);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.badge-warning {
    background: #b3261e;
}

/* ------------------------------------------------------------------ */
/* hodnoceni - hvezdicky a formular                                    */
/* ------------------------------------------------------------------ */

.star-picker {
    display: flex;
    gap: 10px;
    margin: 8px 0 4px;
}

.star {
    font-size: 2.9rem;
    line-height: 1;
    color: #d8dee4;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.star-filled {
    color: #ffc107;
}

.rating-reasons {
    margin: 12px 0;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.95rem;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rating-textarea {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 16px;
    border: 1px solid #c9d3dc;
    border-radius: 8px;
    resize: vertical;
}

.rating-textarea:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(70, 169, 188, 0.25);
}

.login-submit:disabled {
    background: #c9d3dc;
    border-color: #c9d3dc;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* prihlasovaci stranka                                                */
/* ------------------------------------------------------------------ */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 24px 16px;
}

.login-card {
    width: 100%;
    max-width: 330px;
    text-align: center;
}

.login-logo {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.login-subtitle {
    margin: 4px 0 24px;
    color: var(--color-teal-dark);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.login-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdeaea;
    color: #b3261e;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    /* min. 16px, jinak iOS Safari pri fokusu automaticky zoomuje */
    font-size: 16px;
    border: 1px solid #c9d3dc;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
}

.login-field input:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(70, 169, 188, 0.25);
}

.login-submit {
    margin-top: 4px;
    padding: 13px 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-teal);
    border: 1px solid var(--color-navy);
    border-radius: 8px;
    cursor: pointer;
}

.login-submit:hover,
.login-submit:active {
    background: var(--color-teal-dark);
}

.login-footer {
    margin: 32px 0 0;
    color: var(--color-navy);
    font-size: 0.8rem;
}
