html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --app-header-h: 72px;
    --app-footer-h: 98px;
    --app-footer-h-compact: 34px;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

    body.app-shell {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        background: #f4f7fb;
        color: #1f2937;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
    }

        body.app-shell.mapcad-page {
            height: 100dvh;
            min-height: 100dvh;
            overflow: hidden;
        }

.app-header {
    position: sticky;
    top: 0;
    z-index: 3000;
}

.app-navbar {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    min-height: 72px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.navbar-brand {
    color: #ffffff !important;
    letter-spacing: 0.01em;
}

.brand-badge {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.14);
}

.brand-text {
    color: #ffffff;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.84);
    font-weight: 500;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    position: relative;
}

    .navbar-dark .navbar-nav .nav-link:hover,
    .navbar-dark .navbar-nav .nav-link:focus,
    .navbar-dark .navbar-nav .nav-link.active {
        color: #ffffff;
    }

        .navbar-dark .navbar-nav .nav-link.active::after {
            content: "";
            position: absolute;
            left: 0.9rem;
            right: 0.9rem;
            bottom: 0.3rem;
            height: 2px;
            border-radius: 999px;
            background: rgba(255,255,255,0.95);
        }

.navbar-toggler {
    border-color: rgba(255,255,255,0.22);
}

    .navbar-toggler:focus,
    .btn:focus,
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    }

.dropdown-menu {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.55rem 0.8rem;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: #eff6ff;
        color: #1d4ed8;
    }

    .dropdown-item.active,
    .dropdown-item:active {
        background: #dbeafe;
        color: #1e3a8a;
    }

.app-main {
    flex: 1 0 auto;
    width: 100%;
    min-height: 0;
}

.app-main-mapcad {
    overflow: hidden;
}

.app-footer {
    flex-shrink: 0;
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

    .app-footer a {
        color: #1d4ed8;
        font-weight: 500;
        text-decoration: none;
    }

        .app-footer a:hover {
            color: #1e40af;
            text-decoration: underline;
        }

.app-footer-compact {
    min-height: 30px;
    display: flex;
    align-items: center;
}

    .app-footer-compact .container-fluid {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .app-footer-compact .d-flex {
        min-height: 34px;
        align-items: center !important;
    }

    .app-footer-compact .small {
        font-size: 0.76rem;
        line-height: 1;
        margin: 0;
    }

    .app-footer-compact a {
        line-height: 1;
        padding: 0;
    }

    .app-footer-compact .text-muted {
        line-height: 1;
        margin: 0;
    }

a {
    color: #1d4ed8;
    transition: color 0.2s ease, opacity 0.2s ease;
}

    a:hover {
        color: #1e40af;
    }

img {
    max-width: 100%;
    height: auto;
}

.text-muted {
    color: #6b7280 !important;
}

.border-top {
    border-top: 1px solid #e5e7eb !important;
}

.border-bottom {
    border-bottom: 1px solid #e5e7eb !important;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: linear-gradient(135deg, #1d4ed8, #1e40af);
        transform: translateY(-1px);
    }

.btn-outline-light:hover {
    color: #0f172a;
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: #334155;
}

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus {
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #1f2937;
    }

.btn-outline-danger {
    border-color: #fca5a5;
    color: #b91c1c;
}

    .btn-outline-danger:hover,
    .btn-outline-danger:focus {
        background: #fef2f2;
        color: #991b1b;
        border-color: #fca5a5;
    }

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #d6deea;
    min-height: 46px;
    color: #1f2937;
    background-color: #ffffff;
}

    .form-control::placeholder,
    textarea::placeholder {
        color: #94a3b8;
    }

textarea.form-control {
    min-height: 120px;
}

.product-card,
.summary-card,
.app-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.product-card {
    overflow: hidden;
}

.product-card-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #fff;
    font-weight: 700;
}

.product-card-body,
.summary-card,
.app-card-body {
    padding: 1.25rem;
}

.app-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
    background: #fbfdff;
}

.app-card-title {
    margin: 0;
    color: #17324d;
    font-size: 1.05rem;
    font-weight: 800;
}

.feature-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f7;
    font-weight: 500;
}

    .feature-item:last-child {
        border-bottom: none;
    }

.landing-page .hero-section {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30%), linear-gradient(180deg, #ffffff 0%, #eff4fb 100%);
    border-bottom: 1px solid #e5e7eb;
}

.hero-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Override full-viewport page wrappers so footer stays in normal flow */
.privacy-page,
.legal-page,
.disc-page,
.sd-page {
    min-height: auto !important;
    padding: 2rem 0 3rem;
}

@media (max-width: 991.98px) {
    :root {
        --app-header-h: 64px;
        --app-footer-h-compact: 34px;
    }

    .app-navbar {
        min-height: auto;
    }

    .navbar-dark .navbar-nav .nav-link.active::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    body.app-shell {
        font-size: 0.95rem;
    }

    .brand-badge {
        width: 32px;
        height: 32px;
        font-size: 0.88rem;
    }

    .product-card-body,
    .summary-card,
    .app-card-body {
        padding: 1rem;
    }

    .privacy-page,
    .legal-page,
    .disc-page,
    .sd-page {
        padding: 1.25rem 0 2rem;
    }

    .app-footer-compact .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
      
}
