/* ─── Vestigio Dashboard — Theme (matches vestigio.ai) ──────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    /* Exact palette from vestigio.ai Tailwind CSS */
    --zinc-900: #18181b;
    --zinc-800: #27272a;
    --zinc-700: #3f3f46;
    --zinc-600: #52525b;
    --zinc-500: #71717a;
    --zinc-400: #a1a1aa;
    --zinc-300: #d4d4d8;
    --zinc-200: #e4e4e7;
    --white:    #fff;
    --black:    #000;

    --bg:           var(--black);
    --bg-card:      #0d0d0d;
    --bg-raised:    #111;
    --bg-hover:     #1c1c1c;
    --border:       rgba(255,255,255,.09);
    --border-hover: rgba(255,255,255,.2);
    --text:         var(--white);
    --text-muted:   var(--zinc-400);
    --text-dim:     var(--zinc-600);
    --accent:       #3b82f6;
    --accent-light: rgba(59,130,246,.08);
    --success:      #22c55e;
    --warning:      #f59e0b;

    --r:      .375rem;
    --r-lg:   .75rem;
    --r-xl:   1rem;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-feature-settings: "cv02","cv03","cv04","cv11";
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Container — max-width 1180px / padding 16px — identyczny z vestigio.ai ─── */

.vd-container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 1rem; /* 16px — flat, bez responsywności */
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */

/* fixed top — identyczne z vestigio.ai (bg-black/50 backdrop-blur-sm) */
.vd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translateY(0);
    transition: transform .3s ease;
}

.vd-header--hidden {
    transform: translateY(-100%);
}

.vd-header__inner {
    display: flex;
    align-items: center;
    height: 64px; /* h-16 mobile */
}

.vd-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* h-7 md:h-8 — z kodu vestigio.ai */
.vd-logo__img {
    height: 32px;
    width: auto;
    display: block;
}

/* ─── Main ───────────────────────────────────────────────────────────────────── */

.vd-main {
    flex: 1;
    padding-top: 125px; /* pt-[125px] — vestigio.ai desktop */
    padding-bottom: 5rem;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */

.vd-hero {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.vd-hero__label {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zinc-500);
    margin-bottom: 1rem;
}

.vd-hero__label::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.vd-hero__title {
    font-size: 1.75rem;          /* 28px — mobile */
    font-weight: 300;
    letter-spacing: -.025em;
    line-height: 1.25;
    color: var(--white);
}

.vd-hero__sub {
    margin-top: .75rem;
    font-size: 1rem;
    color: var(--zinc-400);
    max-width: 500px;
    line-height: 1.65;
    font-weight: 400;
}

/* ─── Klient Panel ───────────────────────────────────────────────────────────── */

/* Po wpisaniu identyfikatora — pełna szerokość */
.klient-panel { max-width: 560px; }
.klient-panel--loaded { max-width: none; }

/* Token entry box */
.klient-panel__intro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2.5rem;
}

.kp-token-form {
    display: flex;
    gap: .625rem;
    flex-wrap: wrap;
}

.kp-input {
    flex: 1;
    min-width: 200px;
    background: var(--zinc-900);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--r);
    color: var(--white);
    font-size: .9375rem;
    font-family: inherit;
    font-weight: 400;
    padding: .6875rem 1rem;
    outline: none;
    transition: border-color .15s;
    line-height: 1.5;
}

.kp-input::placeholder { color: var(--zinc-600); }
.kp-input:focus { border-color: rgba(255,255,255,.3); }

@keyframes buttonGradient {
    0%   { background-position: 200% 0; }
    100% { background-position:   0% 0; }
}

.kp-btn-primary {
    background: linear-gradient(90deg, #ffe4d6, #c5e9e8, #e8dff5, #f5e8ed, #ffe4d6) 0 0 / 200% 100%;
    animation: 3s linear infinite buttonGradient;
    color: var(--black);
    border: none;
    border-radius: 9999px;
    font-size: .9375rem;
    font-weight: 500;
    font-family: inherit;
    padding: .6875rem 1.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
    line-height: 1.5;
}

.kp-btn-primary:hover { opacity: .9; }

/* Alerts */
.kp-alert {
    border-radius: var(--r);
    padding: .75rem 1rem;
    font-size: .875rem;
    line-height: 1.55;
}

.kp-alert--warn {
    background: rgba(245,158,11,.08);
    border-left: 2px solid var(--warning);
    color: #fbbf24;
    margin-bottom: 1.25rem;
}

.kp-alert--info {
    background: var(--accent-light);
    border-left: 2px solid var(--accent);
    color: #93c5fd;
    margin-top: 1.25rem;
}

.kp-alert--muted {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    color: var(--zinc-500);
    margin-top: 1.25rem;
}

/* Loaded layout — jednotorowy (status → zgłoszenia → portale) */
.klient-panel--loaded .kp-card {
    margin-bottom: 1rem;
}

/* Token bar */
.kp-token-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.kp-token-badge {
    background: var(--zinc-900);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: .3125rem .875rem;
    font-size: .8125rem;
    color: var(--zinc-400);
}

.kp-token-badge strong {
    color: var(--white);
    font-weight: 500;
}

.kp-back-link {
    font-size: .8125rem;
    color: var(--zinc-500);
    transition: color .15s;
}

.kp-back-link:hover { color: var(--zinc-300); }

/* Cards */
.kp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    margin-bottom: .875rem;
}

.kp-card__title {
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--zinc-500);
    margin-bottom: 1.25rem;
}

.kp-card__desc {
    font-size: .875rem;
    color: var(--zinc-500);
    margin-top: -.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* Slots */
.kp-slots {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.kp-slot {
    flex: 1;
    min-width: 80px;
    background: var(--zinc-900);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 1rem 1.25rem;
    text-align: center;
}

.kp-slot__num {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: 1;
    margin-bottom: .3125rem;
}

.kp-slot__label {
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--zinc-500);
}

.kp-slot--total .kp-slot__num   { color: var(--white); }
.kp-slot--used .kp-slot__num    { color: var(--success); }
.kp-slot--remaining .kp-slot__num { color: var(--accent); }
.kp-slot--empty .kp-slot__num   { color: var(--zinc-700); }

/* Table */
.kp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.kp-table th {
    text-align: left;
    padding: 0 0 .625rem;
    border-bottom: 1px solid var(--border);
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--zinc-500);
}

.kp-table td {
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
    color: var(--white);
    font-size: .875rem;
}

.kp-table tr:last-child td { border-bottom: none; }

.kp-td-dim { color: var(--zinc-600) !important; }

.kp-status-pill {
    display: inline-block;
    padding: .1875rem .625rem;
    border-radius: 99px;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .04em;
    background: var(--zinc-900);
    color: var(--zinc-400);
    border: 1px solid var(--border);
}

/* published — zielony, spójny z --success (#22c55e) */
.kp-status-pill--published {
    background: rgba(34, 197, 94, .12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, .25);
}

/* pending — żółty/amber */
.kp-status-pill--pending {
    background: rgba(251, 191, 36, .10);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, .22);
}

/* cancelled — czerwony */
.kp-status-pill--cancelled {
    background: rgba(248, 113, 113, .10);
    color: #f87171;
    border-color: rgba(248, 113, 113, .22);
}

/* link do opublikowanej wizytówki */
.kp-wiz-link {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.kp-wiz-link:hover {
    text-decoration: underline;
    opacity: .85;
}

/* Filter bar */
.kp-filter-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.kp-filter-bar .kp-input {
    flex: 1;
}

.kp-filter-count {
    font-size: .8125rem;
    color: var(--zinc-500);
    white-space: nowrap;
    min-width: 4rem;
    text-align: right;
}

.kp-filter-empty {
    font-size: .875rem;
    color: var(--zinc-500);
    padding: .75rem 0;
}

/* Portal grid */
.kp-portals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .625rem;
}

.kp-portal-card {
    display: block;
    padding: 1rem;
    background: var(--zinc-900);
    border: 1px solid var(--border);
    border-radius: var(--r);
    text-decoration: none;
    color: var(--white);
    transition: border-color .15s, background .15s;
}

.kp-portal-card:hover {
    border-color: rgba(255,255,255,.2);
    background: var(--bg-hover);
}

.kp-portal-card:hover .kp-portal-card__cta {
    color: var(--white);
}

.kp-portal-card__name {
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.kp-portal-card__city {
    font-size: .75rem;
    color: var(--zinc-500);
    margin-top: .25rem;
}

.kp-portal-card__domain {
    font-size: .6875rem;
    color: var(--zinc-600);
    margin-top: .1875rem;
    font-weight: 400;
    letter-spacing: 0;
}

.kp-portal-card__cta {
    margin-top: .875rem;
    font-size: .75rem;
    font-weight: 500;
    color: var(--zinc-400);
    letter-spacing: -.01em;
    transition: color .15s;
}

/* ─── Footer — identyczny z vestigio.ai ─────────────────────────────────────── */

.vd-footer {
    background: var(--black);
    padding-block: 3rem 4rem;
}

.vd-footer__inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.vd-footer__col {
    display: flex;
    flex-direction: column;
}

.vd-footer__col p,
.vd-footer__col a {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.75rem;
    letter-spacing: .025em;
    text-decoration: none;
    transition: opacity .15s;
}

.vd-footer__col a:hover { opacity: 1; }

/* Linkedin — podkreślenie z before, identyczne z oryginałem */
.vd-footer__linkedin {
    position: relative;
    width: fit-content;
    margin-top: 0.5rem; /* mt-2 = 8px — identyczny gap jak na vestigio.ai */
}

.vd-footer__linkedin::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--white);
}

/* Loga col — wyrównanie do prawej */
.vd-footer__col--logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.vd-footer__logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* ─── Page content ───────────────────────────────────────────────────────────── */

.vd-page-content {
    color: var(--zinc-400);
    line-height: 1.7;
    font-size: .9375rem;
}

.vd-page-content h1, .vd-page-content h2, .vd-page-content h3 {
    color: var(--white);
    font-weight: 700;
    letter-spacing: -.03em;
    margin-bottom: .625rem;
}

.vd-page-content p { margin-bottom: 1rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

/* Desktop nav: h-20 = 80px */
@media (min-width: 768px) {
    .vd-header__inner { height: 80px; }
}

/* H1 responsive: sm=36px md=48px lg=64px */
@media (min-width: 640px) {
    .vd-hero__title { font-size: 2.25rem; }   /* 36px */
}
@media (min-width: 768px) {
    .vd-hero__title { font-size: 3rem; }       /* 48px — text-5xl */
}
@media (min-width: 1024px) {
    .vd-hero__title { font-size: 4rem; }       /* 64px */
}

@media (max-width: 768px) {
    .vd-main {
        padding-top: 90px; /* pt-[90px] — vestigio.ai mobile */
        padding-bottom: 3.5rem;
    }

    .vd-hero { padding-bottom: 1.75rem; margin-bottom: 2rem; }

    .klient-panel__intro { padding: 1.5rem; }

    .kp-token-form { flex-direction: column; }
    .kp-btn-primary { text-align: center; }

    .kp-slots { gap: .5rem; }
    .kp-slot__num { font-size: 1.75rem; }

    .vd-footer__inner {
        flex-direction: column;
        gap: 2rem;
    }

    .vd-footer__col p,
    .vd-footer__col a {
        font-size: 1rem;
        line-height: 1.5rem;
    }
}

@media (max-width: 480px) {
    .vd-logo__img { height: 22px; }

    .kp-portals {
        grid-template-columns: 1fr;
    }
}
