/* ==========================================================================
   CSS Reset & Variables
   ========================================================================== */
:root {
    --primary: #2563EB; /* Vibrant Blue */
    --primary-hover: #1D4ED8;
    --primary-light: rgba(37, 99, 235, 0.1);
    
    --background: #0f172a; /* Dark sleek background */
    --surface: #1e293b;
    --surface-hover: #334155;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent: #10B981; /* Emerald */
    --danger: #EF4444;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4 { font-weight: 600; color: var(--text-main); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button, input { font-family: inherit; }

.text-sm { font-size: 0.875rem; color: var(--text-muted); }
.text-xs { font-size: 0.75rem; }
.text-gradient {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-xxl { font-size: 3rem; }
.text-center { text-align: center; }

.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.p-2 { padding: 1.5rem; } .p-3 { padding: 2.5rem; }

.space-y-2 > * + * { margin-top: 1.5rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.brand span { color: var(--primary); }

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

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
}
.nav-link:hover { color: var(--text-main); }

.user-greeting { font-size: 0.9rem; color: var(--text-muted); }

/* ==========================================================================
   Components
   ========================================================================== */
/* Glass Panel */
.glass-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-full { width: 100%; padding: 0.8rem; font-size: 1.05rem; }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.form-group input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--background);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Role Selector (Radio buttons designed as cards) */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.role-option input[type="radio"] { display: none; }
.role-card {
    padding: 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}
.role-option input[type="radio"]:checked + .role-card {
    border-color: var(--primary);
    background: var(--primary-light);
}
.role-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.role-title { font-weight: 600; margin-bottom: 0.25rem; }
.role-desc { font-size: 0.8rem; color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-client { background: rgba(16, 185, 129, 0.1); color: var(--accent); }
.badge-freelancer { background: rgba(139, 92, 246, 0.1); color: #C084FC; }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
    border-left: 4px solid var(--danger);
}

/* ==========================================================================
   Layout Structures & Pages
   ========================================================================== */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}
.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.auth-header p { color: var(--text-muted); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.link { color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Dashboard Pages */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header-content p { color: var(--text-muted); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.dashboard-sidebar { padding: 1.5rem; }
.profile-summary { text-align: center; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.dashboard-nav ul { list-style: none; }
.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
}
.dashboard-nav a:hover, .dashboard-nav a.active {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.dashboard-nav .icon { font-size: 1.2rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.stat-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.stat-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 700; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.profile-card { text-align: center; padding: 1.5rem 1rem; transition: transform 0.2s; cursor: pointer; }
.profile-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); }
.profile-card .avatar { width: 48px; height: 48px; font-size: 1rem; margin-bottom: 0.75rem; }

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
