/*
 * ProfiMail web (www.profimail.cloud) — podle návrhu infra/profimail/design/profimail-web.pen
 * (rámy W1–W4). Vzhled stejný jako přihlášení webmailu (webmail/skin/styles/_styles.less).
 * Rámečky v Pencilu jsou „uvnitř“ (nepřidávají k rozměru), proto padding = návrh − 1 px tam, kde je border.
 */

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/static/fonts/inter-latin-ext-wght-normal.woff2?v=1ad231aac0') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/static/fonts/inter-latin-wght-normal.woff2?v=260c81a475') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Lexend Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/static/fonts/lexend-latin-ext-wght-normal.woff2?v=3c963a2346') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Lexend Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/static/fonts/lexend-latin-wght-normal.woff2?v=2077a5271e') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*** Barvy: světlý režim (výchozí) a tmavý (html[data-theme=dark]) ***/

:root {
    color-scheme: light;
    --font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-head: 'Lexend Variable', Lexend, var(--font);

    --page-bg: #6E8FD8;
    --veil:
        linear-gradient(180deg, rgba(15, 23, 42, 0) 60%, rgba(30, 27, 75, .35) 100%),
        linear-gradient(160deg, rgba(59, 91, 219, .33) 0%, rgba(96, 165, 250, .08) 45%, rgba(167, 139, 250, .25) 100%);

    --glass: linear-gradient(200deg, rgba(43, 42, 107, .30) 0%, rgba(75, 58, 154, .20) 100%);
    --glass-border: rgba(255, 255, 255, .30);
    --glass-shadow: 0 24px 60px rgba(30, 27, 75, .25);

    --pill-bg: rgba(255, 255, 255, .14);
    --pill-bg-hover: rgba(255, 255, 255, .22);
    --pill-border: rgba(255, 255, 255, .35);

    --row-bg: rgba(255, 255, 255, .12);
    --row-bg-hover: rgba(255, 255, 255, .20);
    --row-border: rgba(255, 255, 255, .25);

    --foot-bg: rgba(15, 23, 42, .18);
    --foot-border: rgba(255, 255, 255, .20);

    --card-bg: rgba(255, 255, 255, .94);
    --card-border: #FFFFFF;
    --card-text: #0F172A;
    --card-label: #64748B;
    --card-line: #E6E8F2;
    --tile-bg: #EFEBFE;
    --tile-icon: #6246EA;
    --copy: #7C5CF0;
    --copy-hover: #E4DDFD;

    --primary: linear-gradient(90deg, #6D4FEA 0%, #7C5CF0 100%);
    --focus: 0 0 0 3px rgba(152, 127, 244, .55);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #0A0E1A;
    --veil:
        radial-gradient(ellipse 110% 110% at 50% 45%, rgba(75, 47, 143, .35) 0%, rgba(10, 14, 26, 0) 100%),
        linear-gradient(rgba(7, 11, 26, .80), rgba(7, 11, 26, .80));

    --glass: linear-gradient(200deg, rgba(26, 31, 58, .80) 0%, rgba(20, 24, 51, .70) 100%);
    --glass-border: rgba(255, 255, 255, .12);
    --glass-shadow: 0 24px 60px rgba(0, 0, 0, .50);

    --pill-bg: rgba(255, 255, 255, .08);
    --pill-bg-hover: rgba(255, 255, 255, .14);
    --pill-border: rgba(255, 255, 255, .18);

    --row-bg: rgba(255, 255, 255, .05);
    --row-bg-hover: rgba(255, 255, 255, .10);
    --row-border: rgba(255, 255, 255, .12);

    --foot-bg: rgba(255, 255, 255, .05);
    --foot-border: rgba(255, 255, 255, .12);

    --card-bg: rgba(12, 17, 33, .90);
    --card-border: #1F2740;
    --card-text: #E8EBF5;
    --card-label: #8691AB;
    --card-line: #1F2740;
    --tile-bg: #221E45;
    --tile-icon: #B9A8FF;
    --copy: #B9A8FF;
    --copy-hover: #2E2862;
}

/*** Základ ***/

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.25;
    color: #fff;
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p, dl, dd {
    margin: 0;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.i {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* pozadí: nebe + barevný závoj PCS (fixně, aby se při posunu nehýbalo) */
.sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--page-bg) url('/static/img/nebe.jpg?v=30bbf23d3e') center / cover no-repeat;
}

.sky::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--veil);
}

/*** Rozvržení stránky: lišta, střed, patička (padding 28/40, mezery 16) ***/

.page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 40px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.top-split {
    justify-content: space-between;
    align-items: flex-start; /* tlačítka na stejném místě jako na úvodu, ne svisle uprostřed vedle loga */
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.foot {
    display: flex;
    justify-content: center;
}

/*** Pilulky v liště: padding 9/16, ikona 16, text 13/500, mezera 8 ***/

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin: 0;
    padding: 8px 15px;
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    background: var(--pill-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
    color: #fff;
    cursor: pointer;
    transition: background-color .15s;
}

.pill:hover {
    background-color: var(--pill-bg-hover);
}

.pill .i-trail {
    width: 14px;
    height: 14px;
}

.pill-primary {
    padding: 9px 16px;
    border: 0;
    background: var(--primary);
    box-shadow: 0 6px 16px rgba(76, 29, 149, .33);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font-weight: 600;
}

.pill-primary:hover {
    background: var(--primary);
    filter: brightness(1.08);
}

.pill-primary:focus-visible {
    box-shadow: 0 6px 16px rgba(76, 29, 149, .33), var(--focus);
}

/* přepínač motivu: ve světlém režimu „Tmavý režim“ s měsícem, v tmavém „Světlý režim“ se sluncem */
.theme-to-light {
    display: none !important;
}

html[data-theme="dark"] .theme-to-dark {
    display: none !important;
}

html[data-theme="dark"] .theme-to-light {
    display: inline-flex !important;
}

.theme-toggle .theme-to-light,
.theme-toggle .theme-to-dark {
    align-items: center;
    gap: 8px;
}

.theme-to-dark {
    display: inline-flex;
}

/*** Logo ***/

.logo {
    display: block;
    width: 360px;
    height: 132px;
    max-width: 100%;
    object-fit: contain;
}

.logo-small {
    display: block;
}

.logo-small img {
    display: block;
    width: 190px;
    height: 70px;
    object-fit: contain;
}

/*** Skleněný panel: radius 28, rozmazání 28 ***/

.glass {
    display: flex;
    flex-direction: column;
    width: 480px;
    max-width: 100%;
    padding: 35px;
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
}

.head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.head h1 {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 500;
    line-height: 33px;
    letter-spacing: -.01em;
}

.head p {
    font-size: 14px;
    line-height: 17px;
    color: rgba(255, 255, 255, .9);
}

/*** Úvod (W1): panel 480, mezery 20 ***/

.home .glass {
    gap: 20px;
}

.home .head {
    align-items: center;
    text-align: center;
}

/* hlavní tlačítko: výška 52, gradient, stín 0 8 20, text 16/600, ikony 18, mezera 10 */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(76, 29, 149, .40);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    transition: filter .15s;
}

.btn-primary .i {
    width: 18px;
    height: 18px;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-primary:focus-visible {
    box-shadow: 0 8px 20px rgba(76, 29, 149, .40), var(--focus);
}

/* oddělovač „nebo“ */
.or {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    line-height: 15px;
    color: rgba(255, 255, 255, .7);
}

.or::before,
.or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .2);
}

/* odkazy: padding 14/16, radius 18, dlaždice 44, mezera 14 */
.links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid var(--row-border);
    border-radius: 18px;
    background: var(--row-bg);
    transition: background-color .15s;
}

.link:hover {
    background-color: var(--row-bg-hover);
}

.link .tile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    background: rgba(255, 255, 255, .15);
}

.link .tile .i {
    width: 20px;
    height: 20px;
}

.link-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap; /* jako v návrhu W3: na 390 px smí přesáhnout do mezery před šipkou */
}

.link-desc {
    font-size: 13px;
    line-height: 16px;
    color: rgba(255, 255, 255, .8);
}

.link > .i {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, .8);
}

/*** Patička: pilulka padding 8/16, mezera 10, text 12, logo PCS 111 × 24 ***/

.service {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 15px;
    border: 1px solid var(--foot-border);
    border-radius: 999px;
    background: var(--foot-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    font-size: 12px;
    line-height: 15px;
    white-space: nowrap;
    color: rgba(255, 255, 255, .9);
}

.service img {
    display: block;
    width: 111px;
    height: 24px;
    object-fit: contain;
}

/*** Nastavení (W2): panel 820, mezery 22, karty ***/

.settings .glass {
    width: 820px;
    gap: 22px;
}

.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 16px;
}

.card-wide {
    grid-column: 1 / -1;
}

/* karta: padding 20, radius 20, mezera 14 */
.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--card-text);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-head .tile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tile-bg);
    color: var(--tile-icon);
}

.card-head .tile .i {
    width: 20px;
    height: 20px;
}

.card-head h2 {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -.01em;
}

.card-head p {
    margin-top: 2px;
    font-size: 12px;
    line-height: 15px;
    color: var(--card-label);
}

/* řádek: výška 40, popisek 110 (13), hodnota 15/600, kopírovat 30 × 30; mezi řádky 4 + čára + 4 */
.kv {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
}

.kv + .kv {
    min-height: 45px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--card-line);
}

.kv dt {
    flex: none;
    width: 110px;
    font-size: 13px;
    line-height: 16px;
    color: var(--card-label);
}

.kv dd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
}

.kv dd.plain {
    font-weight: 500;
}

.copy {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--tile-bg);
    color: var(--copy);
    cursor: pointer;
    transition: background-color .15s;
}

.copy:hover {
    background-color: var(--copy-hover);
}

.copy .i {
    width: 15px;
    height: 15px;
}

.copy .i-check,
.copy.done .i-copy {
    display: none;
}

.copy.done .i-check {
    display: block;
}

.copy::after {
    content: 'Zkopírováno';
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    padding: 4px 8px;
    border-radius: 6px;
    background: #0F172A;
    font-size: 11px;
    font-weight: 500;
    line-height: 14px;
    white-space: nowrap;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
}

.copy.done::after {
    opacity: 1;
}

html[data-theme="dark"] .copy::after {
    background: #E8EBF5;
    color: #0F172A;
}

/* zpět: šipka 16, text 13/500, mezera 8 */
.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
    color: rgba(255, 255, 255, .85);
}

.back .i {
    color: rgba(255, 255, 255, .8);
}

.back:hover {
    color: #fff;
}

.short {
    display: none;
}

/*** Užší obrazovky ***/

@media (max-width: 900px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

/* mobil (návrh W3/W4, 390 px): padding 20, menší logo a nadpisy, přepínač jen ikona */
@media (max-width: 640px) {
    .page {
        padding: 20px;
    }

    .main {
        gap: 24px;
    }

    .logo {
        width: 260px;
        height: 96px;
    }

    .logo-small img {
        width: 150px;
        height: 55px;
    }

    .glass {
        width: 100%;
        padding: 23px;
    }

    .head h1 {
        font-size: 22px;
        line-height: 28px;
    }

    .theme-toggle {
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
    }

    .theme-toggle .label {
        display: none;
    }

    .pill-primary .long {
        display: none;
    }

    .pill-primary .short {
        display: inline;
    }

    .settings .main {
        justify-content: flex-start;
        padding: 8px 0;
    }

    .settings .glass {
        padding: 19px;
    }

    .cards {
        gap: 12px;
    }

    /* řádky karty: popisek (12) nad hodnotou, kopírovat vpravo uprostřed */
    .kv {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        min-height: 0;
        padding: 8px 42px 8px 0;
    }

    .kv + .kv {
        min-height: 0;
        padding-top: 12px;
    }

    .kv dt {
        width: auto;
        font-size: 12px;
        line-height: 15px;
    }

    .kv dd {
        position: static;
    }

    .kv .copy {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    .kv + .kv .copy {
        top: calc(50% + 2px);
    }
}

/* velmi úzké telefony: nadpis odkazu se zalomí, ať nenarazí do šipky */
@media (max-width: 380px) {
    .link-title {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
