*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #f46a25;
    --primary-dark: #d95316;
    --primary-light: #ff854d;
    --accent: #ff9f43;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* HEADER NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

/* Mobile drawer overlay: always fixed at body level, hidden by default */
.navbar-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.navbar-menu-container.active {
    opacity: 1;
}

.navbar-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    color: var(--text);
}

.navbar-desktop-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    margin-left: 48px;
}

.navbar-desktop-menu .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

/* Desktop nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hamburger Toggle Button Styles */
.mobile-menu-toggle {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.mobile-menu-toggle .hamburger-bar {
    width: 100%;
    height: 2.5px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger animation to 'X' */
.mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.btn-nav-outline {
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    background: transparent;
    cursor: pointer;
}

.btn-nav-outline:hover {
    background: #f1f5f9;
}

.btn-nav-primary {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 10px;
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(244, 106, 37, 0.25);
    transition: all 0.2s;
}

.btn-nav-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* FOOTER */
.footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 64px 0 32px 0;
    color: #64748b;
    font-size: 14px;
    margin-top: auto;
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 48px;
    text-align: left;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
}

.footer-logo-img {
    width: 180px;
    height: auto;
    display: block;
}

.footer-brand-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 320px;
    text-align: left;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary, #f46a25);
    border-color: var(--primary, #f46a25);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 106, 37, 0.25);
}

.footer-nav-col {
    text-align: left;
}

.footer-col-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f172a;
    margin-bottom: 20px;
    text-align: left;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.footer-nav-list a {
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: var(--primary, #f46a25);
    transform: translateX(4px);
}

.footer-seo-block {
    margin-top: 16px;
    margin-bottom: 28px;
    text-align: left;
}

.footer-seo-text {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

.footer-seo-text strong {
    color: #0f172a;
    font-weight: 600;
}

.footer-seo-text a {
    color: var(--primary, #f46a25);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-seo-text a:hover {
    color: var(--primary-dark, #d95316);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    text-align: left;
}

.footer-copyright {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
    text-align: left;
}

/* TENANT LOGIN MODAL POPUP */
.tenant-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tenant-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tenant-modal-card {
    background: #ffffff;
    border: 1px solid rgba(244, 106, 37, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 36px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
    position: relative;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.tenant-modal-overlay.active .tenant-modal-card {
    transform: scale(1) translateY(0);
}

.tenant-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(100, 116, 139, 0.08);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.tenant-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    transform: rotate(90deg);
}

.tenant-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.tenant-modal-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(244, 106, 37, 0.1), rgba(255, 159, 67, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
    color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(244, 106, 37, 0.2);
}

.tenant-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.tenant-modal-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.tenant-modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tenant-input-wrap {
    position: relative;
}

.tenant-modal-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 600;
    outline: none;
    transition: all 0.25s;
    text-align: center;
}

.tenant-modal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(244, 106, 37, 0.12);
    background: #ffffff;
}

.tenant-url-preview {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: -6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-family: monospace;
    word-break: break-all;
    display: inline-block;
    align-self: center;
}

.tenant-url-preview strong {
    color: var(--primary);
}

.btn-tenant-redirect {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(244, 106, 37, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-tenant-redirect:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 106, 37, 0.3);
}

@media(max-width:768px) {
    .navbar {
        z-index: 1000; /* keep normal, overlay will be above */
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 100001; /* above overlay */
        position: relative;
    }

    /* Hide desktop-only nav */
    .navbar-desktop-menu {
        display: none !important;
    }

    .navbar-inner {
        height: 60px;
    }

    /* Override base display:none to show when JS activates */
    .navbar-menu-container.active {
        display: block;
        opacity: 1;
    }

    .navbar-menu-drawer {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85%;
        background: #ffffff;
        box-shadow: -10px 0 35px rgba(15, 23, 42, 0.2);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 60px 24px 30px;
        gap: 28px;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-sizing: border-box;
        overflow: hidden; /* absolutely no scroll */
    }

    .navbar-menu-container.active .navbar-menu-drawer {
        transform: translateX(0);
    }

    .navbar-menu-drawer .nav-links {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        text-align: left;
    }

    .navbar-menu-drawer .nav-links li {
        width: 100%;
    }

    .navbar-menu-drawer .nav-links a {
        font-size: 16px;
        font-weight: 600;
        color: var(--text);
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
        transition: all 0.25s ease;
    }

    .navbar-menu-drawer .nav-links a:hover {
        color: var(--primary);
        padding-left: 8px;
    }

    .navbar-menu-drawer .navbar-actions {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        gap: 16px;
        margin-top: auto;
    }

    .navbar-menu-drawer .navbar-actions .btn-nav-outline,
    .navbar-menu-drawer .navbar-actions .btn-nav-primary {
        width: 100%;
        text-align: center;
        padding: 14px;
        font-size: 15px;
        display: block;
        box-sizing: border-box;
    }

    /* Mobile Footer styling */
    .footer {
        padding: 48px 0 28px 0;
        text-align: left;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        margin-bottom: 36px;
        text-align: left;
    }

    .footer-brand-col {
        align-items: flex-start;
        text-align: left;
    }

    .footer-brand-desc {
        max-width: 100%;
        margin-bottom: 20px;
        text-align: left;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-col-title {
        text-align: left;
        margin-bottom: 14px;
    }

    .footer-nav-list {
        align-items: flex-start;
        text-align: left;
    }

    .footer-nav-list a:hover {
        transform: translateX(4px);
    }

    .footer-bottom {
        justify-content: flex-start;
        text-align: left;
        padding-top: 24px;
    }

    .footer-copyright {
        font-size: 12.5px;
        text-align: left;
    }
}

/* ==========================================
   MODERN TOAST NOTIFICATIONS SYSTEM
   ========================================== */
.modern-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.modern-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 400px;
    max-width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 
        0 20px 25px -5px rgba(15, 23, 42, 0.1), 
        0 8px 10px -6px rgba(15, 23, 42, 0.04), 
        0 0 0 1px rgba(15, 23, 42, 0.06);
    transform: translateX(120%) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.modern-toast.hiding {
    transform: translateX(120%) scale(0.9);
    opacity: 0;
}

/* Toast Variants */
.modern-toast.toast-warning {
    border-left: 4px solid #f59e0b;
}
.modern-toast.toast-warning .modern-toast-icon-bg {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.modern-toast.toast-error {
    border-left: 4px solid #ef4444;
}
.modern-toast.toast-error .modern-toast-icon-bg {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.modern-toast.toast-success {
    border-left: 4px solid #10b981;
}
.modern-toast.toast-success .modern-toast-icon-bg {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.modern-toast.toast-info {
    border-left: 4px solid #3b82f6;
}
.modern-toast.toast-info .modern-toast-icon-bg {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.modern-toast-icon-bg {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modern-toast-content {
    flex-grow: 1;
    min-width: 0;
}

.modern-toast-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 3px;
}

.modern-toast-message {
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    line-height: 1.4;
    word-wrap: break-word;
}

.modern-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    margin: -4px -4px 0 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modern-toast-close:hover {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
}

.modern-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    transform-origin: left;
    transition: transform linear;
}

/* Shake Animation for Invalid Form Field */
@keyframes shakeInvalid {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.form-control.is-invalid-shake {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18) !important;
    animation: shakeInvalid 0.4s ease-in-out;
}

