/* 
    Vibe Design System inspired by Google Labs Stitch AI UI
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
    --bg-dark: #09090b;
    --bg-card: rgba(24, 24, 27, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glow-primary: rgba(139, 92, 246, 0.4);
    --glow-secondary: rgba(236, 72, 153, 0.4);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background gradient blobs */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
}

body::before {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
}

body::after {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}
a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px var(--glow-primary);
}

.container {
    max-width: 1600px;
    width: 95vw;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px var(--glow-primary) inset;
    border-color: rgba(255,255,255,0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1rem;
}

.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.card-content {
    transition: all 0.3s ease;
}

.glass-card.collapsed .card-content {
    display: none;
}

.glass-card.collapsed {
    padding-bottom: 1rem;
}

.btn-icon {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: help;
    margin-left: 0.5rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.help-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Tooltip System */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 0.75rem 1rem;
    background: #1e1e2e;
    color: white;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    white-space: normal;
    width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    text-align: center;
    pointer-events: none;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Dashboard Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
}

.dashboard-main-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-main-layout { grid-template-columns: 1fr; }
}

.text-brand {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow-primary);
    background: rgba(0,0,0,0.6);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--glow-secondary);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px var(--glow-secondary);
    transform: scale(1.02);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    transform: scale(1.02);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), var(--danger));
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
    transform: scale(1.02);
}

.btn-indigo {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-indigo:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

@media (max-width: 768px) {
    .grid { gap: 1rem; }
}

/* Navbar */
.navbar {
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.user-badge {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0.5rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
    }
    .user-badge {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

.action-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

@media (max-width: 480px) {
    .action-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }
    /* Make the 5th button full width if odd number */
    .action-bar .btn:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

.cash-display {
    color: var(--success);
    font-weight: bold;
    font-family: var(--font-heading);
    text-shadow: 0 0 10px rgba(16,185,129,0.5);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: #6ee7b7;
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
