/* ==========================================
   WhatsApp Striker - Premium Dark Theme
   ========================================== */

:root {
    /* Colors */
    --primary: #25D366;
    --primary-dark: #128C7E;
    --primary-light: #34eb7a;
    --secondary: #075E54;
    --accent: #00a884;

    /* Background */
    --bg-dark: #0a0f0d;
    --bg-card: rgba(20, 30, 25, 0.8);
    --bg-glass: rgba(37, 211, 102, 0.05);
    --bg-input: rgba(255, 255, 255, 0.05);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Status */
    --success: #25D366;
    --error: #ff5252;
    --warning: #ffc107;
    --info: #2196f3;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(37, 211, 102, 0.5);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(37, 211, 102, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ==========================================
   Reset & Base
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(37, 211, 102, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(7, 94, 84, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(18, 140, 126, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   Glass Effect
   ========================================== */

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

/* ==========================================
   Screen Management
   ========================================== */

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Login Screen
   ========================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s infinite;
}

.logo-icon svg {
    width: 45px;
    height: 45px;
    color: white;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--shadow-glow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(37, 211, 102, 0.5);
    }
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ==========================================
   Form Elements
   ========================================== */

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-fast);
}

.input-group select {
    padding-left: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.input-group textarea {
    padding-left: 1rem;
    resize: vertical;
    min-height: 120px;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--text-muted);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.4rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 2.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary);
}

.toggle-password svg {
    width: 1.25rem;
    height: 1.25rem;
}

.char-count {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-input);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   Login Footer
   ========================================== */

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================
   Header
   ========================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.header-logo svg {
    width: 2rem;
    height: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    text-align: right;
}

.user-info span {
    display: block;
}

.user-info #user-name {
    font-weight: 600;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   Main Content
   ========================================== */

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================
   Tabs
   ========================================== */

.tabs-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.tab svg {
    width: 1.25rem;
    height: 1.25rem;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.tab.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* ==========================================
   Tab Content
   ========================================== */

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ==========================================
   Section Header
   ========================================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

/* ==========================================
   Templates Grid
   ========================================== */

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.template-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.template-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.template-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.template-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.template-status {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.template-status.approved {
    background: rgba(37, 211, 102, 0.15);
    color: var(--success);
}

.template-status.pending {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning);
}

.template-status.rejected {
    background: rgba(255, 82, 82, 0.15);
    color: var(--error);
}

.template-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.template-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.template-meta-item svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.7;
}

.template-category {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.template-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.template-actions .btn {
    flex: 1;
}

/* ==========================================
   Form Card
   ========================================== */

.form-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
}

.form-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

/* ==========================================
   Info Banner
   ========================================== */

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.info-banner svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--info);
    margin-top: 0.125rem;
}

.info-banner p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ==========================================
   Template Variables
   ========================================== */

.template-variables {
    margin-top: 1.5rem;
}

.template-variables h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.variable-input {
    position: relative;
}

.variable-input label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.variable-input input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-fast);
}

.variable-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

/* ==========================================
   Loading State
   ========================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-state p {
    color: var(--text-secondary);
}

/* ==========================================
   Empty State
   ========================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ==========================================
   Toast Notifications
   ========================================== */

#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    min-width: 300px;
    max-width: 450px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast.info .toast-icon {
    color: var(--info);
}

/* ==========================================
   Tab Badge
   ========================================== */

.tab-badge {
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.125rem 0.4rem;
    border-radius: var(--radius-full);
    margin-left: 0.25rem;
}

/* ==========================================
   Inbox Container
   ========================================== */

.inbox-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 220px);
    min-height: 500px;
}

/* Chat List Panel */
.chat-list-panel {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-list-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.chat-search {
    position: relative;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-search svg {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
}

.chat-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-fast);
}

.chat-search input:focus {
    border-color: var(--primary);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-list-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.chat-list-pagination span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Chat Item */
.chat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.chat-item:hover {
    background: var(--bg-input);
}

.chat-item.active {
    background: rgba(37, 211, 102, 0.1);
    border-left: 3px solid var(--primary);
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-item-name {
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-item-preview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-unread {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

/* Chat Detail Panel */
.chat-detail-panel {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.chat-placeholder svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chat-placeholder h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chat-placeholder p {
    color: var(--text-secondary);
}

.chat-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-contact-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.chat-phone {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Bubbles */
.message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    position: relative;
}

.message.incoming {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message.outgoing {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.375rem;
    text-align: right;
}

.message.incoming .message-time {
    color: var(--text-muted);
}

/* Chat Input */
.chat-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.chat-input-area input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-fast);
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .main-content {
        padding: 1rem;
    }

    .tabs-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .tab svg {
        display: none;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2rem;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }

    .inbox-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .chat-list-panel {
        max-height: 400px;
    }

    .chat-detail-panel {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 64px;
        height: 64px;
    }

    .logo-icon svg {
        width: 36px;
        height: 36px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
    }
}