/* WhatsApp Gateway Modern Light Theme Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #10b981;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-wa: #10b981;
    --accent-wa-dark: #059669;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar Layout */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-link i {
    font-size: 1.15rem;
}

.nav-link:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.nav-link.active {
    background: #ecfdf5;
    border-left: 4px solid var(--accent-wa);
    color: var(--accent-wa-dark);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Cards & Tables */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Light Mode Status Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-sent { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-delivered { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-read { background: #cffaff; color: #155e75; border: 1px solid #a5f3fc; }
.badge-failed { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-approved { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* WhatsApp Mobile Live Preview Box */
.phone-preview-wrapper {
    width: 320px;
    background: #efeae2;
    border: 10px solid #334155;
    border-radius: 36px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    margin: 0 auto;
}

.phone-header {
    background: #075e54;
    color: #ffffff;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.phone-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
}

.phone-contact-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.phone-screen {
    background-color: #efeae2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
    background-size: 16px 16px;
    padding: 1rem;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.wa-chat-bubble {
    background: #dcf8c6;
    color: #111b21;
    padding: 0.75rem;
    border-radius: 10px 10px 0 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    max-width: 90%;
    align-self: flex-end;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.wa-chat-bubble::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 8px solid #dcf8c6;
    border-bottom: 8px solid transparent;
}

.wa-time {
    font-size: 0.65rem;
    color: #667781;
    float: right;
    margin-top: 0.3rem;
    margin-left: 0.5rem;
}
