/**
 * Chanda Ayurmacery Telecalling Platform
 * Global Theme & Common CSS
 */

:root {
    --primary: #0B6B4F;
    --primary-hover: #08523c;
    --primary-light: #e8f5f0;
    --secondary: #12372A;
    --accent: #F59E0B;
    --accent-hover: #d97706;
    --accent-light: #fef3c7;
    --danger: #EF4444;
    --danger-light: #fee2e2;
    --info: #3B82F6;
    --info-light: #dbeafe;
    --success: #10B981;
    --success-light: #d1fae5;
    --warning: #F59E0B;
    
    --bg-dark: #0A0F1D;
    --surface-dark: #111827;
    --surface-dark-card: rgba(17, 24, 39, 0.75);
    --border-dark: rgba(255, 255, 255, 0.08);
    --text-dark: #F9FAFB;
    --text-muted-dark: #9CA3AF;

    --bg-light: #F3F4F6;
    --surface-light: #FFFFFF;
    --border-light: #E5E7EB;
    --text-light: #111827;
    --text-muted-light: #6B7280;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--bg-light);
    color: var(--text-light);
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.glass-card-dark {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    color: var(--text-dark);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-warning { background: var(--accent-light); color: #b45309; }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-emerald { background: #d1fae5; color: #047857; }
.badge-danger { background: var(--danger-light); color: #b91c1c; }
.badge-secondary { background: #e5e7eb; color: #4b5563; }
.badge-muted { background: #f3f4f6; color: #9ca3af; }
.badge-dark { background: #374151; color: #f9fafb; }

/* Priority Chips */
.priority-chip {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}
.badge-urgent { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.badge-high { background: #fef3c7; color: #d97706; border: 1px solid #fcd34d; }
.badge-medium { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-low { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary { background: #374151; color: #f9fafb; }
.btn-secondary:hover { background: #4b5563; }

.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-danger { background: var(--danger); color: #ffffff; }
.btn-danger:hover { background: #dc2626; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-light);
}
.btn-outline:hover { background: #f3f4f6; }

.btn-sm { padding: 6px 12px; font-size: 11px; border-radius: 6px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

/* Form Controls */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-light);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 107, 79, 0.15);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

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

.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box-lg { max-width: 800px; }

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

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 20px;
    background: #f9fafb;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    background: #1f2937;
    color: #ffffff;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease;
}

.toast.success { background: #065f46; border-left: 5px solid #10b981; }
.toast.error { background: #7f1d1d; border-left: 5px solid #ef4444; }
.toast.info { background: #1e3a8a; border-left: 5px solid #3b82f6; }

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

/* Demo Banner */
.demo-badge-bar {
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
