/* =========================================================
   1. BASE RESET & GLOBAL TYPOGRAPHY
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f1f5f9;
    min-height: 100vh;
    margin: 0;
    padding: 0 0 20px 0;
    width: 100%;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 92%;
    max-width: 1320px;
    margin: 25px auto 0 auto;
    background: #ffffff;
    padding: 35px 50px;
    min-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   2. TOP STICKY CAPSULE NAVBAR & DROPDOWNS
   ========================================================= */
.top-capsule-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 99999;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.capsule-navbar {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.capsule-item {
    position: relative;
}

/* Neutral Minimal Capsule Buttons */
.capsule-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.capsule-btn:hover, .capsule-btn.active-btn {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.capsule-btn .arrow-icon {
    font-size: 8px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.capsule-btn.active-btn .arrow-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Box */
.capsule-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 250px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    padding: 8px;
    list-style: none;
    z-index: 100000;
    animation: popupFade 0.2s ease-out;
}

.capsule-dropdown.show-menu {
    display: block;
}

.capsule-dropdown li a {
    display: block;
    padding: 9px 12px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.capsule-dropdown li a:hover {
    background: #f1f5f9;
    color: #0f172a;
    padding-left: 15px;
}

/* Header WhatsApp Connected Pill */
.header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

/* =========================================================
   3. HUB CARDS GRID & TOOL WORKSPACES
   ========================================================= */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 25px;
    margin-bottom: 40px;
    width: 100%;
}

.hub-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: #25d366;
}

.hub-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #e7f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #075e54;
}

.hub-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.hub-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hub-btn {
    color: #075e54;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tool-view {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.back-nav-btn {
    background: #f1f5f9;
    border: none;
    color: #075e54;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.back-nav-btn:hover {
    background: #e2e8f0;
}

/* =========================================================
   4. FORM CONTROLS & DISPATCH BUTTONS
   ========================================================= */
label {
    font-weight: 600;
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
}

textarea, input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus, input:focus, select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.submit-btn {
    width: 100%;
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 15px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #16a34a;
}

/* Live Status & Animations */
.live-status-bar {
    margin-top: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0284c7;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wave-bar {
    width: 4px;
    height: 18px;
    background-color: #ffffff;
    border-radius: 4px;
    display: inline-block;
    animation: waveMotion 1s ease-in-out infinite;
}
.wave-bar:nth-child(1) { animation-delay: 0.0s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }
.wave-bar:nth-child(4) { animation-delay: 0.6s; }

@keyframes waveMotion {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50% { transform: scaleY(1.4); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================================
   5. QR AUTHENTICATION MODAL
   ========================================================= */
#login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.qr-card {
    background: white;
    padding: 35px;
    border-radius: 16px;
    text-align: center;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

#qr-box {
    width: 250px;
    height: 250px;
    margin: 20px auto;
    border: 2px dashed #075e54;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-image {
    width: 230px;
    height: 230px;
    display: none;
}

/* =========================================================
   6. SEO & ARCHITECTURE INFORMATION SECTION
   ========================================================= */
.seo-section {
    margin-top: 60px;
    border-top: 1px solid #e2e8f0;
    padding-top: 40px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.seo-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.seo-card h4 {
    color: #0f172a;
    font-size: 16px;
    margin-bottom: 10px;
}

.seo-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

/* =========================================================
   7. CLEAN WHITE FOOTER
   ========================================================= */
.site-color-footer {
    margin-top: 60px;
    border-top: 1px solid #e2e8f0;
    padding: 45px 30px 25px 30px;
    background: #ffffff;
    width: 100%;
}

.footer-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 35px;
}

.footer-color-col h4,
.col-home,
.col-company,
.col-broadcast,
.col-terms,
.col-connect,
.col-blogs {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 14px;
}

.footer-color-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2.1;
}

.footer-color-col ul li a {
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-color-col ul li a:hover {
    color: #0f172a;
}

.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.footer-social-icons a {
    color: #64748b;
    font-size: 16px;
    text-decoration: none;
}

.footer-social-icons a:hover {
    color: #0f172a;
}

/* =========================================================
   8. UNIVERSAL ANIMATED ALERT MODAL
   ========================================================= */
.custom-alert-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.custom-alert-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.custom-alert-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 28px 26px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform: scale(0.85) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-alert-backdrop.active .custom-alert-card {
    transform: scale(1) translateY(0);
}

.alert-brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.alert-brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(18, 140, 126, 0.25);
    flex-shrink: 0;
}

.alert-brand-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #075e54;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

.alert-status-bubble {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
}

.alert-status-bubble.success {
    background: #ecfdf5;
    border: 3px solid #a7f3d0;
    color: #10b981;
}

.alert-status-bubble.error {
    background: #fef2f2;
    border: 3px solid #fecaca;
    color: #ef4444;
}

.alert-status-bubble.warning {
    background: #fffbeb;
    border: 3px solid #fde68a;
    color: #f59e0b;
}

.alert-status-bubble.info {
    background: #eff6ff;
    border: 3px solid #bfdbfe;
    color: #3b82f6;
}

.alert-title-text {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.alert-desc-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 22px;
    white-space: pre-line;
    word-break: break-word;
}

.alert-ok-btn {
    width: 100%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.28);
    transition: all 0.2s ease;
    outline: none;
}

.alert-ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.36);
}

/* =========================================================
   9. GLOBAL KEYFRAME ANIMATIONS
   ========================================================= */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes popupFade {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}