/* LocalRank — Phase 1 Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-danger: #dc2626;
    --color-success: #16a34a;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-700: #374151;
    --color-gray-900: #111827;
    --sidebar-width: 240px;
    --header-height: 56px;
}

body { font-family: system-ui, -apple-system, sans-serif; color: var(--color-gray-900); background: var(--color-gray-50); line-height: 1.5; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Buttons */
.btn { display: inline-block; padding: .5rem 1.25rem; border-radius: 6px; font-size: .9rem; font-weight: 500; cursor: pointer; border: none; transition: background .15s; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }
.btn-full { width: 100%; text-align: center; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; color: var(--color-gray-700); }
.form-group input { width: 100%; padding: .5rem .75rem; border: 1px solid var(--color-gray-200); border-radius: 6px; font-size: .9rem; }
.form-group input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* Public Header */
.site-header { background: #fff; border-bottom: 1px solid var(--color-gray-200); height: var(--header-height); display: flex; align-items: center; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.site-header .logo { font-weight: 700; font-size: 1.1rem; color: var(--color-primary); }
.site-header nav a, .site-header nav button { margin-left: 1.5rem; font-size: .9rem; background: none; border: none; cursor: pointer; color: var(--color-gray-700); }

.main-content { padding: 2rem 0; min-height: calc(100vh - var(--header-height) - 56px); }
.site-footer { border-top: 1px solid var(--color-gray-200); padding: 1rem 0; text-align: center; font-size: .85rem; color: var(--color-gray-700); }

/* Hero */
.hero { text-align: center; padding: 5rem 1rem; }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: var(--color-gray-700); margin-bottom: 2rem; }

/* Auth */
.auth-body { background: var(--color-gray-100); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-wrapper { width: 100%; max-width: 420px; padding: 1rem; }
.auth-card { background: #fff; border-radius: 10px; padding: 2.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.auth-logo { text-align: center; margin-bottom: 1.5rem; font-size: 1.3rem; font-weight: 700; }
.auth-logo a { color: var(--color-primary); }
.auth-card h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }

/* Admin / App sidebar layout */
.admin-body, .app-body { display: flex; min-height: 100vh; }
.admin-sidebar, .app-sidebar { width: var(--sidebar-width); background: var(--color-gray-900); color: #fff; flex-shrink: 0; }
.sidebar-logo { padding: 1.25rem 1.5rem; font-weight: 700; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav { padding: .75rem; }
.sidebar-nav a { display: block; padding: .5rem .75rem; border-radius: 6px; color: rgba(255,255,255,.8); font-size: .9rem; margin-bottom: .25rem; }
.sidebar-nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.admin-main, .app-main { flex: 1; display: flex; flex-direction: column; }
.admin-header, .app-header { height: var(--header-height); background: #fff; border-bottom: 1px solid var(--color-gray-200); display: flex; align-items: center; justify-content: flex-end; padding: 0 1.5rem; gap: 1rem; font-size: .9rem; }
.admin-header button, .app-header button { background: none; border: none; cursor: pointer; color: var(--color-primary); font-size: .9rem; }
.admin-content, .app-content { padding: 2rem; flex: 1; }

/* Dashboard */
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 { font-size: 1.6rem; font-weight: 700; }
.dashboard-header p { color: var(--color-gray-700); margin-top: .25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.stat-card { background: #fff; border: 1px solid var(--color-gray-200); border-radius: 8px; padding: 1.25rem; }
.stat-card h3 { font-size: .85rem; font-weight: 600; color: var(--color-gray-700); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 2rem; font-weight: 700; display: block; margin: .5rem 0; }
.stat-card p { font-size: .8rem; color: var(--color-gray-700); }
.empty-state { text-align: center; padding: 4rem; color: var(--color-gray-700); background: #fff; border: 1px solid var(--color-gray-200); border-radius: 8px; }
