/* ====== AUTH SCREEN ====== */
.auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}
.auth::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 900px; height: 900px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.auth__inner {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}
.auth__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
    transition: color 0.2s;
}
.auth__back:hover { color: var(--text); }
.auth__back svg { width: 18px; height: 18px; }

.auth__card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
}
.auth__logo {
    width: 56px; height: 56px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
}
.auth__logo img { width: 100%; height: 100%; object-fit: contain; }
.auth__title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 6px;
}
.auth__subtitle {
    font-size: 15px;
    color: var(--text-2);
    text-align: center;
    margin-bottom: 28px;
}

/* ====== FORM FIELDS ====== */
.auth__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.auth__form--hidden { display: none; }

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: -0.01em;
}
.field__input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s var(--ease);
}
.field__input::placeholder { color: var(--text-3); }
.field__input:focus {
    outline: none;
    border-color: var(--text-2);
    background: var(--bg-3);
}
.field__input.invalid {
    border-color: #ef4444;
}
.field__error {
    font-size: 12px;
    color: #ef4444;
    min-height: 0;
    transition: min-height 0.2s;
}
.field__error:not(:empty) { min-height: 14px; }

.field__pass {
    position: relative;
}
.field__pass .field__input { padding-right: 48px; }
.field__toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 8px;
    display: flex;
    transition: color 0.2s;
}
.field__toggle:hover { color: var(--text); }
.field__toggle svg { width: 20px; height: 20px; }

.auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.auth__link {
    color: var(--text-2);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.auth__link:hover { color: var(--text); }

/* Checkbox */
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
    width: 18px; height: 18px;
    border: 1px solid var(--border-2);
    border-radius: 5px;
    background: var(--bg);
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}
.check input:checked + .check__box {
    background: var(--white);
    border-color: var(--white);
}
.check input:checked + .check__box::after {
    content: '';
    position: absolute;
    top: 2px; left: 5px;
    width: 5px; height: 9px;
    border: solid var(--black);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth__switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-2);
    margin-top: 4px;
}
.auth__switch a {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ====== DASHBOARD ====== */
.dash { display: none; }
.dash.active { display: block; }
.auth.hidden { display: none; }

.nav--dash { position: fixed; }
.dash__user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
}
.dash__user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.dash__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
}
.dash__nav-link {
    color: var(--text-2) !important;
    font-size: 14px;
    transition: color 0.2s;
}
.dash__nav-link.active,
.dash__nav-link:hover { color: var(--text) !important; }

.dash__main {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
}
.dash__welcome {
    margin-bottom: 40px;
}
.dash__welcome h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.dash__welcome p {
    color: var(--text-2);
    font-size: 16px;
}

/* Stats */
.dash__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 64px;
}
.dash__stat {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.2s var(--ease);
}
.dash__stat:hover { border-color: var(--border-2); }
.dash__stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.dash__stat-val {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.dash__stat-val--ok { color: #4ade80; }

/* Sections */
.dash__section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 100px;
}
.dash__section:first-of-type { border-top: none; padding-top: 0; }
.dash__section-head {
    margin-bottom: 32px;
}
.dash__section-head h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.dash__section-head p {
    color: var(--text-2);
    font-size: 15px;
}

/* Download */
.download__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.download__card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s var(--ease);
    position: relative;
}
.download__card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
}
.download__card--featured {
    border-color: var(--text-2);
}
.download__card--featured:hover {
    border-color: var(--text);
}
.download__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    color: var(--black);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
}
.download__icon {
    width: 44px; height: 44px;
    background: var(--white);
    color: var(--black);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.download__icon svg { width: 22px; height: 22px; }
.download__info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.download__ver {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 100px;
}
.download__info p {
    font-size: 13px;
    color: var(--text-2);
}
.download__btn {
    margin-top: auto;
}
.download__btn svg { width: 18px; height: 18px; }

.download__key {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.download__key-label {
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
}
.download__key-val {
    display: flex;
    align-items: center;
    gap: 12px;
}
.download__key-val code {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.05em;
    background: var(--bg);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-2);
}

.download__steps {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
}
.download__steps h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
}
.download__steps ol {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.download__steps li {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
}

/* License */
.license__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.license__card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
}
.license__card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.license__plan {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}
.license__until {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 20px;
}

/* Settings */
.settings__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.settings__card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.settings__card h3 {
    font-size: 17px;
    font-weight: 700;
}
.settings__danger {
    background: var(--bg-2);
    border: 1px solid #3a1a1a;
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.settings__danger h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f87171;
}
.settings__danger .btn { border-color: #3a1a1a; color: #f87171; }
.settings__danger .btn:hover { background: #2a1010; border-color: #5a2a2a; }

/* ====== TOAST ====== */
.toast {
    position: fixed;
    bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--white);
    color: var(--black);
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 10000;
    transition: transform 0.4s var(--ease);
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}
.toast.error {
    background: #ef4444;
    color: var(--white);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 960px) {
    .dash__stats { grid-template-columns: repeat(2, 1fr); }
    .download__grid { grid-template-columns: 1fr; }
    .license__grid, .settings__grid { grid-template-columns: 1fr; }
    .dash__user-name { display: none; }
}
@media (max-width: 640px) {
    .auth__card { padding: 32px 24px; }
    .dash__stats { grid-template-columns: 1fr; }
    .download__key { flex-direction: column; align-items: stretch; }
    .download__key-val { justify-content: space-between; }
    .dash__section { padding: 40px 0; }
    .dash__main { padding-top: 100px; }
}
/* footer inside dashboard */
.footer--dash {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 22px 0;
    background: transparent;
}
.footer--dash .footer__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}
.footer--dash .footer__links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer--dash .footer__links a { color: var(--text-3); font-size: 13px; }
.footer--dash .footer__links a:hover { color: var(--text); }
.footer--dash .footer__copy { color: var(--text-3); font-size: 12px; }
