/* === Variables & Reset === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --gray-900: #1a1a1a;
    --gray-800: #333333;
    --gray-700: #4a4a4a;
    --gray-600: #636161;
    --gray-500: #888888;
    --gray-400: #aaaaaa;
    --gray-300: #d1d1d1;
    --gray-200: #e8eaed;
    --gray-100: #f3f5f8;
    --gray-50: #f9fafb;

    --teal-700: #3a7f88;
    --teal-600: #4799a3;
    --teal-500: #57c7d4;
    --teal-400: #7dd5df;
    --teal-300: #a3e3ea;
    --teal-200: #c9eff3;
    --teal-100: #e0f4f7;
    --teal-50: #f0fafb;

    --white: #ffffff;
    --black: #1a1a1a;

    --gradient: linear-gradient(135deg, #4799a3, #57c7d4);
    --gradient-dark: linear-gradient(135deg, #3a7f88, #4799a3);
    --gradient-subtle: linear-gradient(135deg, #e0f4f7, #c9eff3);

    --success: #16a34a;
    --success-light: #22c55e;
    --success-bg: #dcfce7;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.12), 0 4px 8px -4px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

    --sidebar-width: 240px;
    --sidebar-collapsed: 60px;
    --header-height: 60px;

    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

a { color: var(--teal-600); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--teal-700); }

button { font-family: var(--font); cursor: pointer; border: none; background: none; }

input, select, textarea { font-family: var(--font); font-size: 0.875rem; }

/* === Utilities === */
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--gray-500); }
.text-teal { color: var(--teal-600); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }

/* === Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: var(--gray-200); color: var(--gray-700); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-soon { background: #fef3c7; color: #92400e; }

.badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* === Button === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(71, 153, 163, 0.3);
}
.btn-primary:hover {
    background: var(--gradient-dark);
    box-shadow: 0 4px 12px rgba(71, 153, 163, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--white);
    border: 2px solid var(--teal-500);
    color: var(--teal-700);
}
.btn-outline:hover {
    background: var(--teal-50);
    border-color: var(--teal-600);
    color: var(--teal-700);
}

.btn-ghost {
    color: var(--gray-600);
    padding: 6px 10px;
}
.btn-ghost:hover { background: var(--gray-200); color: var(--gray-900); }

.btn-danger {
    color: var(--danger);
    border: 2px solid var(--danger);
    background: var(--white);
}
.btn-danger:hover { background: var(--danger-bg); }

.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-icon { padding: 6px; border-radius: var(--radius-sm); }

/* === Skeleton loading === */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; margin: 4px 0; }
.skeleton-text-lg { height: 18px; margin: 4px 0; }
.skeleton-circle { border-radius: 50%; }

/* === Toast === */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--black);
    color: var(--white);
    font-size: 0.8125rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

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