/* ============================================
   WA Reminder SaaS - WhatsApp-Like Styles
   ============================================ */

/* CSS Variables */
:root {
    --wa-dark-green: #075E54;
    --wa-green: #128C7E;
    --wa-light-green: #25D366;
    --wa-teal: #00A884;
    --wa-blue: #34B7F1;
    --wa-blue-check: #53BDEB;
    --wa-bg: #111B21;
    --wa-bg-light: #0B141A;
    --wa-panel: #1F2C34;
    --wa-panel-header: #202C33;
    --wa-input-bg: #2A3942;
    --wa-chat-bg: #0B141A;
    --wa-bubble-out: #005C4B;
    --wa-bubble-in: #202C33;
    --wa-text: #E9EDEF;
    --wa-text-secondary: #8696A0;
    --wa-text-muted: #667781;
    --wa-border: #222D34;
    --wa-hover: #202C33;
    --wa-unread: #00A884;
    --wa-danger: #EA4335;
    --wa-warning: #F59E0B;
    --wa-online: #25D366;
    --wa-wallpaper: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23111B21' fill-opacity='0.15'%3E%3Cpath d='M20 20h10v10H20zM50 50h10v10H50zM80 20h10v10H80zM20 80h10v10H20zM110 30h10v10h-10zM30 110h10v10H30z'/%3E%3C/g%3E%3C/svg%3E");
    
    /* Light theme overrides */
    --landing-bg: #FFFFFF;
    --landing-text: #1A1A2E;
    --landing-text-secondary: #4A5568;
    --landing-card: #FFFFFF;
    --landing-border: #E2E8F0;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden; /* prevent horizontal scroll on all pages */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--wa-text);
    background: var(--wa-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--wa-blue);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.landing-body {
    background: var(--landing-bg);
    color: var(--landing-text);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* Navbar */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--landing-border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wa-dark-green);
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--landing-text);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-links a:hover {
    background: #F0FFF4;
    color: var(--wa-dark-green);
}

.nav-links .btn-primary {
    background: var(--wa-dark-green);
    color: white;
}

.nav-links .btn-primary:hover {
    background: var(--wa-green);
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 3rem;
    text-align: center;
    background: linear-gradient(135deg, #F0FFF4 0%, #E6FFFA 30%, #EBF4FF 70%, #F0FFF4 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(37,211,102,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 680px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37,211,102,0.1);
    color: var(--wa-dark-green);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37,211,102,0.2);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--landing-text);
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--wa-dark-green), var(--wa-light-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--landing-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--landing-border);
}

.hero-stat {
    text-align: center;
}

.hero-stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--wa-dark-green);
}

.hero-stat span {
    font-size: 0.85rem;
    color: var(--landing-text-secondary);
}

/* Phone Mockup */
.phone-mockup {
    margin-top: 3rem;
    position: relative;
    display: inline-block;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: var(--wa-bg);
    border-radius: 32px;
    border: 4px solid #333;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 24px;
    background: #333;
    margin: 0 auto;
    border-radius: 0 0 16px 16px;
    position: relative;
    z-index: 2;
}

.phone-screen {
    height: 100%;
}

.phone-wa-header {
    background: var(--wa-panel-header);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-wa-header .wa-logo-sm {
    width: 24px;
    height: 24px;
    fill: var(--wa-light-green);
}

.phone-wa-header span {
    color: var(--wa-text);
    font-size: 0.8rem;
    font-weight: 600;
}

.phone-chat-list {
    padding: 0.25rem 0;
}

.phone-chat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--wa-border);
}

.phone-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.phone-chat-info {
    flex: 1;
    min-width: 0;
}

.phone-chat-name {
    color: var(--wa-text);
    font-size: 0.72rem;
    font-weight: 500;
}

.phone-chat-msg {
    color: var(--wa-text-secondary);
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-chat-time {
    color: var(--wa-text-muted);
    font-size: 0.55rem;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--wa-dark-green);
    color: white;
    box-shadow: 0 4px 14px rgba(7,94,84,0.3);
}

.btn-primary:hover {
    background: var(--wa-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7,94,84,0.4);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--wa-dark-green);
    border: 2px solid var(--wa-dark-green);
}

.btn-secondary:hover {
    background: var(--wa-dark-green);
    color: white;
    transform: translateY(-2px);
}

.btn-wa-green {
    background: var(--wa-teal);
    color: white;
    border-radius: 24px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.btn-wa-green:hover {
    background: var(--wa-light-green);
    color: white;
}

.btn-danger {
    background: var(--wa-danger);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Features Section */
.section {
    padding: 5rem 1.5rem;
}

.section-dark {
    background: #F7FAFC;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--landing-text);
    margin-bottom: 0.75rem;
}

.section-title p {
    color: var(--landing-text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--landing-border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: rgba(37,211,102,0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--landing-text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--landing-text-secondary);
    line-height: 1.6;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid var(--landing-border);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card.popular {
    border-color: var(--wa-light-green);
    transform: scale(1.03);
    box-shadow: 0 20px 60px rgba(37,211,102,0.15);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--wa-dark-green), var(--wa-light-green));
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--landing-text);
}

.pricing-price {
    margin: 1.25rem 0;
}

.pricing-price .amount {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--wa-dark-green);
}

.pricing-price .period {
    font-size: 0.9rem;
    color: var(--landing-text-secondary);
}

.pricing-features {
    text-align: left;
    margin: 1.5rem 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--landing-text-secondary);
}

.pricing-features li svg {
    flex-shrink: 0;
    color: var(--wa-light-green);
}

/* Footer */
.footer {
    background: var(--landing-text);
    color: rgba(255,255,255,0.7);
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--wa-light-green);
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--wa-dark-green) 0%, var(--wa-green) 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo svg {
    width: 56px;
    height: 56px;
    fill: var(--wa-dark-green);
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--landing-text);
    margin-top: 0.5rem;
}

.auth-logo p {
    font-size: 0.9rem;
    color: var(--landing-text-secondary);
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--landing-text);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--landing-text);
    background: #F7FAFC;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--wa-green);
    background: white;
    box-shadow: 0 0 0 3px rgba(18,140,126,0.1);
}

.form-control::placeholder {
    color: #A0AEC0;
}

.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.phone-prefix {
    flex-shrink: 0;
    width: 70px;
    text-align: center;
    padding: 0.75rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: #EDF2F7;
    font-weight: 600;
    color: var(--landing-text);
}

.phone-input-group .form-control {
    flex: 1;
}

.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: #F7FAFC;
    color: var(--landing-text);
    transition: all 0.2s;
}

.otp-input:focus {
    border-color: var(--wa-green);
    background: white;
    box-shadow: 0 0 0 3px rgba(18,140,126,0.1);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #E2E8F0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--landing-text-secondary);
    font-size: 0.85rem;
    position: relative;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--landing-text-secondary);
}

.auth-footer a {
    color: var(--wa-dark-green);
    font-weight: 600;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: #FEF3C7;
    color: #D97706;
    border: 1px solid #FDE68A;
}

/* ============================================
   WHATSAPP DASHBOARD
   ============================================ */

.wa-app {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--wa-bg);
    overflow: hidden;
    max-width: 100vw;
}

/* Top Header */
.wa-header {
    background: var(--wa-panel-header);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 56px;
    z-index: 100;
}

.wa-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wa-header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--wa-text);
}

.wa-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wa-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-text-secondary);
    transition: background 0.2s;
}

.wa-header-btn:hover, .wa-header-btn:active {
    background: rgba(255,255,255,0.1);
}

.wa-header-btn svg {
    width: 22px;
    height: 22px;
}

/* Tabs */
.wa-tabs {
    display: flex;
    background: var(--wa-panel-header);
    border-bottom: 1px solid var(--wa-border);
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wa-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wa-text-secondary);
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.wa-tab.active {
    color: var(--wa-teal);
}

.wa-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--wa-teal);
    border-radius: 3px 3px 0 0;
}

.wa-tab svg {
    width: 20px;
    height: 20px;
}

.wa-tab-badge {
    background: var(--wa-unread);
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    position: absolute;
    top: 4px;
    right: 15%;
    font-weight: 700;
}

/* Search Bar */
.wa-search {
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

.wa-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: var(--wa-input-bg);
    border: none;
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 0.9rem;
    position: relative;
}

.wa-search-input::placeholder {
    color: var(--wa-text-muted);
}

.wa-search-wrap {
    position: relative;
}

.wa-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wa-text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* Chat List */
.wa-chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.wa-chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(134,150,160,0.08);
    position: relative;
}

.wa-chat-item:hover, .wa-chat-item:active {
    background: var(--wa-hover);
}

.wa-chat-item.unread .wa-chat-name {
    color: var(--wa-text);
    font-weight: 600;
}

.wa-chat-item.unread .wa-chat-time {
    color: var(--wa-unread);
}

/* Avatar */
.wa-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    background: var(--wa-green);
    position: relative;
    overflow: hidden;
}

.wa-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wa-avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
}

.wa-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.3rem;
}

.wa-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: var(--wa-online);
    border-radius: 50%;
    border: 2px solid var(--wa-bg);
}

/* Chat Item Info */
.wa-chat-info {
    flex: 1;
    min-width: 0;
}

.wa-chat-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.15rem;
}

.wa-chat-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--wa-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-chat-time {
    font-size: 0.72rem;
    color: var(--wa-text-muted);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.wa-chat-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-chat-preview {
    font-size: 0.85rem;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wa-chat-preview svg {
    flex-shrink: 0;
    width: 18px;
    height: 12px;
}

.wa-unread-badge {
    background: var(--wa-unread);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* ============================================
   CHAT VIEW
   ============================================ */

.chat-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: var(--wa-chat-bg);
}

.chat-header {
    background: var(--wa-panel-header);
    padding: 0.5rem 0.5rem 0.5rem 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 56px;
    z-index: 50;
}

.chat-back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-text-secondary);
    flex-shrink: 0;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.chat-header-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wa-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--wa-text-secondary);
}

.chat-header-status.online {
    color: var(--wa-teal);
}

.chat-header-actions {
    display: flex;
    gap: 0.25rem;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background-image: var(--wa-wallpaper);
    background-color: var(--wa-chat-bg);
}

.chat-date-divider {
    text-align: center;
    margin: 0.75rem 0;
}

.chat-date-divider span {
    background: rgba(17,27,33,0.9);
    color: var(--wa-text-secondary);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
}

.msg-bubble {
    max-width: 80%;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    position: relative;
    margin-bottom: 0.1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.msg-out {
    background: var(--wa-bubble-out);
    align-self: flex-end;
    border-radius: 8px 0 8px 8px;
}

.msg-in {
    background: var(--wa-bubble-in);
    align-self: flex-start;
    border-radius: 0 8px 8px 8px;
}

.msg-text {
    font-size: 0.9rem;
    color: var(--wa-text);
    line-height: 1.45;
    white-space: pre-wrap;
}

.msg-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.msg-time {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
}

.msg-status {
    display: flex;
    align-items: center;
}

.msg-status svg {
    width: 16px;
    height: 11px;
}

.msg-status.sent svg { color: rgba(255,255,255,0.5); }
.msg-status.delivered svg { color: rgba(255,255,255,0.5); }
.msg-status.read svg { color: var(--wa-blue-check); }

.msg-deleted {
    font-style: italic;
    color: var(--wa-text-muted);
    font-size: 0.85rem;
}

.msg-scheduled {
    border: 1px dashed var(--wa-warning);
    opacity: 0.8;
}

.msg-scheduled .msg-scheduled-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(245,158,11,0.15);
    color: var(--wa-warning);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

/* Chat Input */
.chat-input-area {
    padding: 0.5rem;
    background: var(--wa-panel-header);
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-input-wrap {
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: var(--wa-input-bg);
    border-radius: 24px;
    padding: 0.25rem 0.5rem;
    min-height: 44px;
    gap: 0.25rem;
}

.chat-input-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding-bottom: 0.35rem;
}

.chat-input-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-text-secondary);
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-input-btn:hover {
    background: rgba(255,255,255,0.05);
}

.chat-input-btn svg {
    width: 22px;
    height: 22px;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--wa-text);
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    min-height: 36px;
    line-height: 1.4;
    padding: 0.4rem 0.25rem;
    overflow-y: auto;
}

.chat-input::placeholder {
    color: var(--wa-text-muted);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wa-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: var(--wa-light-green);
}

.chat-send-btn svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */

.wa-bottom-nav {
    display: flex;
    background: var(--wa-panel-header);
    border-top: 1px solid var(--wa-border);
    flex-shrink: 0;
    padding-bottom: env(safe-area-inset-bottom);
}

.wa-bottom-nav a, .wa-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.25rem;
    color: var(--wa-text-secondary);
    font-size: 0.65rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    background: none;
    border: none;
    text-decoration: none;
}

.wa-bottom-nav a.active, .wa-bottom-nav button.active {
    color: var(--wa-teal);
}

.wa-bottom-nav svg {
    width: 24px;
    height: 24px;
}

.wa-bottom-nav .nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    background: var(--wa-unread);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

/* ============================================
   PAGE: CONTACTS
   ============================================ */

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.contact-item:hover, .contact-item:active {
    background: var(--wa-hover);
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--wa-text);
}

.contact-phone {
    font-size: 0.8rem;
    color: var(--wa-text-secondary);
}

.contact-tag {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(0,168,132,0.15);
    color: var(--wa-teal);
    margin-right: 0.25rem;
}

/* ============================================
   PAGE: TEMPLATES
   ============================================ */

.template-list {
    padding: 0.5rem;
}

.template-card {
    background: var(--wa-panel);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--wa-border);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.template-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wa-text);
}

.template-category {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.cat-sales { background: rgba(52,183,241,0.15); color: var(--wa-blue); }
.cat-marketing { background: rgba(108,92,231,0.15); color: #A29BFE; }
.cat-billing { background: rgba(234,67,53,0.15); color: var(--wa-danger); }
.cat-followup { background: rgba(245,158,11,0.15); color: var(--wa-warning); }
.cat-greeting { background: rgba(0,168,132,0.15); color: var(--wa-teal); }
.cat-support { background: rgba(99,102,241,0.15); color: #818CF8; }
.cat-promo { background: rgba(236,72,153,0.15); color: #EC4899; }
.cat-reminder { background: rgba(234,179,8,0.15); color: #EAB308; }
.cat-notification { background: rgba(37,211,102,0.15); color: var(--wa-light-green); }
.cat-custom { background: rgba(134,150,160,0.15); color: var(--wa-text-secondary); }

.template-content {
    font-size: 0.82rem;
    color: var(--wa-text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.template-content.expanded {
    max-height: none;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wa-border);
}

.template-actions button {
    flex: 1;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.template-actions button svg {
    width: 16px;
    height: 16px;
}

.template-use-btn {
    background: rgba(0,168,132,0.15);
    color: var(--wa-teal);
}

.template-use-btn:hover {
    background: var(--wa-teal);
    color: white;
}

/* ============================================
   PAGE: SCHEDULED
   ============================================ */

.scheduled-item {
    background: var(--wa-panel);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 1rem;
    border-left: 3px solid var(--wa-warning);
}

.scheduled-item.cancelled {
    border-left-color: var(--wa-text-muted);
    opacity: 0.6;
}

.scheduled-item.sent {
    border-left-color: var(--wa-teal);
}

.scheduled-to {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.scheduled-to-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wa-text);
}

.scheduled-time {
    font-size: 0.75rem;
    color: var(--wa-warning);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.scheduled-content {
    font-size: 0.85rem;
    color: var(--wa-text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 80px;
    overflow: hidden;
}

.scheduled-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-pending { background: rgba(245,158,11,0.15); color: var(--wa-warning); }
.status-sent { background: rgba(0,168,132,0.15); color: var(--wa-teal); }
.status-cancelled { background: rgba(134,150,160,0.15); color: var(--wa-text-muted); }
.status-failed { background: rgba(234,67,53,0.15); color: var(--wa-danger); }
.status-connected { background: rgba(37,211,102,0.15); color: var(--wa-light-green); }
.status-disconnected { background: rgba(234,67,53,0.15); color: var(--wa-danger); }

/* ============================================
   MODALS / SHEETS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-sheet {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--wa-panel);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--wa-text-muted);
    border-radius: 2px;
    margin: 0.75rem auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem 1rem;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wa-text);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-text-secondary);
    border-radius: 50%;
}

.modal-body {
    padding: 0 1.25rem 1.25rem;
}

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--wa-border);
    display: flex;
    gap: 0.5rem;
}

/* Form elements in dark mode */
.wa-form-group {
    margin-bottom: 1rem;
}

.wa-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--wa-text-secondary);
    margin-bottom: 0.35rem;
}

.wa-form-control {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--wa-input-bg);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 0.9rem;
}

.wa-form-control:focus {
    border-color: var(--wa-teal);
    box-shadow: 0 0 0 2px rgba(0,168,132,0.15);
}

.wa-form-control::placeholder {
    color: var(--wa-text-muted);
}

textarea.wa-form-control {
    resize: vertical;
    min-height: 80px;
}

select.wa-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238696A0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

/* ============================================
   QR CODE PAGE
   ============================================ */

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    min-height: 60vh;
}

.qr-box {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.qr-box img, .qr-box canvas {
    width: 240px;
    height: 240px;
}

.qr-instructions {
    color: var(--wa-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 320px;
}

.qr-instructions ol {
    text-align: left;
    list-style: decimal;
    padding-left: 1.25rem;
    margin-top: 0.75rem;
}

.qr-instructions li {
    margin-bottom: 0.5rem;
}

.qr-status {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.qr-status.connecting {
    color: var(--wa-warning);
}

.qr-status.connected {
    color: var(--wa-light-green);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--wa-text-muted);
    border-top-color: var(--wa-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SUBSCRIPTION PAGE
   ============================================ */

.sub-page {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.sub-current {
    background: linear-gradient(135deg, var(--wa-dark-green), var(--wa-green));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.sub-current h3 {
    font-size: 0.85rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.sub-current-plan {
    font-size: 1.5rem;
    font-weight: 700;
}

.sub-current-expiry {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.sub-plan-card {
    background: var(--wa-panel);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--wa-border);
    transition: all 0.2s;
}

.sub-plan-card.active {
    border-color: var(--wa-teal);
}

.sub-plan-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wa-text);
}

.sub-plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wa-teal);
    margin: 0.5rem 0;
}

.sub-plan-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--wa-text-secondary);
}

.sub-plan-features {
    margin-top: 0.75rem;
}

.sub-plan-features li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--wa-text-secondary);
}

.sub-plan-features li svg {
    width: 16px;
    height: 16px;
    color: var(--wa-teal);
    flex-shrink: 0;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.settings-section {
    padding: 1rem;
}

.settings-group {
    margin-bottom: 1.5rem;
}

.settings-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wa-teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0 0.5rem;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--wa-border);
    cursor: pointer;
}

.settings-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.settings-item-info {
    flex: 1;
}

.settings-item-title {
    font-size: 0.9rem;
    color: var(--wa-text);
}

.settings-item-desc {
    font-size: 0.8rem;
    color: var(--wa-text-secondary);
}

.settings-item-arrow {
    color: var(--wa-text-muted);
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 40vh;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--wa-text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wa-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--wa-text-secondary);
    max-width: 280px;
    margin-bottom: 1.5rem;
}

/* ============================================
   FAB (Floating Action Button)
   ============================================ */

.fab {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--wa-teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,168,132,0.4);
    z-index: 50;
    transition: all 0.2s;
}

.fab:hover {
    transform: scale(1.05);
    background: var(--wa-light-green);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   TEAM PAGE
   ============================================ */

.team-member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wa-border);
}

.team-role {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-owner { background: rgba(245,158,11,0.15); color: var(--wa-warning); }
.role-admin { background: rgba(52,183,241,0.15); color: var(--wa-blue); }
.role-sales { background: rgba(0,168,132,0.15); color: var(--wa-teal); }
.role-viewer { background: rgba(134,150,160,0.15); color: var(--wa-text-secondary); }

/* ============================================
   IMPORT PAGE
   ============================================ */

.import-zone {
    border: 2px dashed var(--wa-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.import-zone:hover, .import-zone.dragover {
    border-color: var(--wa-teal);
    background: rgba(0,168,132,0.05);
}

.import-zone svg {
    width: 48px;
    height: 48px;
    color: var(--wa-text-muted);
    margin-bottom: 0.75rem;
}

.import-zone h3 {
    font-size: 1rem;
    color: var(--wa-text);
    margin-bottom: 0.25rem;
}

.import-zone p {
    font-size: 0.85rem;
    color: var(--wa-text-secondary);
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--wa-text-muted);
    border-radius: 12px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--wa-teal);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ============================================
   TABS FILTER
   ============================================ */

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--wa-text-secondary);
    background: var(--wa-input-bg);
    transition: all 0.2s;
    cursor: pointer;
}

.filter-tab.active {
    background: var(--wa-teal);
    color: white;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 90%;
    max-width: 400px;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.toast-success { background: var(--wa-dark-green); }
.toast-error { background: var(--wa-danger); }
.toast-warning { background: #D97706; }

@keyframes toastIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ============================================
   DESKTOP LAYOUT  (≥ 900px)
   ============================================ */

/* Sidebar */
.desktop-sidebar {
    display: none;
}

@media (min-width: 900px) {

    /* Dashboard pages: sidebar + main side-by-side, full-screen, no scroll on body */
    body:not(.landing-body) {
        display: flex;
        flex-direction: row;
        overflow: hidden;
        height: 100vh;
    }

    /* Landing/auth pages: normal document flow, no forced height */
    body.landing-body {
        display: block;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* Full-width app on desktop — sidebar + content side by side */
    .wa-app {
        max-width: 100%;
        margin: 0;
        border: none;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        flex: 1;
    }

    /* Hide mobile bottom nav on desktop */
    .wa-bottom-nav {
        display: none !important;
    }

    /* Sidebar */
    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        width: 240px;
        min-width: 240px;
        height: 100vh;
        background: var(--wa-panel-header);
        border-right: 1px solid var(--wa-border);
        overflow-y: auto;
        flex-shrink: 0;
        z-index: 200;
    }

    .desktop-sidebar-logo {
        padding: 1.25rem 1rem 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        border-bottom: 1px solid var(--wa-border);
        margin-bottom: 0.5rem;
    }

    .desktop-sidebar-logo-icon {
        width: 32px;
        height: 32px;
        background: var(--wa-teal);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .desktop-sidebar-logo-text {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--wa-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .desktop-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0.25rem 0.5rem;
        flex: 1;
    }

    .desktop-nav-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
        border-radius: 10px;
        color: var(--wa-text-muted);
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 500;
        transition: background 0.15s, color 0.15s;
        position: relative;
    }

    .desktop-nav-item:hover {
        background: rgba(255,255,255,0.07);
        color: var(--wa-text);
    }

    .desktop-nav-item.active {
        background: var(--wa-teal);
        color: #fff;
    }

    .desktop-nav-item svg {
        flex-shrink: 0;
        opacity: 0.8;
    }

    .desktop-nav-item.active svg {
        opacity: 1;
    }

    .desktop-nav-badge {
        margin-left: auto;
        background: var(--wa-teal);
        color: #fff;
        border-radius: 10px;
        padding: 1px 7px;
        font-size: 0.68rem;
        font-weight: 700;
    }

    .desktop-nav-item.active .desktop-nav-badge {
        background: rgba(255,255,255,0.3);
    }

    .desktop-sidebar-section {
        padding: 0.25rem 1rem;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--wa-text-muted);
        margin-top: 0.5rem;
        margin-bottom: 0.15rem;
    }

    .desktop-sidebar-footer {
        border-top: 1px solid var(--wa-border);
        padding: 0.75rem 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    /* Main content area */
    .desktop-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0;
        height: 100vh;
    }

    /* Chat list page — two panels */
    .desktop-two-panel {
        flex: 1;
        display: flex;
        overflow: hidden;
    }

    .desktop-panel-list {
        width: 360px;
        min-width: 300px;
        max-width: 400px;
        border-right: 1px solid var(--wa-border);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .desktop-panel-chat {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Content pages (subscription, contacts, etc.) */
    .desktop-content {
        flex: 1;
        overflow-y: auto;
        padding: 1.5rem 2rem;
        max-width: 960px;
    }

    /* Hide in-page back button on desktop */
    .desktop-hide-back .chat-back-btn {
        display: none;
    }

    /* Plan cards grid on desktop */
    .sub-plans-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem !important;
    }

    /* Wider modal on desktop */
    .modal-overlay .modal-sheet {
        border-radius: 16px;
        margin-bottom: 0;
        max-width: 520px;
        width: 100%;
    }

    .chat-view {
        max-width: 100%;
        border: none;
        flex: 1;
        height: 100vh;
        height: 100dvh;
    }
}

/* Small screens */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat strong {
        font-size: 1.4rem;
    }
    
    .phone-frame {
        width: 240px;
        height: 480px;
    }
    
    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide scrollbar */
.wa-chat-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.filter-tabs::-webkit-scrollbar {
    display: none;
}

.wa-chat-list, .chat-messages, .filter-tabs {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loading shimmer */
.shimmer {
    background: linear-gradient(90deg, var(--wa-panel) 25%, var(--wa-input-bg) 50%, var(--wa-panel) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--wa-text-muted); }
.text-success { color: var(--wa-light-green); }
.text-danger { color: var(--wa-danger); }
.text-warning { color: var(--wa-warning); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================
   MISSING / ALIAS CLASSES
   ============================================ */

/* Generic avatar (alias for wa-avatar) */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* Generic form-input (dark themed input) */
.form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--wa-input-bg);
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    color: var(--wa-text);
    font-size: 0.9rem;
    font-family: inherit;
}
.form-input:focus {
    border-color: var(--wa-teal);
    box-shadow: 0 0 0 2px rgba(0,168,132,0.15);
    outline: none;
}
.form-input::placeholder { color: var(--wa-text-muted); }
textarea.form-input { resize: vertical; min-height: 72px; }
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238696A0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2rem;
}

/* badge pill */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* tab-count inside filter tab */
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 4px;
}
.filter-tab.active .tab-count { background: rgba(255,255,255,0.3); }

/* Modal sheet header + body (used across pages) */
.modal-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--wa-border);
}
.modal-sheet-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wa-text);
    margin: 0;
}
.modal-sheet-body {
    padding: 1rem 1.25rem 1.5rem;
    overflow-y: auto;
}

/* Scheduled item sub-elements */
.scheduled-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.scheduled-item-body {
    margin-bottom: 0.5rem;
}
.scheduled-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--wa-border);
}

/* btn-sm inside scheduled-item-actions */
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s;
}
.btn-sm.btn-secondary { background: var(--wa-input-bg); color: var(--wa-text-secondary); }
.btn-sm.btn-secondary:hover { background: var(--wa-hover); color: var(--wa-text); }
.btn-sm.btn-danger { background: rgba(234,67,53,0.15); color: var(--wa-danger); }
.btn-sm.btn-danger:hover { background: var(--wa-danger); color: white; }
.btn-sm.btn-teal { background: rgba(0,168,132,0.15); color: var(--wa-teal); }
.btn-sm.btn-teal:hover { background: var(--wa-teal); color: white; }

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Hide mobile back button on desktop (for non-chat pages) */
@media (min-width: 900px) {
    .mobile-back-btn { display: none !important; }

    /* Center modals on desktop */
    .modal-overlay {
        align-items: center;
    }
    .modal-overlay .modal-sheet {
        border-radius: 16px;
        max-width: 520px;
        width: 90%;
    }
    /* Larger modal for wide content */
    .modal-overlay .modal-sheet.modal-lg {
        max-width: 680px;
    }

    /* FAB clears sidebar */
    .fab {
        right: 1.5rem;
    }

    /* Subscription plan grid */
    .sub-plans-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem !important;
    }
}

/* Mobile: ensure modals always bottom-sheet style */
@media (max-width: 899px) {
    .modal-overlay {
        align-items: flex-end;
    }
    .modal-overlay .modal-sheet {
        border-radius: 20px 20px 0 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Better touch targets for mobile scheduled actions */
@media (max-width: 480px) {
    .scheduled-item-actions { gap: 0.3rem; }
    .btn-sm { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
}

/* ============================================
   DESKTOP LANDING PAGE LAYOUT
   ============================================ */

/* Prevent horizontal overflow on landing pages */
.landing-body {
    overflow-x: hidden;
}
.hero {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile hero: keep phone centered below text */
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.hero-visual {
    margin-top: 2.5rem;
    max-width: 100%;
}

/* Hero two-column on desktop */
@media (min-width: 900px) {
    /* Nav container — max-width centered */
    .nav {
        padding: 1rem 3rem;
        max-width: 1280px;
        margin: 0 auto;
        left: 0;
        right: 0;
    }

    /* Hero: side-by-side layout */
    .hero {
        text-align: left;
        padding: 7rem 3rem 4rem;
    }
    .hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 4rem;
        max-width: 1160px;
        margin: 0 auto;
    }
    .hero-content {
        flex: 1;
        min-width: 0;
        max-width: none;
    }
    .hero-visual {
        flex-shrink: 0;
        margin-top: 0;
        display: flex;
        justify-content: center;
    }
    .hero::before { display: none; }
    .hero-buttons { justify-content: flex-start; }
    .hero-stats {
        justify-content: flex-start;
        gap: 2rem;
        padding-top: 1.5rem;
    }
    .hero h1 { font-size: 3.2rem; }

    /* Section content — always max-width centered on desktop */
    .section {
        padding: 5rem 3rem;
    }
    .section-title {
        max-width: 1100px;
        margin: 0 auto 3rem;
    }

    /* Features/pricing grids — constrain + center */
    .features-grid {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0;
    }
    .pricing-grid {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0;
        grid-template-columns: repeat(4, 1fr);
    }

    /* Footer */
    .footer {
        padding: 3rem;
    }
    .footer-links {
        max-width: 800px;
        margin: 0 auto 1.5rem;
    }
}

/* ============================================
   DESKTOP AUTH / LOGIN SPLIT LAYOUT
   ============================================ */

/* Brand panel: hidden on mobile */
.auth-brand-panel { display: none; }
.auth-form-panel { width: 100%; }

/* Desktop heading shown only inside the form panel */
.auth-desktop-heading { display: none; }

@media (min-width: 900px) {
    .auth-page { padding: 2rem; }

    .auth-card {
        display: flex;
        flex-direction: row;
        max-width: 840px;
        padding: 0;
        overflow: hidden;
        border-radius: 24px;
        align-items: stretch;
    }

    /* Left branded column */
    .auth-brand-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        width: 300px;
        flex-shrink: 0;
        background: linear-gradient(160deg, var(--wa-dark-green) 0%, var(--wa-green) 100%);
        padding: 3rem 2.5rem;
        border-radius: 24px 0 0 24px;
        min-height: 480px;
    }
    .auth-brand-logo svg {
        width: 52px;
        height: 52px;
        fill: white;
        display: block;
    }
    .auth-brand-panel h2 {
        font-size: 1.5rem;
        font-weight: 800;
        color: white;
        line-height: 1.25;
    }
    .auth-brand-panel > p {
        color: rgba(255,255,255,0.8);
        font-size: 0.9rem;
        line-height: 1.6;
        margin: 0;
    }
    .auth-brand-features {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .auth-brand-features li {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        color: rgba(255,255,255,0.9);
        font-size: 0.88rem;
    }
    .auth-brand-features li svg {
        flex-shrink: 0;
        color: #A8EDCA;
    }

    /* Right form column */
    .auth-form-panel {
        flex: 1;
        min-width: 0;
        padding: 3rem 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: white;
    }

    /* Hide the mobile logo block; show desktop heading instead */
    .auth-form-panel .auth-logo { display: none; }
    .auth-desktop-heading {
        display: block;
        margin-bottom: 1.75rem;
    }
    .auth-desktop-heading h3 {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--landing-text);
        margin-bottom: 0.3rem;
    }
    .auth-desktop-heading p {
        font-size: 0.9rem;
        color: var(--landing-text-secondary);
    }
}

/* Terms checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--wa-dark-green);
    cursor: pointer;
}
.form-check label {
    font-size: 0.85rem;
    color: var(--landing-text-secondary);
    line-height: 1.5;
    cursor: pointer;
}
.form-check label a {
    color: var(--wa-dark-green);
    font-weight: 600;
}

