:root {
    --navy-950: #07152f;
    --navy-900: #0a1e46;
    --blue-700: #1559d6;
    --blue-600: #176bff;
    --blue-500: #2584ff;
    --cyan-500: #12a8e8;
    --green-600: #0f9f6e;
    --slate-900: #172033;
    --slate-700: #43506a;
    --slate-500: #6f7b91;
    --slate-200: #dfe5ef;
    --surface: #ffffff;
    --page: #f4f7fc;
    --shadow: 0 18px 45px rgba(17, 38, 77, 0.09);
}
* { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 132, 255, 0.12), transparent 30rem),
        radial-gradient(circle at 95% 10%, rgba(18, 168, 232, 0.09), transparent 28rem),
        var(--page);
    color: var(--slate-900);
    line-height: 1.5;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 70px;
    background: linear-gradient(115deg, rgba(7, 21, 47, 0.98), rgba(10, 30, 70, 0.97));
    color: #fff;
    padding: 14px max(24px, calc((100vw - 1080px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 30px rgba(7, 21, 47, 0.2);
    backdrop-filter: blur(12px);
}
.topbar > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}
.topbar a, .nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 9px;
    transition: background-color 160ms ease, color 160ms ease;
}
.topbar a:hover, .topbar a.active, .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
    min-width: 0;
}
.topbar .brand::before {
    content: "V";
    display: inline-flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--blue-500), var(--cyan-500));
    color: #fff;
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(23, 107, 255, 0.35);
}
.nav-logout { margin: 0; }
.nav-link {
    min-height: auto;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
}
.nav-link:hover {
    transform: none;
    filter: none;
    box-shadow: none;
}
.container {
    width: 100%;
    max-width: 900px;
    margin: 42px auto;
    padding: 0 20px;
}
.container-narrow { max-width: 650px; }
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(122, 139, 170, 0.16);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    min-width: 0;
}
.hero-card, .dashboard-hero, .auth-card, .loyalty-card { overflow: hidden; }
.hero-card::after, .dashboard-hero::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -95px;
    top: -105px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(23, 107, 255, 0.14), rgba(18, 168, 232, 0.05));
    pointer-events: none;
}
.hero-card > *, .dashboard-hero > * { position: relative; z-index: 1; }
.auth-card { border-top: 4px solid var(--blue-500); }
.loyalty-card { border-top: 4px solid var(--green-600); }
.card-soft { background: rgba(255, 255, 255, 0.75); }
.share-card { border-left: 4px solid var(--blue-500); }
.login-logo {
    display: flex;
    min-height: 110px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.login-logo img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto;
}
h1 {
    font-size: clamp(25px, 4vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.035em;
    margin: 0 0 12px;
    color: var(--navy-950);
}
h2 {
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--navy-900);
}
p { margin-top: 0; }
a { color: var(--blue-700); }
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 14px;
    color: var(--slate-700);
}
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid var(--slate-200);
    border-radius: 11px;
    background: #fbfcff;
    color: var(--slate-900);
    font: inherit;
    font-size: 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
input::placeholder, textarea::placeholder { color: #9ba6b8; }
input:focus, select:focus, textarea:focus {
    border-color: var(--blue-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 132, 255, 0.12);
    outline: none;
}
button, .btn {
    display: inline-block;
    min-height: 44px;
    margin-top: 18px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
    touch-action: manipulation;
    box-shadow: 0 9px 20px rgba(23, 107, 255, 0.22);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
button:hover, .btn:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(23, 107, 255, 0.28);
}
.btn-secondary {
    background: linear-gradient(135deg, #58657a, #3d495d);
    box-shadow: 0 9px 20px rgba(61, 73, 93, 0.18);
}
.btn-secondary:hover { background: linear-gradient(135deg, #4b576b, #303b4e); }
.btn-success {
    background: linear-gradient(135deg, #14a874, #07885e);
    box-shadow: 0 9px 20px rgba(15, 159, 110, 0.2);
}
.btn-success:hover { background: linear-gradient(135deg, #109b6b, #067b56); }
.btn-danger {
    background: linear-gradient(135deg, #e23d55, #bd2039);
    box-shadow: 0 9px 20px rgba(190, 32, 57, 0.2);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #d7334c, #a91d33);
    box-shadow: 0 12px 24px rgba(190, 32, 57, 0.25);
}
.btn-sm {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    margin-top: 0;
    vertical-align: middle;
}
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
    outline: 3px solid rgba(37, 132, 255, 0.35);
    outline-offset: 2px;
}
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-erro { background: #fff1f2; color: #a3152a; border: 1px solid #fecdd3; }
.alert-sucesso { background: #ecfdf5; color: #087454; border: 1px solid #a7f3d0; }
table {
    display: block;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}
th { color: #6b7280; font-size: 12px; text-transform: uppercase; }
.progress-bg {
    background: #e8edf5;
    border-radius: 999px;
    height: 14px;
    width: 100%;
    overflow: hidden;
}
.progress-fill {
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
    height: 100%;
    border-radius: inherit;
    transition: width 400ms ease;
}
.progress-fill.completo { background: linear-gradient(90deg, #10a974, #35c98e); }
.selo {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9eef6;
    color: #8591a5;
    font-size: 13px;
    margin: 0;
}
.selo.marcado {
    background: linear-gradient(145deg, var(--blue-600), var(--cyan-500));
    color: #fff;
    box-shadow: 0 7px 15px rgba(23, 107, 255, 0.2);
}
.link-simple { font-size: 14px; }
.muted { color: var(--slate-500); font-size: 13px; }
.badge-ok, .badge-pendente {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-ok { background:#dcfce7; color:#166534; }
.badge-pendente { background:#fef3c7; color:#92400e; }
.copybox {
    background: linear-gradient(135deg, #f5f8ff, #f0f7ff);
    border: 1px dashed #84aaf1;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 13px;
    word-break: break-all;
    color: var(--blue-700);
}
.client-card {
    background: linear-gradient(145deg, #ffffff, #f9fbff);
    box-shadow: none;
    border: 1px solid #e4eaf4;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.client-card:hover {
    border-color: #c9d8f3;
    box-shadow: 0 14px 30px rgba(24, 55, 105, 0.07);
    transform: translateY(-1px);
}
.client-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.progress-spaced { margin-top: 8px; }
.client-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.client-actions form { margin: 0; }
.stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.eyebrow {
    margin-bottom: 7px;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.danger-zone {
    border-top: 4px solid #dc354d;
}
.account-details {
    margin: 22px 0 0;
}
.account-details > div {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) 1.3fr;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid #e8edf5;
}
.account-details > div:last-child { border-bottom: 0; }
.account-details dt {
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}
.account-details dd {
    margin: 0;
    color: var(--slate-900);
    font-weight: 600;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.checkbox-label input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue-600);
}
input[readonly] {
    background: #eef2f7;
    color: var(--slate-500);
}
.deletion-note { margin: 18px 0 0; }
.deletion-success { text-align: center; }
.success-icon {
    display: inline-flex;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #087454;
    font-size: 28px;
    font-weight: 800;
}
code {
    padding: 3px 6px;
    border-radius: 6px;
    background: #edf2f8;
    font-size: 0.9em;
    word-break: break-all;
}
.legal-content h2 { margin-top: 30px; }
.legal-content p { color: var(--slate-700); }
.site-footer {
    width: min(100% - 32px, 1060px);
    margin: auto auto 0;
    padding: 24px 0 28px;
    border-top: 1px solid rgba(122, 139, 170, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--slate-500);
    font-size: 13px;
}
.site-footer > div {
    display: flex;
    flex-direction: column;
}
.site-footer strong { color: var(--navy-900); }
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}
.site-footer a {
    color: var(--slate-700);
    font-weight: 600;
    text-decoration: none;
}
.site-footer a:hover { color: var(--blue-700); }

@media (max-width: 640px) {
    .topbar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 12px;
    }
    .topbar .brand {
        justify-content: center;
        text-align: center;
        font-size: 17px;
    }
    .topbar > div:last-child {
        justify-content: center;
        gap: 6px;
        width: 100%;
    }
    .topbar a, .nav-link {
        padding: 8px 10px;
        border-radius: 7px;
    }
    .container {
        margin: 20px auto;
        padding: 0 12px;
    }
    .card {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    .login-logo {
        margin-bottom: 18px;
    }
    .login-logo img { max-width: 300px; }
    .card > .btn,
    .card form > button,
    .card form > .btn {
        width: 100%;
    }
    .card form > .btn { margin-top: 8px; }
    .client-card > strong,
    .client-card > .muted {
        display: block;
    }
    .client-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .client-actions form,
    .client-actions button,
    .client-actions .btn {
        width: 100%;
    }
    .client-actions .btn-sm { min-height: 44px; }
    .account-details > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 22px;
    }
    .site-footer nav {
        justify-content: flex-start;
        gap: 10px 16px;
    }
}

@media (max-width: 380px) {
    .topbar a, .nav-link {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 13px;
    }
    .card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
