/* ============================================================
   URViews — Clean & Modern Theme
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Navbar */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.navbar-links { display: flex; align-items: center; gap: 1.25rem; }
.navbar-links a { color: var(--gray-600); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.navbar-links a:hover { color: var(--primary); }
.navbar-user { color: var(--gray-400); font-size: 0.85rem; }

/* Main content */
.main-content { flex: 1; padding: 2rem 1.5rem; }

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

/* Typography */
h1 { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; }
h2 { font-size: 1.4rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.85rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: all 0.15s ease;
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--gray-600); border-color: var(--gray-300); }
.btn-outline:hover { background: var(--gray-100); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Cards */
.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: #fff;
    transition: border-color 0.15s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: auto; }
.form-text { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.25rem; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Auth forms */
.auth-wrapper { max-width: 440px; margin: 2rem auto; }
.auth-wrapper .card { padding: 2rem; }
.auth-wrapper h1 { text-align: center; margin-bottom: 1.5rem; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--primary-light); color: #1e40af; border: 1px solid #bfdbfe; }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
tr:hover { background: var(--gray-50); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }
.badge-public { background: var(--primary-light); color: #1e40af; }
.badge-token { background: #fef3c7; color: #92400e; }

/* Likert Scale */
.likert-group { display: flex; gap: 0.5rem; justify-content: center; margin: 0.5rem 0; }
.likert-option {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    cursor: pointer;
}
.likert-option input { display: none; }
.likert-option .likert-circle {
    width: 40px; height: 40px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.9rem;
    transition: all 0.15s ease;
}
.likert-option input:checked + .likert-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.likert-option:hover .likert-circle {
    border-color: var(--primary);
}
.likert-label { font-size: 0.7rem; color: var(--gray-500); }
.likert-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--gray-400); margin-top: 0.25rem; }

/* Competency / Rating / Yes-No scales */
.competency-group, .yesno-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0;
}
.competency-option {
    cursor: pointer;
}
.competency-option input { display: none; }
.competency-pill {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--gray-600);
    background: #fff;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.competency-option:hover .competency-pill {
    border-color: var(--primary);
    color: var(--primary);
}
.competency-option input:checked + .competency-pill {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Section headings inside survey forms */
.section-card {
    background: var(--gray-50);
    border-left: 4px solid var(--primary);
    margin-bottom: 0.5rem;
}
.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .competency-group { flex-direction: column; }
    .competency-pill { text-align: center; display: block; }
}

/* Charts */
.chart-container { position: relative; height: 300px; margin: 1rem 0; }

/* Grid layout for dashboard */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .navbar-inner { flex-wrap: wrap; gap: 0.5rem; }
    .navbar-links { gap: 0.75rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Survey form styling */
.survey-form .question-block {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.survey-form .question-text {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}
.survey-form .question-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* Page header */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-header h1 { margin-bottom: 0; }

/* Pagination */
.pagination { display: flex; gap: 0.25rem; justify-content: center; margin-top: 1.5rem; }
.pagination a, .pagination span {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--gray-600);
}
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { background: var(--gray-100); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.tab {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem; font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
}
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   Landing Page
   ============================================================ */

.landing { overflow: hidden; }

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    padding: 3rem 0 4rem;
    min-height: calc(100vh - 200px);
}
.hero-content { max-width: 500px; }
.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }

.hero-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-svg {
    width: 100%;
    max-width: 440px;
    height: auto;
    animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid var(--gray-200);
}
.feature-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    background: var(--primary-light);
    border-radius: 50%;
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Tagline */
.landing-tagline {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-400);
    padding: 2rem 0 1rem;
}

/* Landing responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 0 3rem;
    }
    .hero-content { max-width: 100%; }
    .hero-title { font-size: 2rem; }
    .hero-actions { justify-content: center; }
    .hero-graphic { order: -1; }
    .hero-svg { max-width: 320px; }
    .features { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
