/* ===================================
   CommUnify - Professional Communication Manager
   CSS Stylesheet
   =================================== */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-light: #2d4a7c;
    --primary-dark: #0f2744;
    --secondary-color: #3182ce;
    
    --whatsapp-color: #25D366;
    --email-color: #2196F3;
    --sms-color: #9C27B0;
    
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --info-color: #00BCD4;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --sidebar-width: 260px;
    --right-panel-width: 380px;
    
    --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===================================
   SIDEBAR NAVIGATION
   =================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 0.95rem;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--warning-color);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-text {
    flex: 1;
}

.badge {
    background: var(--danger-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-status {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

/* ===================================
   MAIN CONTENT AREA
   =================================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-secondary);
    padding: 2rem;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
}

.search-box input {
    padding: 0.625rem 0.75rem 0.625rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    width: 300px;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* ===================================
   DASHBOARD
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-speed);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--info-color);
}

.deadline-item.urgent {
    border-left-color: var(--danger-color);
    background: #fff5f5;
}

.deadline-icon {
    font-size: 1.5rem;
}

.deadline-content {
    flex: 1;
}

.deadline-title {
    font-weight: 600;
    color: var(--text-primary);
}

.deadline-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===================================
   INBOX
   =================================== */
.inbox-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    background: var(--bg-secondary);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.inbox-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.messages-list {
    display: flex;
    flex-direction: column;
}

.message-card {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    gap: 1rem;
}

.message-card:hover {
    background: var(--bg-secondary);
}

.message-card.selected {
    background: #e6f2ff;
    border-left: 4px solid var(--secondary-color);
}

.message-card.unread {
    background: #f7faff;
}

.message-channel-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-channel-icon.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: var(--whatsapp-color);
}

.message-channel-icon.email {
    background: rgba(33, 150, 243, 0.1);
    color: var(--email-color);
}

.message-channel-icon.sms {
    background: rgba(156, 39, 176, 0.1);
    color: var(--sms-color);
}

.message-content {
    flex: 1;
    min-width: 0;
}

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

.message-sender {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.priority-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.priority-badge.urgent {
    background: #fee;
    color: var(--danger-color);
}

.category-tag {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.message-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unread-indicator {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
}

/* ===================================
   TEMPLATES
   =================================== */
.template-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

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

.template-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.template-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.template-category.itr {
    background: #e3f2fd;
    color: #1976d2;
}

.template-category.gst {
    background: #e8f5e9;
    color: #388e3c;
}

.template-category.audit {
    background: #fff3e0;
    color: #f57c00;
}

.template-category.general {
    background: #f3e5f5;
    color: #7b1fa2;
}

.template-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

.template-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* ===================================
   CLIENTS
   =================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.client-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.client-info {
    flex: 1;
}

.client-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.client-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.client-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.client-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.client-stat {
    flex: 1;
    text-align: center;
}

.client-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.client-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.client-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.client-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem;
}

/* ===================================
   SCHEDULED MESSAGES
   =================================== */
.scheduled-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scheduled-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--warning-color);
}

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

.scheduled-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scheduled-datetime {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.scheduled-content {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.scheduled-channels {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.channel-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.channel-badge.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: var(--whatsapp-color);
}

.channel-badge.email {
    background: rgba(33, 150, 243, 0.1);
    color: var(--email-color);
}

.channel-badge.sms {
    background: rgba(156, 39, 176, 0.1);
    color: var(--sms-color);
}

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

/* ===================================
   ANALYTICS
   =================================== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.query-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.query-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.query-stat-bar {
    height: 32px;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.query-stat-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.query-stat-value {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* ===================================
   SETTINGS
   =================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.settings-option {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-option:last-child {
    border-bottom: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input,
.select-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all var(--transition-speed);
    font-family: inherit;
}

.form-input:focus,
.select-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
}

/* ===================================
   RIGHT PANEL (Message Details)
   =================================== */
.right-panel {
    width: var(--right-panel-width);
    background: white;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.response-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-close {
    background: var(--bg-tertiary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.panel-close:hover {
    background: var(--border-color);
}

.client-details {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.client-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.client-detail-label {
    color: var(--text-secondary);
}

.client-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.message-full {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.message-full-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.response-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-section {
    margin-bottom: 1rem;
}

.section-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.template-selector {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    background: white;
}

.response-textarea {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: all var(--transition-speed);
}

.response-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
}

.response-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-action-btn {
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.quick-action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--secondary-color);
}

/* ===================================
   MODALS
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-in;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.channel-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

.toast.show {
    display: flex;
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
}

.toast.info {
    background: var(--info-color);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1200px) {
    .right-panel {
        position: fixed;
        right: -100%;
        top: 0;
        bottom: 0;
        transition: right var(--transition-speed);
        z-index: 200;
    }
    
    .right-panel.active {
        right: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        transition: left var(--transition-speed);
        z-index: 300;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .stats-grid,
    .dashboard-grid,
    .templates-grid,
    .clients-grid,
    .analytics-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
