:root {
    --landing-nav-height: 58px;
    --landing-bg: #ffffff;
    --landing-bg-soft: #f8fafc;
    --landing-bg-subtle: #fafafa;
    --landing-border: #ececec;
    --landing-text: #111827;
    --landing-muted: #6b7280;
    --landing-muted-dark: #4b5563;
    --landing-red: #db2828;
    --landing-red-dark: #b91c1c;
    --landing-radius-xl: 28px;
    --landing-radius-lg: 22px;
    --landing-radius-md: 16px;
    --landing-radius-sm: 12px;
    --landing-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --landing-shadow-card: 0 8px 22px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   Shared landing layout
   ========================================================= */

.landing-page-offset {
    padding-top: 5.5rem !important;
}

.landing-header-region,
.landing-main-content,
.landing-footer-region {
    width: 100%;
}

.landing-page,
.login-page,
.register-page {
    padding: 5.5rem 0 3rem 0;
}

.landing-page {
    padding-bottom: 2rem;
}

.landing-shell,
.login-shell,
.register-shell {
    width: 92%;
    margin: 0 auto;
}

.landing-shell {
    max-width: 1100px;
}

.login-shell {
    max-width: 980px;
}

.register-shell {
    max-width: 1100px;
}

.landing-footer-messages {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    display: grid;
    gap: 0.85rem;
}

.landing-footer-messages .message,
.landing-footer-messages .ui.message,
.landing-footer-messages .success,
.landing-footer-messages .error,
.landing-footer-messages .warning,
.landing-footer-messages .info,
.messages-wrap .message,
.messages-wrap .errorlist,
.messages-wrap .success,
.messages-wrap .error,
.messages-wrap .warning,
.messages-wrap .info,
.auto-hide-message {
    border-radius: var(--landing-radius-md) !important;
    box-shadow: var(--landing-shadow-card);
    line-height: 1.6;
}

.landing-footer-messages .message,
.landing-footer-messages .ui.message,
.landing-footer-messages .success,
.landing-footer-messages .error,
.landing-footer-messages .warning,
.landing-footer-messages .info {
    font-size: 1rem;
}

.messages-wrap {
    margin-top: 1rem;
}

/* =========================================================
   Shared cards, headings and notices
   ========================================================= */

.login-brand-card,
.login-form-card,
.register-info-card,
.register-form-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius-lg);
    box-shadow: var(--landing-shadow-soft);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.login-brand-card,
.register-info-card {
    background: linear-gradient(135deg, var(--landing-bg-soft), var(--landing-bg));
    display: flex;
    flex-direction: column;
}

.login-brand-card {
    justify-content: center;
}

.register-info-card {
    justify-content: space-between;
}

.login-brand-inner,
.login-form-inner,
.register-info-inner,
.register-form-inner {
    padding: 1.75rem;
}

.login-title,
.register-title,
.activation-title {
    margin: 0;
    color: var(--landing-text);
    font-weight: 700;
}

.login-title,
.activation-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-title,
.register-title {
    font-size: 2rem;
}

.activation-title {
    font-size: 1.9rem;
}

.login-subtitle,
.register-subtitle,
.activation-subtitle,
.form-subtitle {
    color: var(--landing-muted);
    line-height: 1.6;
}

.login-subtitle,
.register-subtitle,
.activation-subtitle {
    margin-top: 0.75rem;
    font-size: 1rem;
}

.form-header {
    margin-bottom: 1.25rem;
}

.form-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--landing-text);
}

.form-subtitle {
    margin-top: 0.35rem;
    font-size: 0.92rem;
}

.login-badge,
.register-badge,
.activation-badge,
.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.login-badge {
    background: #f3f4f6;
    color: #374151;
}

.register-badge {
    background: #ecfeff;
    color: #0f766e;
}

.activation-badge {
    background: #fef2f2;
    color: var(--landing-red-dark);
}

.landing-badge {
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: var(--landing-red-dark);
    font-size: 0.88rem;
}

.login-notice,
.notice-card,
.requirements-card,
.activation-notice {
    margin-top: 1.25rem;
    border-radius: 14px;
    padding: 1rem;
    line-height: 1.7;
}

.login-notice,
.requirements-card {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.notice-card {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.activation-notice {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.login-notice-title,
.notice-card-title,
.requirements-title,
.activation-notice-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.activation-notice-title {
    margin-bottom: 0.4rem;
}

.notice-card ul,
.requirements-card ul,
.activation-notice ul {
    margin: 0.6rem 0 0 1rem;
    padding: 0;
}

.activation-notice ul {
    margin-top: 0.5rem;
}

.login-submit {
    margin-top: 0.5rem !important;
}

.register-submit,
.activation-submit {
    margin-top: 0.75rem !important;
}

.activation-submit {
    border-radius: var(--landing-radius-sm) !important;
    padding: 0.9rem 1.1rem !important;
    font-weight: 700 !important;
}

/* =========================================================
   Home / index
   ========================================================= */

.landing-hero-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
}

.landing-hero {
    width: 100%;
    background: linear-gradient(135deg, var(--landing-bg), #f8fbff);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius-xl);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.landing-hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0;
    min-height: 540px;
}

.landing-copy {
    padding: 3rem 3rem 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-logo-wrap {
    margin-bottom: 1.5rem;
}

.landing-logo {
    width: 237px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.landing-title {
    margin: 0;
    font-size: 2.6rem;
    line-height: 1.1;
    color: var(--landing-text);
    font-weight: 800;
}

.landing-subtitle {
    margin-top: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--landing-muted-dark);
    max-width: 650px;
}

.landing-points {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.8rem;
}

.landing-point {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: #374151;
    font-size: 0.96rem;
}

.landing-point i {
    color: var(--landing-red);
    margin-top: 0.15rem !important;
}

.landing-side {
    background: linear-gradient(160deg, #111827, #1f2937);
    color: #f9fafb;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.landing-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.08), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.06), transparent 28%);
    pointer-events: none;
}

.landing-side-content {
    position: relative;
    z-index: 1;
}

.landing-side-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--landing-radius-lg);
    padding: 1.4rem 1.2rem;
    backdrop-filter: blur(8px);
}

.landing-side-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.landing-side-text {
    margin: 0;
    color: #d1d5db;
    line-height: 1.7;
    font-size: 0.95rem;
}

.landing-messages {
    margin-bottom: 1rem;
}

/* =========================================================
   Login
   ========================================================= */

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

/* =========================================================
   Register
   ========================================================= */

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.25rem;
    align-items: stretch;
}

/* =========================================================
   Activation
   ========================================================= */

.activation-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0 3rem 0;
}

.activation-shell {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.activation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.activation-info-card,
.activation-form-card {
    background: var(--landing-bg);
    border: 1px solid var(--landing-border);
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.activation-info-card {
    background: linear-gradient(135deg, var(--landing-bg-soft), var(--landing-bg));
}

.activation-info-inner,
.activation-form-inner {
    padding: 1.5rem;
}

/* =========================================================
   Navigation
   ========================================================= */

.landing-nav-shell {
    position: relative;
    z-index: 3000;
}

.landing-top-nav {
    min-height: var(--landing-nav-height) !important;
    padding: 0 0.75rem;
    background: rgba(17, 24, 39, 0.94) !important;
    backdrop-filter: blur(8px);
    border: none !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14) !important;
    z-index: 3000 !important;
}

.landing-brand-item {
    padding-right: 1rem !important;
}

.landing-brand-favicon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.landing-nav-links {
    display: flex;
    align-items: center;
}

.landing-nav-item {
    font-size: 0.93rem !important;
    font-weight: 600 !important;
    color: #f9fafb !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    border-radius: 10px;
    transition: background 0.18s ease, color 0.18s ease;
}

.landing-top-nav .item:hover,
.landing-top-nav .dropdown.item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
}

.landing-top-nav .item i.icon {
    margin: 0 !important;
}

.landing-top-nav .right.menu .menu {
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.14) !important;
}

.landing-mobile-toggle {
    position: relative;
    z-index: 3002;
    margin-left: auto;
    min-height: 38px;
    padding: 0.7rem 0.9rem;
    border-radius: var(--landing-radius-sm);
    border: none;
    background: transparent;
    color: #f9fafb;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.landing-mobile-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.landing-mobile-panel {
    display: none;
    position: fixed;
    top: var(--landing-nav-height);
    left: 0;
    right: 0;
    background: #111827;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    padding: 0.8rem;
    z-index: 3001;
}

.landing-mobile-panel.open {
    display: block;
}

.landing-mobile-links {
    display: grid;
    gap: 0.45rem;
}

.landing-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    border-radius: var(--landing-radius-sm);
    color: #f9fafb;
    text-decoration: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
}

.landing-mobile-link:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.landing-mobile-link i.icon {
    margin-right: 0.55rem !important;
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* =========================================================
   Footer
   ========================================================= */

.landing-footer {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1rem 0 1.25rem 0;
}

.landing-footer-inner {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(8px);
    color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.2rem;
    flex-wrap: wrap;
}

.landing-footer-left {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #e5e7eb;
    font-size: 0.92rem;
}

.landing-footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-footer-link {
    color: #f9fafb;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    opacity: 0.92;
    transition: opacity 0.18s ease, color 0.18s ease;
}

.landing-footer-link:hover {
    color: #ffffff;
    opacity: 1;
}

/* =========================================================
   Responsive
   ========================================================= */

@media only screen and (max-width: 1100px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
}

@media only screen and (max-width: 991px) {
    .landing-hero-wrap {
        min-height: auto;
        display: block;
    }

    .landing-hero-inner {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .landing-copy,
    .landing-side {
        padding: 2rem 1.4rem;
    }

    .landing-title {
        font-size: 2rem;
    }
}

@media only screen and (max-width: 900px) {
    .register-grid {
        grid-template-columns: 1fr;
    }

    .register-title {
        font-size: 1.65rem;
    }
}

@media only screen and (max-width: 850px) {
    .login-grid,
    .activation-grid {
        grid-template-columns: 1fr;
    }

    .login-title {
        font-size: 1.65rem;
    }

    .activation-title {
        font-size: 1.6rem;
    }
}

@media only screen and (max-width: 767px) {
    .landing-page,
    .login-page,
    .register-page,
    .activation-page {
        padding: calc(var(--landing-nav-height) + 1rem) 0 2rem 0;
    }

    .landing-page {
        display: block;
    }

    .landing-page-offset {
        padding-top: calc(var(--landing-nav-height) + 1rem) !important;
    }

    .landing-shell,
    .login-shell,
    .register-shell,
    .activation-shell,
    .landing-footer-messages {
        width: 95%;
        max-width: 100%;
    }

    .landing-hero {
        border-radius: 20px;
    }

    .landing-copy,
    .landing-side {
        padding: 1.5rem 1rem;
    }

    .landing-logo-wrap {
        margin-top: 0;
        margin-bottom: 1.2rem;
    }

    .landing-logo {
        width: 220px;
        max-width: 100%;
    }

    .landing-title {
        font-size: 1.7rem;
    }

    .landing-subtitle {
        font-size: 0.98rem;
    }

    .activation-page {
        min-height: auto;
        align-items: flex-start;
    }

    .login-brand-inner,
    .login-form-inner,
    .register-info-inner,
    .register-form-inner,
    .activation-info-inner,
    .activation-form-inner {
        padding: 1rem;
    }

    .login-title,
    .register-title,
    .activation-title {
        font-size: 1.45rem;
    }

    .landing-footer-inner {
        width: 95%;
        padding: 1rem;
        border-radius: 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-footer-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }
}
