/* Westmore Roleplay · správa serveru · vlastní jednotný styl, bez dalších override souborů. */
/* Jednotné vyšší číslice: lokální systémový serif pouze pro znaky 0–9.
   Bez síťového fontu a bez změny písmového stylu ostatního textu. */
@font-face {
    font-family: "WMRP číslice";
    src: local("Cambria"), local("Liberation Serif"), local("Times New Roman");
    font-style: normal;
    font-weight: 400;
    unicode-range: U+0030-0039;
}
@font-face {
    font-family: "WMRP číslice";
    src: local("Cambria Bold"), local("Liberation Serif Bold"), local("Times New Roman Bold"), local("Cambria");
    font-style: normal;
    font-weight: 700;
    unicode-range: U+0030-0039;
}
:root {
    color-scheme: dark;
    --bg: #130f0c;
    --sidebar: #1b1510;
    --panel: #241b15;
    --panel2: #30241b;
    --field: #18120e;
    --border: #51402e;
    --border-soft: #3e3024;
    --muted: #a5957e;
    --text: #eee0c9;
    --text-soft: #cbbb9f;
    --accent: #b4915c;
    --accent-light: #e0c391;
    --danger: #b7746a;
    --green: #9eae83;
    --orange: #d2aa70;
    --red: #96613e;
    --red-light: #d0aa74;
    --shadow: 0 12px 35px rgba(0,0,0,.2);
    --type-display: "WMRP číslice", Copperplate, "Copperplate Gothic Light", Georgia, serif;
    --type-body: "WMRP číslice", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; font-variant-numeric: lining-nums tabular-nums; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--type-body);
    font-size: 15px;
    background: var(--bg);
}
::selection { background: #97774f; color: #1c120c; }
a { color: var(--accent-light); }
button, input, select, textarea { font: inherit; font-variant-numeric: inherit; }
button { cursor: pointer; }
button, input, select, textarea { min-width: 0; }
button:not(.link-button) {
    border: 1px solid #7c6040;
    border-radius: 2px;
    background: linear-gradient(180deg, #80613c, #63492f);
    color: #f7e8ce;
    padding: 11px 17px;
    font-family: var(--type-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
    transition: background .17s ease, border-color .17s ease, color .17s ease, box-shadow .17s ease;
}
button:not(.link-button):hover:not(:disabled) {
    background: linear-gradient(180deg, #a17c4e, #7b5b37);
    border-color: var(--accent-light);
    color: #fff2da;
}
button:not(.link-button):focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.secondary:not(.link-button) {
    background: #31251b;
    border-color: #5d4833;
    color: var(--text-soft);
}
button.secondary:not(.link-button):hover:not(:disabled) {
    background: #493523;
    border-color: #a18458;
    color: var(--text);
}
button.danger:not(.link-button) { background: #58302a; border-color: #8e5148; color: #f5d7c7; }
button.danger:not(.link-button):hover:not(:disabled) { background: #724039; border-color: #c68e7b; }
button.small { padding: 7px 10px; font-size: 11px; }
button.full { width: 100%; }
input:not([type=checkbox]), select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--field);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}
input::placeholder, textarea::placeholder { color: #867862; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: #a48150; }
label { display: block; margin: 0 0 8px; color: var(--text-soft); font-size: 13px; }
.field { margin-bottom: 17px; }
h1, h2, h3, h4 { font-family: var(--type-display); font-weight: 700; letter-spacing: .065em; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { line-height: 1.6; }
hr { border: 0; height: 1px; background: var(--border-soft); margin: 23px 0; }
.error { color: #df9b8c; min-height: 20px; margin-top: 12px; font-size: 13px; line-height: 1.5; }
.success { color: #a9c29b; margin-top: 12px; font-size: 13px; }
.info { color: var(--muted); line-height: 1.65; }
.online, .enabled { color: var(--green); }
.disabled, .pending { color: var(--orange); }
.role { color: var(--accent-light); text-transform: uppercase; }
.warning { padding: 13px 15px; background: rgba(125,83,43,.14); border-left: 2px solid var(--orange); color: #dcc29b; line-height: 1.6; }
#activationView, #twoFactorView, #dashboard, #recoveryLogin, #twoFactorSetup,
#recoveryCodesPanel, #inviteResult, #teamNavButton, #permissionsNavButton { display: none; }

/* Přihlášení, aktivace a 2FA: čistý podklad, jediné autentické logo WMRP. */
.center-view {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 18px;
    background: #130f0c;
}
.auth-box {
    width: min(100%, 430px);
    padding: 37px 37px 33px;
    border-radius: 4px;
    background: #211811;
    box-shadow: 0 20px 62px rgba(0, 0, 0, .36);
}
.auth-brand { margin: 0 auto 29px; text-align: center; }
.auth-logo { display: block; width: 100%; max-width: 350px; height: auto; margin: 0 auto; }
.auth-heading {
    margin: -8px 0 26px;
    color: #d4b88c;
    font-family: var(--type-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .11em;
    text-align: center;
}
.auth-box .field { margin-bottom: 19px; }
.auth-box label { color: #d3bb99; font-family: var(--type-display); font-size: 12px; letter-spacing: .025em; }
.auth-box input { background: #160f0b; }
.auth-box button.full { margin-top: 5px; }
.auth-box .error, .auth-box .success { text-align: center; }
.auth-box .error:empty, .auth-box .success:empty { display: none; }
.link-button { padding: 10px 0; border: none; background: transparent; color: var(--muted); font-size: 13px; }
.link-button:hover { background: transparent; color: var(--accent-light); }
#twoFactorView .info { font-size: 13px; }
.activation-details { padding: 13px; margin-bottom: 20px; background: #18110e; border: 1px solid var(--border); }

/* Záhlaví a navigace */
.app-header {
    height: 78px; padding: 0 clamp(20px, 2.5vw, 43px);
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    border-bottom: 1px solid #624a30;
    background: linear-gradient(90deg, #211710 0%, #211912 60%, #2b2016 100%);
    box-shadow: 0 3px 18px #0005;
}
.header-identity { display: flex; align-items: center; gap: 14px; }
.header-mark { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; }
.header-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.header-name { display: grid; gap: 4px; }
.header-name strong { font-family: var(--type-display); color: #e6c994; font-size: 21px; letter-spacing: .17em; line-height: 1; }
.header-name span { font-size: 10px; letter-spacing: .2em; color: #a68c69; }
.header-actions { display: flex; gap: 25px; align-items: center; }
#logoutButton { min-width: 132px; }
.app-shell { display: flex; min-height: calc(100vh - 78px); }
.sidebar {
    display: flex; flex-direction: column;
    width: 244px; flex-shrink: 0; padding: 31px 13px 18px;
    background: linear-gradient(180deg, #1c150f 0%, #18120e 100%);
    border-right: 1px solid #4e3927;
}
.sidebar-heading { padding: 0 13px 15px; font-family: var(--type-display); color: #968064; font-size: 11px; letter-spacing: .14em; }
.nav-button:not(.link-button) {
    width: 100%; text-align: left; margin-bottom: 6px; padding: 13px 13px 13px 17px;
    color: #b9a58a; background: transparent; border: 1px solid transparent;
    border-left: 2px solid transparent; font-size: 12px; font-family: var(--type-display); letter-spacing: .04em;
}
.nav-button:not(.link-button):hover:not(:disabled) { background: #2c2117; border-color: #57422b; color: #f0d4aa; }
.nav-button.active:not(.link-button) {
    background: linear-gradient(90deg, #44301d, #2a2018);
    border: 1px solid #5d472e; border-left: 2px solid #c7a069;
    color: #f7e1bd;
}
.sidebar-foot { display: grid; gap: 5px; margin-top: auto; padding: 24px 14px 8px; border-top: 1px solid #433321; color: #977a51; font-family: var(--type-display); font-size: 10px; letter-spacing: .1em; }
.sidebar-foot small { font-size: 9px; color: #82705a; }
.app-main { flex: 1; min-width: 0; padding: clamp(25px,3vw,48px) clamp(19px,3.3vw,58px); }
.page { display: none; max-width: 1600px; margin: 0 auto; }
.page.active { display: block; }
.section-heading { margin: 0 0 29px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.eyebrow { display: block; margin-bottom: 10px; font-family: var(--type-display); font-size: 10px; letter-spacing: .17em; color: #c2a275; }
.page-title { margin: 0; font-family: var(--type-display); font-size: clamp(24px,2.2vw,32px); letter-spacing: .075em; color: #f0ddbf; }
.section-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,360px),1fr)); gap: 19px; align-items: start; }
.card {
    min-width: 0;
    padding: clamp(19px,2vw,28px);
    border: 1px solid var(--border);
    background: linear-gradient(147deg, rgba(58,42,28,.6), transparent 55%), var(--panel);
    box-shadow: inset 0 1px rgba(201,163,110,.06), var(--shadow);
}
.card h2, .card h3 { margin: 0 0 20px; color: #e6cc9f; }
.card p { color: var(--text-soft); }
.card > p:last-child { margin-bottom: 0; }
.card .info { color: var(--muted); }
.security-row { margin: 17px 0 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--text-soft); }
.security-row strong { letter-spacing: .08em; }
.qr-wrap { display: inline-block; background: #fff; padding: 11px; margin: 15px 0; }
#twoFactorQr { display: block; width: 230px; height: 230px; max-width: 100%; }
.secret { display: block; padding: 12px; margin: 10px 0 18px; background: #120d0a; border: 1px solid var(--border); color: #d8c29f; word-break: break-all; user-select: all; }
.recovery-codes { padding: 15px; background: var(--field); border: 1px solid var(--border); color: var(--text); line-height: 1.8; white-space: pre-wrap; user-select: all; }

/* Tým a oprávnění */
.team-layout { display: grid; grid-template-columns: minmax(280px,340px) minmax(0,1fr); align-items: start; gap: 19px; }
.invite-output { margin-top: 20px; padding: 15px; background: var(--field); border: 1px solid var(--border); }
.invite-url { margin: 10px 0; font-family: monospace; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; }
.team-table th, .team-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.team-table th { color: #b69a71; font: 700 11px var(--type-display); letter-spacing: .075em; text-transform: uppercase; }
.team-table td { font-size: 13px; color: var(--text-soft); }
.team-table tr:hover td { background: rgba(173,135,81,.065); }
.user-name { font-weight: bold; color: var(--text); }
.user-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 5px 8px; border: 1px solid var(--border); background: #372b20; font-size: 11px; text-transform: uppercase; }
.badge.green { color: var(--green); }
.badge.orange { color: var(--orange); }
.badge.red { color: var(--danger); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.role-select { min-width: 130px; padding: 8px; font-size: 12px; }
.permissions-layout { display: grid; grid-template-columns: minmax(255px,285px) minmax(0,1fr); align-items: start; gap: 19px; }
.permission-role-info { margin-top: 18px; padding: 14px; background: var(--field); border: 1px solid var(--border); color: var(--text-soft); line-height: 1.5; }
.permission-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; }
.permissions-list { display: grid; gap: 16px; margin-top: 20px; }
.permission-group { background: #1e1712; border: 1px solid var(--border); }
.permission-group-title { padding: 13px 15px; background: #332619; color: #d2b07d; font: 700 12px var(--type-display); letter-spacing: .09em; text-transform: uppercase; }
.permission-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-top: 1px solid var(--border-soft); cursor: pointer; }
.permission-item:hover { background: #32261c; }
.permission-item input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.permission-name { font-size: 14px; color: var(--text); font-weight: bold; }
.permission-description { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media(max-width:1120px) {
    .team-layout,.permissions-layout { grid-template-columns: 1fr; }
}
@media(max-width:800px) {
    .app-header { height: 72px; }
    .app-shell { min-height: calc(100vh - 72px); flex-direction: column; }
    .sidebar { width: 100%; padding: 9px 12px; flex-direction: row; flex-wrap: wrap; gap: 6px; border-right: 0; border-bottom: 1px solid var(--border); }
    .sidebar-heading, .sidebar-foot { display: none; }
    .nav-button:not(.link-button) { flex: 1 1 120px; width: auto; margin: 0; padding: 11px 12px; text-align: center; }
    .header-actions { gap: 10px; }
}
@media(max-width:520px) {
    .header-name strong { font-size: 17px; }
    .header-name span { letter-spacing: .1em; font-size: 8px; }
    .header-mark { width: 46px; height: 46px; flex-basis: 46px; }
    .app-header { padding: 0 13px; }
    #logoutButton { min-width: 0; padding: 10px; font-size: 10px; }
    .auth-box { padding: 30px 24px; }
    .auth-brand { margin-bottom: 23px; }
    .card { padding: 18px; }
    .security-row { display: block; }
    .security-row strong { display: block; margin-top: 7px; }
}
