/* ========================================
   BASE CSS – OlaCare ISP Self-Care Portal
   Nextra Brand Colors + Design Tokens
   ======================================== */

:root {
    /* Brand Colors */
    --primary-color: #1C2F6E;        /* Nextra Navy Blue */
    --primary-dark:  #111D47;
    --primary-light: #2E4A9E;
    --secondary-color: #F5B800;      /* Nextra Gold Accent */
    --secondary-light: #FFD033;
    --bg-dark: #091230;              /* Nextra Dark Navy */
    --logo-gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 60%, var(--primary-light) 100%);

    /* Neutrals */
    --bg-app:      #F1F5F9;
    --white:       #FFFFFF;
    --text-main:   #1E293B;
    --text-muted:  #64748B;
    --text-light:  #94A3B8;
    --border-color: #E2E8F0;

    /* Semantic Colors */
    --success:  #10B981;
    --warning:  #F59E0B;
    --danger:   #EF4444;
    --info:     #3B82F6;
    --secondary: #64748B;

    /* Layout */
    --sidebar-width:    280px;
    --sidebar-collapsed: 72px;
    --header-height:    64px;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),  0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Dark Mode Overrides === */
[data-theme="dark"] {
    --bg-app:      #0F172A;
    --white:       #1E293B;
    --text-main:   #F1F5F9;
    --text-muted:  #94A3B8;
    --text-light:  #64748B;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
}

ul, ol {
    list-style: none;
}

/* === Typography Helpers === */
.text-primary  { color: var(--primary-color); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-danger   { color: var(--danger); }
.text-info     { color: var(--info); }
.text-muted    { color: var(--text-muted); }

/* === Toast Notification System === */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info);
    min-width: 280px;
    max-width: 380px;
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    font-size: 0.875rem;
    font-weight: 500;
}

.toast.success { border-color: var(--success); }
.toast.warning { border-color: var(--warning); }
.toast.error   { border-color: var(--danger); }

.toast.fade-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(110%); opacity: 0; }
}

/* === Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-success  { background: #D1FAE5; color: #065F46; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-info     { background: #DBEAFE; color: #1E40AF; }
.badge-secondary { background: #F1F5F9; color: var(--text-muted); }
.badge-primary  { background: #E8EDF8; color: var(--primary-color); }

/* === Loading Skeleton === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #2d3748 50%, #1e293b 75%);
    background-size: 200% 100%;
}

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