:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 0.75rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
}

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
}

/* Sidebar */
.filters {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    height: fit-content;
}

.filter-group { margin-bottom: 1.5rem; }
.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.filter-group select, .filter-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-family: inherit;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: #eff6ff; }
.btn-secondary { background: #64748b; }
.btn-sm { font-size: 0.875rem; padding: 0.25rem 0.5rem; }

/* Grid */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card-img-top {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f1f5f9;
}
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.125rem; margin-bottom: 0.5rem; }
.card-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.25rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tag {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.open { display: flex; }
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}
.close-modal {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none; cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; }
.form-control { width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: 0.375rem; }

/* Dashboard Tables */
.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { padding: 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: #f8fafc; }
