/* account.css – styly stránky account.php (barvy a tvary podle index.php) */
:root {
    --primary: #781D26;
    --primary-dark: #5a151c;
    --accent: #C4A66B;
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --text: #2C2C2C;
    --text-muted: #666666;
    --radius-card: 14px;
    --radius-btn: 99px;
    --shadow-lg: 0 1px 3px rgba(44, 26, 20, 0.05), 0 14px 28px -16px rgba(44, 26, 20, 0.16);
}

* { box-sizing: border-box; }

body.account-page {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.account-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(250, 250, 250, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.account-brand img { height: 26px; width: auto; display: block; }
@media (max-width: 560px) { .account-brand img { height: 20px; } }
.account-nav-right { display: flex; align-items: center; gap: 14px; }
/* kontaktní údaje musí být dohledatelné i mimo obchodní podmínky */
.account-footer { padding: 22px 20px 28px; text-align: center; font-size: 13px; line-height: 1.7;
    color: var(--text-muted); border-top: 1px solid rgba(0, 0, 0, 0.06); }
.account-footer a { color: var(--text-muted); }
.account-footer a:hover { color: var(--primary); }
.account-back { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.account-back:hover { color: var(--primary); }

.account-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 16px 64px;
}

.account-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(44, 26, 20, 0.1);
    padding: 40px 36px;
}

.account-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 700;
    font-size: 28px;
    margin: 0 0 6px;
    color: var(--primary);
}
.account-subtitle { margin: 0 0 24px; color: var(--text-muted); font-size: 15px; }

/* přepínání login / registrace */
.account-head-register, #registerForm { display: none; }
.account-card[data-mode="register"] .account-head-login,
.account-card[data-mode="register"] #loginForm { display: none; }
.account-card[data-mode="register"] .account-head-register { display: block; }
.account-card[data-mode="register"] #registerForm { display: flex; }
.account-head-forgot, #forgotForm, .account-head-reset, #resetForm { display: none; }
.account-card[data-mode="forgot"] .account-head-login,
.account-card[data-mode="forgot"] #loginForm,
.account-card[data-mode="reset"] .account-head-login,
.account-card[data-mode="reset"] #loginForm { display: none; }
.account-card[data-mode="forgot"] .account-head-forgot { display: block; }
.account-card[data-mode="forgot"] #forgotForm { display: flex; }
.account-card[data-mode="reset"] .account-head-reset { display: block; }
.account-card[data-mode="reset"] #resetForm { display: flex; }
.account-forgot { margin: 2px 0 0; text-align: right; font-size: 13px; }
.account-forgot a { color: var(--text-muted); }
.account-forgot a:hover { color: var(--primary); }

.account-form { display: flex; flex-direction: column; gap: 8px; }
.account-form + .account-form { margin-top: 12px; }

.account-label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.account-label small { font-weight: 400; color: var(--text-muted); }

.account-input {
    width: 100%;
    padding: 13px 18px;
    border-radius: var(--radius-btn);
    border: 1px solid #ddd;
    font-size: 16px;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.account-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(120, 29, 38, 0.12);
}

.account-pw { position: relative; }
.account-pw .account-input { padding-right: 48px; }
.account-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.account-pw-toggle:hover { color: var(--primary); background: rgba(120, 29, 38, 0.06); }
.account-pw-toggle.is-on { color: var(--primary); }
.account-pw-toggle svg { width: 20px; height: 20px; fill: currentColor; }

.account-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}
.account-check input { margin-top: 3px; accent-color: var(--primary); }

.account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 14px 28px;
    border-radius: var(--radius-btn);
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.account-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}
.account-btn:disabled { opacity: 0.6; cursor: wait; }
.account-btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.account-btn-outline:hover:not(:disabled) { background: rgba(120, 29, 38, 0.06); color: var(--primary); box-shadow: none; }
.account-btn-danger { background: #B42318; }
.account-btn-danger:hover:not(:disabled) { background: #8f1c13; }

.account-switch { text-align: center; font-size: 14px; color: var(--text-muted); margin: 16px 0 0; }
.account-switch a { font-weight: 600; }

.account-alert {
    display: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
}
.account-alert.show { display: block; }
.account-alert.error { background: #FEF3F2; color: #B42318; border: 1px solid #FECDCA; }
.account-alert.success { background: #ECFDF3; color: #027A48; border: 1px solid #ABEFC6; }

/* profil */
.account-profile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0 0 20px;
    font-size: 15px;
}
.account-profile dt { color: var(--text-muted); }
.account-profile dd { margin: 0; font-weight: 500; word-break: break-all; }

.account-section {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 14px;
}
.account-section summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.account-section summary::-webkit-details-marker { display: none; }
.account-section summary::before {
    content: "";
    width: 8px; height: 8px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
    transition: transform 0.2s;
}
.account-section[open] summary::before { transform: rotate(45deg); }
.account-section .account-form { margin-top: 10px; }
.account-danger summary { color: #B42318; }
.account-muted { font-size: 13px; color: var(--text-muted); margin: 10px 0 0; }

/* certifikace v profilu */
.account-card.account-wide { max-width: 640px; }
.account-h2 { font-family: Georgia, "Times New Roman", serif; color: var(--primary); font-size: 20px; margin: 0 0 4px; }
.account-track { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; margin: 14px 0 6px; }
.account-levels { list-style: none; margin: 0; padding: 0; }
.account-levels li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
.account-level-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.account-btn-small { margin-top: 0; padding: 8px 14px; font-size: 13px; text-decoration: none !important; }
.account-link-btn { font-weight: 600; }
.account-redeem { margin-top: 14px; }
.account-redeem-row { display: flex; gap: 8px; }
.account-redeem-row .account-input { flex: 1; }
.account-sub { margin-top: 10px; }
.account-sub summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.account-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.account-table td { padding: 6px 4px; border-bottom: 1px solid rgba(0,0,0,.05); vertical-align: top; }
.account-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #f3f0ea; }
.account-badge.paid { background: #ECFDF3; color: #027A48; }
.account-badge.pending, .account-badge.created { background: #fff8e6; color: #8a6d1c; }
/* stav e-mailu a poznámky u jeho změny */
.account-badge.ok { background: #ECFDF3; color: #027A48; }
.account-badge.warn { background: #fff8e6; color: #8a6d1c; }
.account-note { margin: 6px 0 10px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.account-note.warn { color: #8a6d1c; }
.account-badge.failed, .account-badge.cancelled { background: #FEF3F2; color: #B42318; }

/* ------------------------------------------------------ čitelnost na mobilu */
@media (max-width: 620px) {
    .account-card { padding: 28px 20px; }
    /* větší písmo pro čitelnost na mobilu */
    body { font-size: 17px; }
    .account-subtitle { font-size: 16px; line-height: 1.6; }
    .account-label { font-size: 14.5px; }
    .account-forgot, .account-muted { font-size: 14px; }
    .account-switch, .account-back { font-size: 15px; }
    .account-h2 { font-size: 21px; }
    .account-section summary { font-size: 16px; }
    .account-row, .account-list li, .account-table td, .account-table th { font-size: 15px; line-height: 1.55; }
    .account-badge, .badge { font-size: 12.5px; }
}
