/* register.php — light portal theme (aligned with /portal/index.html + portal-light.css) */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink-950: #151824;
    --ink-800: #3d4653;
    --ink-600: #586576;
    --ink-500: #6f7d8f;
    --ink-200: #eef0f2;
    --ink-100: #f3f4f6;
    --ink-50: #f7f8f9;
    --brand-700: #5b4fc7;
    --brand-600: #667eea;
    --brand-200: #c7d2fe;
    --brand-50: #f0f1ff;
    --accent-popular: #ff6d5a;
    --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --radius-card: 16px;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: var(--ink-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* —— Top bar (site header lite) —— */
.register-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ink-200);
    box-shadow: 0 10px 40px -18px rgba(26, 26, 46, 0.15);
}

.register-topbar__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.register-topbar__logo img {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.register-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-600);
    text-decoration: none;
    border: 1px solid var(--ink-200);
    background: #fff;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.register-back-link:hover {
    color: var(--brand-700);
    border-color: rgba(102, 126, 234, 0.35);
    background: rgba(102, 126, 234, 0.06);
}

/* —— Shell (white page, dark cards) —— */
.cloud-hub-shell {
    position: relative;
    background: var(--ink-50);
    color: var(--ink-800);
}

.cloud-hub-shell__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 4rem;
}

.cloud-hub-hero {
    text-align: center;
    padding: 2rem 20px 3rem;
}

.cloud-hub-hero__eyebrow {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.25);
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--brand-700);
    font-weight: 600;
    margin-bottom: 24px;
}

.cloud-hub-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.cloud-hub-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #4b5563;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.cloud-hub-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.cloud-hub-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fc;
    border: 1px solid var(--ink-200);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-950);
}

.cloud-hub-features li span {
    font-size: 16px;
}

.cloud-hub-category {
    margin-bottom: 3rem;
}

.cloud-hub-category__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ink-200);
    flex-wrap: wrap;
}

.cloud-hub-category__icon {
    font-size: 28px;
    line-height: 1;
}

.cloud-hub-category__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin: 0;
}

.cloud-hub-category__count {
    background: rgba(102, 126, 234, 0.12);
    color: var(--brand-700);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
}

.register-category-desc {
    width: 100%;
    color: var(--ink-600);
    font-size: 15px;
    margin-top: -4px;
}

.cloud-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

@media (min-width: 1200px) {
    .cloud-hub-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Plan cards — light tiles (same as /portal/index.html cloud-apps) */
.cloud-hub-card.plan-card {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-card);
    padding: 24px;
    color: var(--ink-800);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cloud-hub-card.plan-card::before {
    display: none;
}

.cloud-hub-card.plan-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-200);
    box-shadow: var(--shadow-card-hover);
}

.cloud-hub-card.plan-card.is-recommended {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.18), var(--shadow-card);
}

.cloud-hub-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cloud-hub-badge--popular {
    background: var(--brand-50);
    color: var(--brand-700);
}

.cloud-hub-card__icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 12px;
    background: var(--brand-50);
    border: 1px solid var(--ink-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: none;
}

.cloud-hub-card__icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cloud-hub-card__name {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 12px;
    color: var(--ink-950);
    transition: color 0.2s ease;
}

.cloud-hub-card.plan-card:hover .cloud-hub-card__name {
    color: var(--brand-700);
}

.plan-price-wrap {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 18px;
}

.plan-price-old {
    font-size: 15px;
    color: var(--ink-500);
    text-decoration: line-through;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ink-950);
    letter-spacing: -0.02em;
}

.plan-price span {
    font-size: 16px;
    color: var(--ink-600);
    font-weight: 500;
}

.plan-price-rules {
    font-size: 12px;
    color: var(--ink-500);
    margin-top: 8px;
    font-style: italic;
}

.plan-quota {
    position: relative;
    z-index: 1;
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.plan-quota-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink-950);
}

.plan-quota-label {
    font-size: 12px;
    color: var(--ink-500);
    font-weight: 600;
    margin-top: 4px;
}

.plan-description {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--ink-600);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 14px;
}

.plan-overage {
    position: relative;
    z-index: 1;
    text-align: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 16px;
}

.plan-features {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
    flex: 1;
}

.plan-feature {
    padding: 8px 0;
    color: var(--ink-600);
    font-size: 13px;
    border-bottom: 1px solid var(--ink-200);
}

.plan-feature:last-child {
    border-bottom: none;
}

.security-badge {
    position: relative;
    z-index: 1;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.cloud-hub-cta__btn,
.btn-primary {
    position: relative;
    z-index: 1;
    display: inline-block;
    width: 100%;
    background: var(--gradient-brand);
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    font-family: inherit;
}

.cloud-hub-cta__btn:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
}

.btn-contact {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* State / banners — light surfaces */
.state-card,
.module-download-banner {
    background: #f8f9fc;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-card);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.state-card {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.state-card h2 {
    font-size: 1.35rem;
    color: var(--ink-950);
    margin-bottom: 12px;
}

.state-card p {
    color: var(--ink-600);
}

.state-card code {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--ink-200);
    font-size: 12px;
    color: var(--ink-600);
    word-break: break-all;
}

.module-download-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.module-download-banner h2 {
    font-size: 1.15rem;
    color: var(--ink-950);
    margin-bottom: 8px;
}

.module-download-banner p {
    color: var(--ink-600);
    font-size: 14px;
    line-height: 1.55;
}

.module-download-meta {
    font-size: 12px;
    color: var(--ink-400);
    margin-top: 8px;
}

.btn-module-download {
    display: inline-block;
    background: #fff;
    color: #15803d;
    border: 1px solid #86efac;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-module-download:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
}

.register-footer {
    text-align: center;
    padding: 2.5rem 20px;
    border-top: 1px solid var(--ink-200);
    margin-top: 3rem;
    color: var(--ink-600);
}

.register-footer a {
    color: var(--brand-700);
    text-decoration: none;
    margin: 0 12px;
}

.register-footer a:hover {
    color: var(--brand-800);
}

/* —— Modal (light) —— */
#modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.45);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

#subscription-form {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 560px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--ink-200);
    padding: 36px 32px;
    border-radius: var(--radius-card);
    box-shadow: 0 24px 64px rgba(26, 26, 46, 0.18);
    z-index: 1001;
    color: var(--ink-950);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: var(--ink-100);
    border: 1px solid var(--ink-200);
    font-size: 22px;
    color: var(--ink-600);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--ink-200);
    color: var(--ink-950);
}

.modal-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.35rem;
    color: var(--ink-950);
}

.plan-summary {
    background: var(--gradient-brand);
    color: white;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.plan-summary h3 {
    margin: 0 0 10px;
    font-size: 15px;
    opacity: 0.9;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--ink-200);
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    color: var(--ink-950);
    transition: border 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-700);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.client-type-grid {
    display: flex;
    gap: 12px;
}

.client-type-card {
    flex: 1;
    border: 1px solid var(--ink-200);
    background: #fff;
    color: var(--ink-600);
    padding: 18px 12px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.client-type-card.is-active {
    border-color: var(--brand-700);
    background: rgba(102, 126, 234, 0.08);
    color: var(--ink-950);
}

.client-type-card .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.auto-detect-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.55;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ink-600);
}

.terms-label a {
    color: var(--brand-700);
}

.form-hint {
    color: var(--ink-400);
    font-size: 12px;
    display: block;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .cloud-hub-grid {
        grid-template-columns: 1fr;
    }

    .cloud-hub-category__count {
        margin-left: 0;
    }

    .register-topbar__inner {
        flex-wrap: wrap;
    }
}
