@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

:root {
    /* Modern Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-hover: #1e1e2a;
    
    --text-primary: #e4e4e7;
    --text-muted: #71717a;
    --text-bright: #fafafa;
    --text-accent: #a1a1aa;
    
    --border-color: #27272a;
    --border-hover: #3f3f46;
    --border-active: #52525b;
    
    /* Vibrant Accent Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-subtle: rgba(99, 102, 241, 0.1);
    
    --success: #10b981;
    --success-light: #34d399;
    --success-glow: rgba(16, 185, 129, 0.4);
    
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-glow: rgba(239, 68, 68, 0.4);
    
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    
    --info: #06b6d4;
    --info-light: #22d3ee;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    
    /* Glass Effects */
    --glass-bg: rgba(18, 18, 26, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(99, 102, 241, 0.2); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.6s ease-out forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.6s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.6s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.4s ease-out forwards; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-glow { animation: glow 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }

/* ============================================
   CONTAINER
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.875rem 0;
    animation: fadeInDown 0.5s ease-out;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-glow), transparent);
    opacity: 0.5;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-bright);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform var(--transition-fast);
}

.brand:hover {
    transform: scale(1.02);
}

.brand-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.brand-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.brand-dot svg {
    width: 18px;
    height: 18px;
    fill: white;
    position: relative;
    z-index: 1;
}

.brand span:last-child {
    background: linear-gradient(135deg, var(--text-bright) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-light);
    background: var(--primary-subtle);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Logout button special style */
.nav-link.logout {
    color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    padding: 2.5rem 0 4rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   GRID & CARDS
   ============================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-card);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.1);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Card stagger animations */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-light);
    transition: all var(--transition-base);
}

.card:hover .card-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-meta svg {
    opacity: 0.6;
}

.card-slug {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    word-break: break-all;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

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

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

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-bright);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-bright);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-control:hover {
    border-color: var(--border-hover);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle), 0 0 20px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 2.75rem;
}

.input-icon-wrapper svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   CODE EDITOR
   ============================================ */

.code-editor {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    tab-size: 4;
    line-height: 1.7;
    letter-spacing: 0;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    animation: fadeInDown 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success-light);
}

.alert-success::before {
    background: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-light);
}

.alert-danger::before {
    background: var(--danger);
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.2);
    color: var(--info-light);
}

.alert-info::before {
    background: var(--info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning-light);
}

.alert-warning::before {
    background: var(--warning);
}

/* ============================================
   SEARCH HEADER
   ============================================ */

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease-out;
}

.search-header h1 {
    color: var(--text-bright);
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-bright) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-header p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input-wrapper .form-control {
    padding-left: 2.75rem;
    background: var(--bg-secondary);
}

.search-input-wrapper svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   TABLE
   ============================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease-out;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9375rem;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-accent);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.table tbody tr:hover td:first-child {
    color: var(--primary-light);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    background: var(--bg-secondary);
    margin-top: auto;
    position: relative;
    z-index: 1;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--primary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    animation: fadeIn 0.6s ease-out;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.5s ease-out;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.login-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--primary-subtle);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    position: relative;
}

.login-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    opacity: 0.2;
    filter: blur(10px);
}

/* ============================================
   EDITOR TABS
   ============================================ */

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 0.25rem;
}

.editor-tab {
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.editor-tab:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.05);
}

.editor-tab.active {
    color: var(--text-bright);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(120%);
    opacity: 0;
    transition: all var(--transition-bounce);
    max-width: 400px;
    backdrop-filter: blur(20px);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

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

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.6s ease-out;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background: var(--primary-subtle);
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.empty-state h2 {
    color: var(--text-bright);
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ============================================
   BADGE / PILL
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: var(--primary-subtle);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ============================================
   SELECTION
   ============================================ */

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-bright);
}

/* ============================================
   FOCUS VISIBLE
   ============================================ */

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .search-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-header h1 {
        font-size: 1.5rem;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .brand {
        font-size: 1.125rem;
    }
    
    .brand-dot {
        width: 28px;
        height: 28px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body::before,
    .navbar,
    footer,
    .toast,
    .btn,
    .search-header {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card,
    .table-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}