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

:root {
    --bg-dark: #0d0d0f;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-glow: rgba(249, 115, 22, 0.2);
    --border: #27272a;
    --success: #22c55e;
    --error: #ef4444;
}

body {
    font-family: 'Satoshi', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-weight: 700;
}

/* Logo */
.logo {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-family: 'Satoshi', sans-serif;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--error);
    color: white;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Satoshi', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* User Type Selector */
.user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.type-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.type-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

.type-btn small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.type-btn:hover {
    border-color: var(--accent);
}

.type-btn.active {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
}

.type-btn.active svg {
    color: var(--accent);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar-nav {
    flex: 1;
    margin-top: 32px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.sidebar-nav a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 40px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.25rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Skills Tags */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.skill-tag {
    padding: 4px 12px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
}

.skill-tag.removable {
    cursor: pointer;
}

.skill-tag.removable:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Designer Card */
.designer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.designer-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.designer-image {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-family: 'Cabinet Grotesk', sans-serif;
    font-weight: 800;
    color: var(--text-secondary);
}

.designer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.designer-info {
    padding: 20px;
}

.designer-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.designer-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.designer-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.designer-actions {
    display: flex;
    gap: 8px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.portfolio-item {
    aspect-ratio: 1;
    background: var(--bg-card-hover);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item .overlay h4 {
    font-size: 0.9rem;
}

/* Contact Request Cards */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-from {
    font-weight: 600;
}

.contact-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.contact-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 8px;
}

/* Match Score */
.match-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* AI Match Section */
.match-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}

.match-form h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-form h3 svg {
    color: var(--accent);
}

.match-results {
    margin-top: 24px;
}

.match-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.match-avatar {
    width: 60px;
    height: 60px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.match-info {
    flex: 1;
}

.match-info h4 {
    margin-bottom: 4px;
}

.match-reason {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

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

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.available {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-badge.busy {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.status-badge.unavailable {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .user-type-selector {
        grid-template-columns: 1fr;
    }

    .match-card {
        flex-direction: column;
    }

    .auth-card {
        padding: 24px;
    }
}
