/* Spanish IT Contract Tracker - Modern Premium Design */

:root {
    /* Core Palette - Refined for 2026 */
    --space-indigo: #1a1a2e;
    --space-indigo-light: #25253d;
    --navy-deep: #0d0d14;
    --navy-mid: #16162b;
    --dusty-grape: #3d3d5c;
    --lilac-ash: #8b8b9f;
    --almond-silk: #d4a89a;
    --seashell: #faf8f6;
    --seashell-dark: #f0ebe7;

    /* Accent Colors - Vibrant but sophisticated */
    --accent-coral: #e07a5f;
    --accent-teal: #3d9a8b;
    --accent-gold: #d4a843;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #34d399;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Applied Colors */
    --primary: var(--space-indigo);
    --primary-hover: var(--space-indigo-light);
    --background: var(--seashell);
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text-primary: var(--space-indigo);
    --text-secondary: var(--dusty-grape);
    --text-muted: var(--lilac-ash);
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);
    --border-focus: var(--accent-teal);
    --accent: var(--almond-silk);
    --amount-color: var(--success);

    /* Typography - Clean and modern */
    --font-display: 'Inter', system-ui, sans-serif;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

    /* Modern Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Layered Shadows - More depth */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(212, 168, 154, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(20px);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--background);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    overflow-x: hidden;
}

/* Selection styling */
::selection {
    background: var(--accent-coral);
    color: white;
}

/* ===========================================
   Header - Modern glassmorphism
   =========================================== */

header {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--space-indigo) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-coral) 50%,
        transparent 100%
    );
    opacity: 0.4;
}

/* Make header non-sticky on mobile to free up screen space */
@media (max-width: 640px) {
    header {
        position: relative;
    }
}

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

@media (max-width: 640px) {
    header nav {
        padding: 0.75rem 1rem;
    }
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .logo-mark {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    filter: brightness(0) invert(1);  /* Make dark logo white on dark header */
}

.logo:hover {
    color: var(--almond-silk);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 200ms ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-login {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 0.5rem;
}

.nav-login:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* ===========================================
   Main Layout
   =========================================== */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* Search page full-width override */
main:has(.search-page) {
    max-width: none;
    padding: 0;
}

/* Full-width hero pages (about, guides index) */
main:has(.about-page),
main:has(.guides-index) {
    max-width: none;
    padding: 0;
}

/* Line clamp utility for older browsers */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    background: linear-gradient(180deg, transparent 0%, rgba(34, 34, 59, 0.03) 100%);
}

footer a {
    color: var(--dusty-grape);
    text-decoration: none;
    font-weight: 500;
}

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

/* ===========================================
   Typography - Modern and refined
   =========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--accent-coral);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--space-indigo);
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===========================================
   Buttons - More polish
   =========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Shimmer effect on hover */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--space-indigo);
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 4px 12px rgba(26, 26, 46, 0.2);
}

.btn-primary:hover {
    background: var(--space-indigo-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 24px rgba(26, 26, 46, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--seashell);
    border-color: var(--accent-coral);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-coral) 0%, #c96b52 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(224, 122, 95, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: var(--seashell-dark);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled::before {
    display: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--error);
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.btn-block {
    width: 100%;
}

/* ===========================================
   Search Section - Hero treatment
   =========================================== */

/* Search Page Layout */
.search-page {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: -1.5rem;
}

/* ===========================================
   Modern Search Hero
   =========================================== */

.search-hero {
    position: relative;
    padding: 3rem 1.5rem 2.5rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, #2d2d50 50%, var(--dusty-grape) 100%);
    overflow: hidden;
}

.search-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 173, 167, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(154, 140, 152, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.search-hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--almond-silk);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.search-hero-badge svg {
    flex-shrink: 0;
}

.search-hero h1 {
    font-family: var(--font-display);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.search-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0 0 2rem 0;
    line-height: 1.5;
}

/* Search Box */
.search-hero-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    background: white;
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box-icon {
    flex-shrink: 0;
    margin-left: 1rem;
    color: var(--lilac-ash);
    transition: color 200ms ease;
}

.search-box-input {
    flex: 1;
    border: none;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--text-primary);
    min-width: 0;
}

.search-box-input:focus {
    outline: none;
}

.search-box-input:focus ~ .search-box-icon,
.search-box:focus-within .search-box-icon {
    color: var(--dusty-grape);
}

.search-box-input::placeholder {
    color: var(--lilac-ash);
}

.search-box-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
}

.search-box-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 34, 59, 0.3);
}

.search-box-btn svg {
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.search-box-btn:hover svg {
    transform: translateX(2px);
}

/* Filters Toggle */
.filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem auto 0;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms ease;
}

.filters-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.filters-chevron {
    transition: transform 200ms ease;
}

.filters-panel.filters-open ~ .filters-toggle .filters-chevron,
.filters-open + .filters-toggle .filters-chevron {
    transform: rotate(180deg);
}

/* Filters Panel */
.filters-panel {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.filters-panel.filters-open {
    display: block;
    animation: slideDown 200ms ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item.filter-wide {
    grid-column: 1 / -1;
}

.filter-item label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dusty-grape);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-item label svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.filter-item input,
.filter-item select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--seashell);
    color: var(--text-primary);
    transition: all 150ms ease;
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: var(--dusty-grape);
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 78, 105, 0.1);
}

.filter-input-group {
    position: relative;
    display: flex;
}

.filter-input-group input {
    padding-right: 3.5rem;
    width: 100%;
}

.filter-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lilac-ash);
    font-size: 0.8125rem;
    font-weight: 500;
    pointer-events: none;
}

.filters-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.btn-filter-apply {
    padding: 0.75rem 1.5rem;
    background: var(--space-indigo);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease;
}

.btn-filter-apply:hover {
    background: var(--dusty-grape);
}

.btn-filter-clear {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 150ms ease;
}

.btn-filter-clear:hover {
    color: var(--text-primary);
}

/* ===========================================
   Results Section - Modern
   =========================================== */

.results-section {
    background: var(--seashell);
    padding: 2rem 1.5rem 3rem;
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
}

.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(34, 34, 59, 0.04);
}

.results-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.results-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50px;
}

.results-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.results-query {
    color: var(--text-muted);
}

.results-query strong {
    color: var(--text-primary);
}

.btn-clear-search {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--seashell);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms ease;
}

.btn-clear-search:hover {
    background: var(--dusty-grape);
    color: white;
}

.btn-clear-search svg {
    flex-shrink: 0;
}

/* ===========================================
   Contract Cards - Modern Grid
   =========================================== */

.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.contract-card-modern {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.contract-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-teal));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.contract-card-modern:hover {
    border-color: transparent;
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border);
    transform: translateY(-4px);
}

.contract-card-modern:hover::before {
    opacity: 1;
}

.contract-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #fafaf8 0%, #f7f5f3 100%);
}

.contract-amount-badge {
    font-weight: 700;
    font-size: 1rem;
    color: var(--amount-color);
    letter-spacing: -0.01em;
}

.contract-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contract-card-body {
    flex: 1;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
}

.contract-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
    transition: color 150ms ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contract-card-body:hover .contract-card-title {
    color: var(--dusty-grape);
}

.contract-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem 1rem;
}

.contract-org {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 0;
}

.contract-org svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.contract-org span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contract-cpv-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: var(--seashell);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dusty-grape);
    flex-shrink: 0;
}

.contract-cpv-tag svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.contract-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--seashell);
    color: var(--dusty-grape);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 150ms ease;
    border-top: 1px solid var(--border-light);
}

.contract-card-link:hover {
    background: var(--space-indigo);
    color: white;
}

.contract-card-link svg {
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.contract-card-link:hover svg {
    transform: translateX(3px);
}

/* Legacy card styles for backwards compat */
.contracts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contract-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 200ms ease;
    position: relative;
}

.contract-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--lilac-ash);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transition: all 200ms ease;
}

.contract-card:hover {
    border-color: var(--almond-silk);
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.contract-card:hover::before {
    background: linear-gradient(180deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    width: 6px;
}

.contract-link {
    text-decoration: none;
    color: inherit;
}

.contract-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 150ms ease;
}

.contract-link:hover .contract-title {
    color: var(--dusty-grape);
}

.contract-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.contract-amount {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 700;
    color: var(--amount-color);
    font-size: 0.9375rem;
    background: linear-gradient(135deg, #e8f5ec 0%, #d4edda 100%);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
}

.contract-amount svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.contract-date,
.contract-cpv {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.contract-date svg,
.contract-cpv svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.contract-buyer {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.contract-buyer svg {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ===========================================
   Pagination - Modern
   =========================================== */

.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--seashell);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms ease;
}

.pagination-btn:hover {
    background: var(--dusty-grape);
    color: white;
}

.pagination-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms ease;
}

.pagination-page:hover {
    background: var(--seashell);
    color: var(--text-primary);
}

.pagination-current {
    background: var(--space-indigo);
    color: white;
}

.pagination-current:hover {
    background: var(--space-indigo);
    color: white;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

/* Legacy pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--seashell);
    border-radius: var(--radius-md);
}

/* ===========================================
   Empty State - Modern
   =========================================== */

.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.empty-state-modern .empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--seashell) 0%, #ebe6e2 100%);
    border-radius: 50%;
    color: var(--lilac-ash);
}

.empty-state-modern h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state-modern p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-empty-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--space-indigo);
    color: white;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 150ms ease;
}

.btn-empty-clear:hover {
    background: var(--dusty-grape);
    transform: translateY(-1px);
}

/* ===========================================
   Contract Detail Page
   =========================================== */

.contract-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-link {
    color: var(--dusty-grape);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 150ms ease;
}

.breadcrumb-link:hover {
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(-2px);
}

/* Contract detail header - gradient like dashboard */
.contract-detail-header {
    position: relative; /* Override sticky from base header */
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    border-radius: var(--radius-2xl);
    padding: 2rem 2.5rem;
    color: white;
    box-shadow: none; /* Remove sticky header shadow */
}

@media (max-width: 640px) {
    .contract-detail-header {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-lg);
    }
}

.contract-detail-header h1 {
    color: white;
    line-height: 1.3;
    font-size: 1.5rem;
    margin: 0.75rem 0 1rem 0;
}

@media (max-width: 640px) {
    .contract-detail-header h1 {
        font-size: 1.125rem;
        line-height: 1.4;
    }
}

.contract-detail-header .contract-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.contract-detail-header .badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contract-detail-header .badge svg {
    opacity: 0.8;
}

.contract-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.header-amount {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--lilac-ash);
    font-size: 0.9375rem;
}

/* Legacy support */
.contract-header {
    margin-bottom: 2.5rem;
}

.contract-header h1 {
    line-height: 1.3;
    font-size: 1.75rem;
}

.contract-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-cpv {
    background: linear-gradient(135deg, var(--seashell) 0%, var(--seashell-dark) 100%);
    color: var(--dusty-grape);
}

.badge-type {
    background: linear-gradient(135deg, var(--almond-silk) 0%, #d4c4be 100%);
    color: var(--space-indigo);
}

.contract-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .contract-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    transition: all 200ms ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--seashell);
}

.card dl {
    margin: 0;
}

.card dt {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.card dd {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.card dd:last-child {
    margin-bottom: 0;
}

.amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--amount-color);
    letter-spacing: -0.02em;
}

.amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--amount-color);
}

.detail-list {
    margin: 0;
}

.detail-list dt {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.detail-list dd {
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.detail-list dd:last-child {
    margin-bottom: 0;
}

.card-cta {
    background: linear-gradient(135deg, var(--seashell) 0%, white 100%);
    border: 2px dashed var(--border-light);
}

.org-name {
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.org-id {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    font-family: var(--font-mono);
}

code {
    background: var(--seashell);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--dusty-grape);
}

/* ===========================================
   Error State
   =========================================== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.error-section {
    text-align: center;
    padding: 5rem 2rem;
}

.error-section h1 {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.error-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* ===========================================
   Navigation
   =========================================== */

@media (max-width: 640px) {
    header nav {
        padding: 0.875rem 1rem;
    }

    .logo {
        flex-shrink: 0;
    }

    .logo .logo-text {
        display: none;
    }

    .logo .logo-mark {
        height: 28px !important;
    }

    .logo::before {
        display: none;
    }

    .nav-links {
        gap: 0.125rem;
        flex-shrink: 0;
    }

    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ===========================================
   Auth Pages - Modern glassmorphism design
   =========================================== */

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    align-items: center;
    min-height: calc(100vh - 200px);
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 440px;
        padding: 2rem 1rem;
    }
}

.auth-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-coral) 0%, var(--accent-gold) 50%, var(--accent-teal) 100%);
}

.auth-card::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(212, 168, 154, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.auth-header {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.auth-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9375rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--seashell);
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.auth-form input::placeholder {
    color: var(--lilac-ash);
}

.auth-form input:hover {
    border-color: var(--lilac-ash);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent-teal);
    background: white;
    box-shadow: 0 0 0 3px rgba(61, 154, 139, 0.15);
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: 0;
}

.auth-footer a {
    color: var(--dusty-grape);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-terms {
    margin-top: 0.75rem !important;
    font-size: 0.75rem !important;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--dusty-grape);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.auth-social {
    display: flex;
    gap: 0.75rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-github {
    background: #24292e;
    color: white;
    border: 1px solid #24292e;
}

.btn-github:hover {
    background: #1b1f23;
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid var(--border-light);
}

.btn-google:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.auth-features {
    padding: 2.5rem;
    background: linear-gradient(145deg, var(--space-indigo) 0%, var(--navy-mid) 100%);
    border-radius: var(--radius-2xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-features::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 168, 154, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.auth-features h2 {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 600;
    position: relative;
    color: white;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.features-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.features-list strong {
    display: block;
    color: white;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.features-list p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Alert boxes */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    color: var(--error);
}

.alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    color: var(--success);
}

.alert-success strong {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 1rem;
}

.alert-success p {
    margin: 0;
    font-size: 0.9375rem;
    opacity: 0.9;
}

/* ===========================================
   Dashboard - Polished and informative
   =========================================== */

.dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

/* Welcome Banner (post-checkout) */
.welcome-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem;
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
    border-bottom: 1px solid #6ee7b7;
}

.welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--success);
    border-radius: var(--radius-lg);
    color: white;
    flex-shrink: 0;
}

.welcome-content {
    flex: 1;
}

.welcome-content strong {
    display: block;
    font-size: 1rem;
    color: #065f46;
    margin-bottom: 0.25rem;
}

.welcome-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #047857;
}

.welcome-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    color: #065f46;
    opacity: 0.6;
    transition: all 150ms ease;
}

.welcome-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

/* ===========================================
   Premium Dashboard Hero
   =========================================== */

.dashboard-hero {
    position: relative;
    margin: -1.5rem -1.5rem 2rem;
    padding: 2.5rem 2rem;
    background:
        linear-gradient(135deg,
            var(--navy-deep) 0%,
            var(--navy-mid) 30%,
            #1e2a4a 60%,
            var(--space-indigo) 100%
        );
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

/* Curved top on desktop */
@media (min-width: 768px) {
    .dashboard-hero {
        margin: 1rem 1rem 2rem;
        border-radius: 24px;
    }
}

.dashboard-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        /* Warm accent glow bottom-left */
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(201, 173, 167, 0.25) 0%, transparent 50%),
        /* Cool accent glow top-right */
        radial-gradient(ellipse 50% 60% at 90% 10%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        /* Subtle center highlight */
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(201, 173, 167, 0.15) 0%, transparent 50%),
        /* Mesh pattern */
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(102, 126, 234, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-hero-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.dashboard-greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.greeting-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(201, 173, 167, 0.2) 0%, rgba(102, 126, 234, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: var(--almond-silk);
    backdrop-filter: blur(8px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.greeting-text {
    display: flex;
    flex-direction: column;
}

.greeting-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.greeting-text h1 {
    font-family: var(--font-display);
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
}

.dashboard-hero-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f6f4 100%);
    color: var(--space-indigo);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    backdrop-filter: blur(4px);
    backdrop-filter: blur(8px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===========================================
   Dashboard Search Section
   =========================================== */

.dashboard-search-section {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--seashell) 0%, white 50%, var(--seashell) 100%);
    border-radius: 16px;
    border: 1px solid var(--lilac-ash);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(34, 34, 59, 0.06);
}

.search-section-inner {
    padding: 2rem;
}

.search-section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--space-indigo);
    margin: 0 0 0.375rem;
}

.search-section-header p {
    font-size: 0.9375rem;
    color: var(--dusty-grape);
    margin: 0;
}

.dashboard-search-form {
    max-width: 680px;
    margin: 0 auto 1.25rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--lilac-ash);
    border-radius: 12px;
    padding: 0.25rem;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(34, 34, 59, 0.04);
}

.search-input-group:focus-within {
    border-color: var(--space-indigo);
    box-shadow: 0 4px 16px rgba(34, 34, 59, 0.1);
}

.search-input-group .search-icon {
    margin-left: 1rem;
    color: var(--lilac-ash);
    flex-shrink: 0;
}

.dashboard-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--space-indigo);
    outline: none;
}

.dashboard-search-input::placeholder {
    color: var(--lilac-ash);
}

.dashboard-search-btn {
    background: var(--space-indigo);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    flex-shrink: 0;
}

.dashboard-search-btn:hover {
    background: var(--dusty-grape);
    transform: translateY(-1px);
}

.search-suggestions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestions-label {
    font-size: 0.8125rem;
    color: var(--lilac-ash);
    margin-right: 0.25rem;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--lilac-ash);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--dusty-grape);
    text-decoration: none;
    transition: all 150ms ease;
}

.suggestion-chip:hover {
    border-color: var(--space-indigo);
    color: var(--space-indigo);
    background: var(--seashell);
}

.suggestion-chip.suggestion-highlight {
    background: rgba(74, 124, 89, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.suggestion-chip.suggestion-highlight:hover {
    background: rgba(74, 124, 89, 0.2);
}

@media (max-width: 640px) {
    .search-section-inner {
        padding: 1.5rem 1rem;
    }

    .search-section-header h2 {
        font-size: 1.25rem;
    }

    .search-input-group {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .search-input-group .search-icon {
        display: none;
    }

    .dashboard-search-input {
        width: 100%;
        text-align: center;
    }

    .dashboard-search-btn {
        width: 100%;
    }

    .search-suggestions {
        margin-top: 0.5rem;
    }

    .suggestions-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }
}

/* ===========================================
   Quick Info Badges
   =========================================== */

.quick-info-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(34, 34, 59, 0.08);
    border: 1px solid #d4ccd0;
}

.quick-info-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(34, 34, 59, 0.12);
    border-color: var(--space-indigo);
}

.quick-info-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.quick-info-badge .badge-count {
    font-size: 1.25rem;
    font-weight: 700;
}

.quick-info-badge .badge-label {
    font-size: 0.875rem;
    color: var(--dusty-grape);
}

.badge-new {
    color: #2e7d32;
}

.badge-new svg {
    color: #4caf50;
}

.badge-saved {
    color: var(--space-indigo);
}

.badge-saved svg {
    color: var(--space-indigo);
}

@media (max-width: 480px) {
    .quick-info-badges {
        flex-direction: column;
    }

    .quick-info-badge {
        width: 100%;
    }
}

/* ===========================================
   Premium Stats Grid
   =========================================== */

.stats-grid-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .stats-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid-premium {
        grid-template-columns: 1fr;
    }
}

.stat-card-premium {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 250ms ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(34, 34, 59, 0.12);
    border-color: var(--almond-silk);
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 200ms ease;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-value-premium {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.stat-label-premium {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Stat Card Variants */
.stat-total .stat-card-icon {
    background: linear-gradient(135deg, #f0eefc 0%, #e4e1f5 100%);
    color: var(--dusty-grape);
}
.stat-total .stat-value-premium {
    color: var(--dusty-grape);
}

.stat-active .stat-card-icon {
    background: linear-gradient(135deg, #e8f5ec 0%, #d4edda 100%);
    color: var(--success);
}
.stat-active .stat-value-premium {
    color: var(--success);
}

.stat-matches .stat-card-icon {
    background: linear-gradient(135deg, #eee9e6 0%, #e5ddd9 100%);
    color: var(--space-indigo);
}
.stat-matches .stat-value-premium {
    color: var(--space-indigo);
}

.stat-plan .stat-card-icon {
    background: linear-gradient(135deg, #fef3e2 0%, #fde8c8 100%);
    color: #b8860b;
}
.stat-plan .stat-value-premium {
    color: #b8860b;
}

/* ===========================================
   Premium Section Headers
   =========================================== */

.section-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.section-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dusty-grape);
}

.section-header-title h2 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.link-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dusty-grape);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: var(--seashell);
    border-radius: 8px;
    transition: all 150ms ease;
}

.link-view-all:hover {
    background: var(--space-indigo);
    color: white;
}

.link-view-all svg {
    transition: transform 200ms ease;
}

.link-view-all:hover svg {
    transform: translateX(3px);
}

/* ===========================================
   Premium Quick Actions
   =========================================== */

.quick-actions-premium {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-premium {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    text-decoration: none;
    transition: all 200ms ease;
}

.quick-action-premium:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 8px 24px rgba(34, 34, 59, 0.08);
    transform: translateX(4px);
}

.quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--seashell) 0%, #ebe6e2 100%);
    border-radius: 12px;
    color: var(--dusty-grape);
    flex-shrink: 0;
    transition: all 200ms ease;
}

.quick-action-premium:hover .quick-action-icon {
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    color: white;
}

.quick-action-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-action-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-action-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.quick-action-arrow {
    color: var(--lilac-ash);
    flex-shrink: 0;
    transition: all 200ms ease;
}

.quick-action-premium:hover .quick-action-arrow {
    color: var(--dusty-grape);
    transform: translateX(4px);
}

/* ===========================================
   Premium Empty State
   =========================================== */

.empty-state-premium {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #fafaf8 0%, #f5f3f0 100%);
    border: 1px dashed var(--border-light);
    border-radius: 16px;
}

.empty-state-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.5rem;
    background: white;
    border-radius: 50%;
    color: var(--lilac-ash);
    box-shadow: 0 4px 16px rgba(34, 34, 59, 0.06);
}

.empty-state-premium h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.empty-state-premium p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0 0 1.5rem 0;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.btn-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow: 0 4px 12px rgba(34, 34, 59, 0.2);
}

.btn-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 34, 59, 0.25);
}

/* Legacy Dashboard Styles - REMOVED, see Dashboard Header Redesign section */

/* Legacy Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 200ms ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--lilac-ash);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.link-subtle {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--seashell);
    border-radius: var(--radius-md);
    transition: all 150ms ease;
}

.link-subtle:hover {
    color: var(--text-primary);
    background: var(--seashell-dark);
}

/* Alert Cards (saved searches) */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    transition: all 200ms ease;
    box-shadow: var(--shadow-sm);
}

.alert-card:hover {
    border-color: var(--almond-silk);
    box-shadow: var(--shadow-md);
}

.alert-inactive {
    opacity: 0.6;
}

.alert-status {
    flex-shrink: 0;
}

.status-dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.status-dot.status-active {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
}

.status-dot.status-paused {
    background: var(--lilac-ash);
}

.alert-info {
    flex: 1;
    min-width: 0;
}

.alert-info h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.alert-meta span {
    background: var(--seashell);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.alert-query {
    font-style: italic;
}

.alert-frequency {
    text-transform: capitalize;
    background: linear-gradient(135deg, var(--almond-silk) 0%, #d4c4be 100%) !important;
    color: var(--space-indigo) !important;
}

.alert-details {
    display: flex;
    gap: 1rem;
    margin-top: 0.625rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-stats {
    text-align: center;
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    background: var(--seashell);
    border-radius: var(--radius-lg);
}

.match-count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dusty-grape);
    line-height: 1.1;
}

.match-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.inline-form {
    display: inline;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 200ms ease;
    box-shadow: var(--shadow-sm);
}

.quick-action-card:hover {
    border-color: var(--almond-silk);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===========================================
   Account Page — Redesigned
   =========================================== */

.account-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

@media (max-width: 640px) {
    .account-page {
        padding: 1.25rem 1rem 2rem;
    }
}

.account-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.account-page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--space-indigo);
}

.account-page-header p {
    margin: 0.25rem 0 0;
    color: var(--dusty-grape);
    font-size: 0.9375rem;
}

@media (max-width: 640px) {
    .account-page-header {
        flex-direction: column;
        gap: 1rem;
    }
    .account-page-header h1 {
        font-size: 1.5rem;
    }
}

.account-page .account-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.account-card-header svg {
    color: var(--dusty-grape);
    flex-shrink: 0;
}

.account-card-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--space-indigo);
}

.account-details {
    padding: 0.25rem 1.5rem;
}

.account-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.account-detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.account-detail-row .detail-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.account-detail-row .detail-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.account-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.625rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-card-actions {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* Logout card */
.account-card-logout {
    background: white;
}

.account-logout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
}

.account-logout-row h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--space-indigo);
}

.account-logout-row p {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* API Keys */
.api-key-banner {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--warning-bg);
    border-bottom: 1px solid var(--border-light);
}

.api-key-banner-icon {
    flex-shrink: 0;
    color: var(--warning);
    margin-top: 0.125rem;
}

.api-key-banner-content {
    flex: 1;
    min-width: 0;
}

.api-key-banner-content strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.api-key-banner-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-key-banner-value code {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    word-break: break-all;
    color: var(--text-primary);
}

.api-keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.api-keys-table th {
    text-align: left;
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
}

.api-keys-table td {
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.api-keys-table tbody tr:last-child td {
    border-bottom: none;
}

.api-key-name {
    font-weight: 500;
    color: var(--text-primary) !important;
}

.api-key-actions {
    display: flex;
    gap: 0.375rem;
    justify-content: flex-end;
}

.inline-form {
    display: inline;
}

.api-keys-empty {
    padding: 1.5rem 0;
    text-align: center;
}

.api-keys-empty p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.api-key-create-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.api-key-create-form input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.api-key-rate-info {
    margin: 0.625rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .api-keys-table th:nth-child(3),
    .api-keys-table td:nth-child(3) {
        display: none;
    }
    .api-key-banner-value {
        flex-direction: column;
        align-items: stretch;
    }
    .api-key-create-form {
        flex-direction: column;
    }
    .api-key-create-form input[type="text"] {
        width: 100%;
    }
}

.badge-free {
    background: var(--seashell);
    color: var(--dusty-grape);
}

.badge-pro {
    background: linear-gradient(135deg, var(--almond-silk) 0%, #d4c4be 100%);
    color: var(--space-indigo);
}

.badge-enterprise {
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    color: white;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.plan-features li {
    padding: 0.625rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.plan-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

/* (upgrade-cta removed — billing page handles this now) */
    margin: 0 0 1rem 0;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ===========================================
   Forms (Alert Form)
   =========================================== */

.form-container {
    max-width: 640px;
}

.alert-form {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.form-section {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

.section-hint {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0 0 1.75rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
}

.required {
    color: var(--error);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    background: var(--seashell);
    color: var(--text-primary);
    transition: all 200ms ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--dusty-grape);
    background: white;
    box-shadow: 0 0 0 4px rgba(74, 78, 105, 0.1);
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: 0.5rem 0 0 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(180deg, var(--seashell) 0%, var(--seashell-dark) 100%);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-2xl);
}

.empty-state h2 {
    color: var(--text-secondary);
    font-size: 1.375rem;
    margin-bottom: 0.625rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

/* ===========================================
   htmx Loading States
   =========================================== */

.htmx-request {
    opacity: 0.6;
    pointer-events: none;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 640px) {
    main {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.625rem;
    }

    /* Modern Search Page Mobile */
    .search-page {
        margin: -1.5rem -1rem;
    }

    .search-hero {
        padding: 2rem 1rem 2rem;
    }

    .search-hero h1 {
        font-size: 1.5rem;
    }

    .search-hero p {
        font-size: 0.9375rem;
    }

    .search-box {
        border-radius: 12px;
        padding: 0.375rem;
    }

    .search-input-container {
        flex-wrap: wrap;
    }

    .search-box-input {
        padding: 0.875rem 0.5rem;
        font-size: 0.9375rem;
    }

    .search-box-icon {
        margin-left: 0.75rem;
    }

    .search-box-btn {
        width: 100%;
        justify-content: center;
        margin-top: 0.25rem;
        padding: 0.75rem 1rem;
    }

    .search-box-btn span {
        display: inline;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .results-section {
        padding: 1.5rem 1rem 2rem;
    }

    .results-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .results-info {
        justify-content: center;
    }

    .contracts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contract-card-modern {
        border-radius: 12px;
    }

    .pagination-modern {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }

    .pagination-pages {
        order: -1;
        width: 100%;
        justify-content: center;
        margin: 0 0 0.5rem 0;
    }

    .pagination-btn {
        flex: 1;
        justify-content: center;
    }

    /* Legacy styles */
    .search-section {
        padding: 1.5rem;
    }

    .search-main {
        flex-direction: column;
    }

    .search-main .btn {
        width: 100%;
    }

    .contract-meta {
        gap: 0.625rem;
    }

    /* Premium Dashboard Mobile */
    .dashboard-hero {
        margin: -1.5rem -1rem 1.5rem;
        padding: 1.75rem 1.25rem;
        border-radius: 0 0 20px 20px;
    }

    .dashboard-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .greeting-icon {
        width: 48px;
        height: 48px;
    }

    .greeting-text h1 {
        font-size: 1.375rem;
    }

    .dashboard-hero-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.25rem;
    }

    .stat-card-premium {
        padding: 1.25rem;
    }

    .stat-card-icon {
        width: 42px;
        height: 42px;
    }

    .stat-value-premium {
        font-size: 1.625rem;
    }

    .quick-action-premium {
        padding: 1rem;
    }

    .quick-action-icon {
        width: 42px;
        height: 42px;
    }

    /* Dashboard header responsive */
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 1rem;
    }

    .dashboard-actions {
        margin-top: 0;
    }

    .alert-card {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
    }

    .alert-stats {
        order: -1;
        width: auto;
        margin-right: auto;
        padding: 0.5rem 0.75rem;
    }

    .match-count {
        display: inline;
        font-size: 1.125rem;
    }

    .match-label {
        display: inline;
        margin-left: 0.25rem;
    }

    .alert-actions {
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-light);
        flex-wrap: wrap;
    }
}

/* ===========================================
   AI Analysis Section
   =========================================== */

.ai-analysis {
    position: relative;
}

.ai-analysis::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dusty-grape) 0%, var(--lilac-ash) 50%, var(--almond-silk) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.ai-analysis h2::after {
    content: " (Beta)";
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.analysis-summary {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.analysis-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.analysis-item {
    flex: 1;
    min-width: 120px;
}

.analysis-item dt {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.analysis-item dd {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.complexity-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
}

.complexity-low {
    background: linear-gradient(135deg, #e8f5ec 0%, #d4edda 100%);
    color: var(--success);
}

.complexity-medium {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #b8860b;
}

.complexity-high {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: var(--error);
}

.analysis-section {
    margin-bottom: 1.25rem;
}

.analysis-section dt {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.analysis-section dd {
    margin: 0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--seashell) 0%, var(--seashell-dark) 100%);
    color: var(--dusty-grape);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
}

.requirements-list,
.red-flags-list {
    margin: 0;
    padding-left: 1.25rem;
}

.requirements-list li,
.red-flags-list li {
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.red-flags {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
}

.red-flags dt {
    color: var(--warning);
}

.red-flags-list li {
    color: #92400e;
}

.ai-analysis-cta {
    text-align: center;
    padding: 2.5rem;
}

.ai-analysis-cta p {
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
}

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

.landing-page {
    background: linear-gradient(180deg, var(--seashell) 0%, white 50%, var(--seashell) 100%);
    position: relative;
}

/* Subtle noise texture overlay for premium feel */
.landing-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

.landing-header {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: none;
}

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

.landing-header .logo {
    color: var(--space-indigo);
}

.landing-header .nav-link {
    color: var(--dusty-grape);
}

.landing-header .nav-link:hover {
    color: var(--space-indigo);
    background: rgba(34, 34, 59, 0.05);
}

.landing-header .nav-login {
    background: var(--space-indigo);
    color: white;
    border: none;
}

.landing-header .nav-login:hover {
    background: var(--space-indigo-light);
}

/* Logo mark */
.logo-mark {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* Text gradient for emphasis */
.text-gradient {
    background: linear-gradient(135deg, var(--dusty-grape) 0%, var(--almond-silk) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.1) 0%, rgba(74, 124, 89, 0.05) 100%);
    border: 1px solid rgba(74, 124, 89, 0.2);
    border-radius: var(--radius-2xl);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--success);
    margin-bottom: 1.5rem;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 1.5rem 0;
    color: var(--space-indigo);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--dusty-grape);
    margin: 0 0 2rem 0;
}

.hero-subtitle strong {
    color: var(--space-indigo);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--lilac-ash);
    margin: 0;
}

.hero-visual {
    position: relative;
    padding: 2rem;
}

/* Browser mockup for screenshot */
.hero-screenshot-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(34, 34, 59, 0.05);
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

.hero-browser-frame {
    background: linear-gradient(180deg, #f8f8f8 0%, #f0f0f0 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.browser-dots {
    display: flex;
    gap: 0.375rem;
}

.browser-dots span {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: #ddd;
}

.browser-dots span:first-child { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:last-child { background: #28ca42; }

.browser-url {
    flex: 1;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--lilac-ash);
    font-family: var(--font-mono);
}

.hero-screenshot {
    display: block;
    width: 100%;
    height: auto;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Social proof section */
.social-proof {
    padding: 2rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.social-proof-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.social-proof-users {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-stack {
    display: flex;
}

.avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid white;
    margin-left: -0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar:first-child {
    margin-left: 0;
}

.social-proof-users p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--dusty-grape);
}

.social-proof-users strong {
    color: var(--space-indigo);
}

.social-proof-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--lilac-ash);
}

.social-proof-source svg {
    color: var(--success);
    flex-shrink: 0;
}

.social-proof-source strong {
    color: var(--dusty-grape);
}

/* Stats bar */
.stats-bar {
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    padding: 3rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.stats-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.stat-desc {
    font-size: 0.875rem;
    color: var(--lilac-ash);
    margin-top: 0.25rem;
}

/* Features */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 200ms ease;
}

.feature-card:hover {
    border-color: var(--almond-silk);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--seashell) 0%, var(--seashell-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dusty-grape);
}

.feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
    color: var(--space-indigo);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--dusty-grape);
    margin: 0;
    line-height: 1.5;
}

/* Pricing */
.pricing {
    background: white;
    padding: 6rem 1.5rem;
}

.pricing h2 {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.pricing-subtitle {
    text-align: center;
    color: var(--dusty-grape);
    margin: 0 0 3rem 0;
    font-size: 1.125rem;
}

.pricing-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.pricing-card {
    background: var(--seashell);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.pricing-featured {
    background: white;
    border-color: var(--space-indigo);
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

.pricing-featured:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.pricing-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--space-indigo);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.pricing-header h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: var(--space-indigo);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--space-indigo);
    letter-spacing: -0.02em;
}

.price-period {
    font-size: 1rem;
    color: var(--dusty-grape);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.pricing-features li {
    padding: 0.625rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dusty-grape);
    font-size: 0.9375rem;
}

.pricing-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.875rem;
    width: 6px;
    height: 6px;
    background: var(--dusty-grape);
    border-radius: 50%;
}

.pricing-featured .pricing-features li::before {
    background: var(--success);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 6rem 1.5rem;
    background: linear-gradient(180deg, white 0%, var(--seashell) 100%);
}

.final-cta h2 {
    font-size: 2rem;
    margin: 0 0 0.75rem 0;
}

.final-cta p {
    color: var(--dusty-grape);
    font-size: 1.125rem;
    margin: 0 0 2rem 0;
}

/* Landing footer */
.landing-footer {
    background: var(--space-indigo);
    color: var(--seashell);
    padding: 4rem 1.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    display: block;
}

.footer-brand p {
    color: var(--lilac-ash);
    margin: 0;
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col h4 {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem 0;
}

.footer-col a {
    display: block;
    color: var(--lilac-ash);
    text-decoration: none;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    transition: color 150ms ease;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--lilac-ash);
    font-size: 0.8125rem;
    margin: 0;
}

.footer-bottom a {
    color: var(--almond-silk);
}

/* Landing page responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 6rem;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-badge {
        margin: 0 auto 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .stats-bar-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-proof-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.875rem;
    }

    .hero-visual {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .stats-bar-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .social-proof-users {
        flex-direction: column;
    }
}

/* ===========================================
   Dashboard Header Redesign
   =========================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    border-radius: var(--radius-2xl);
    margin-bottom: 2.5rem;
    color: white;
}

.dashboard-title h1 {
    color: white;
    font-size: 1.75rem;
    margin: 0 0 0.25rem 0;
}

.dashboard-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    margin: 0;
    font-weight: 400;
}

.dashboard-title .user-email {
    color: var(--lilac-ash);
    font-size: 0.9375rem;
    margin: 0;
    font-weight: 400;
}

.dashboard-actions .btn-primary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
}

.dashboard-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Quick actions redesign - no emojis */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 200ms ease;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.quick-action-card:hover {
    border-color: var(--almond-silk);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.quick-action-card .quick-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--seashell) 0%, var(--seashell-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dusty-grape);
}

.quick-action-card .quick-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: var(--dusty-grape);
}

.quick-action-card span:last-child {
    font-weight: 500;
    font-size: 0.9375rem;
}

/* ===========================================
   Enhanced Dashboard Elements
   =========================================== */

/* Stat card plan variant */
.stat-plan::before {
    background: linear-gradient(90deg, var(--almond-silk) 0%, #d4c4be 100%);
}

/* Alert status indicator */
.alert-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lilac-ash);
    flex-shrink: 0;
}

.alert-status-indicator.active {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2);
}

/* Alert tags */
.alert-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: var(--seashell);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--dusty-grape);
}

.alert-tag svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.alert-frequency-badge {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--dusty-grape) 0%, var(--lilac-ash) 100%);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Empty state enhancement */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-xl);
}

.empty-state-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--seashell) 0%, var(--seashell-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lilac-ash);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Card headers with icons */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header svg {
    color: var(--dusty-grape);
    flex-shrink: 0;
}

.card-header h2 {
    margin: 0;
    font-size: 1.125rem;
}

/* (account-card styles moved to Account Page section) */

/* Button danger outline variant */
.btn-danger-outline {
    border-color: var(--error);
    color: var(--error);
}

.btn-danger-outline:hover {
    background: rgba(155, 35, 53, 0.05);
    border-color: var(--error);
}

/* Button small variant */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ===========================================
   Print styles
   =========================================== */

@media print {
    header, footer, .btn, .pagination {
        display: none;
    }

    body {
        background: white;
    }

    .contract-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* ===========================================
   Page Hero (shared across about, guides, etc.)
   =========================================== */

.page-hero {
    position: relative;
    padding: 4rem 1.5rem 3.5rem;
    background: linear-gradient(135deg, #0d0d14 0%, var(--space-indigo) 40%, #2d2d50 70%, var(--dusty-grape) 100%);
    text-align: center;
    overflow: hidden;
}

.page-hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.page-hero-orbs::before,
.page-hero-orbs::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.page-hero-orbs::before {
    top: 20%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 122, 95, 0.15) 0%, transparent 70%);
}

.page-hero-orbs::after {
    bottom: 10%;
    right: -5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(61, 154, 139, 0.12) 0%, transparent 70%);
}

.page-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.page-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--almond-silk);
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.125rem;
    margin: 0;
    line-height: 1.6;
}

.page-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 1.25rem;
    backdrop-filter: blur(8px);
}

.page-hero .hero-badge svg {
    color: var(--almond-silk);
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .page-hero {
        padding: 3rem 1rem 2.5rem;
    }
    .page-hero h1 {
        font-size: 1.875rem;
    }
    .page-hero p {
        font-size: 1rem;
    }
}

/* Guide index cards */
.guide-card {
    display: block;
    background: #fff;
    border: 1px solid #e8e4e1;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 150ms ease;
}

.guide-card:hover {
    border-color: #d4a89a;
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.08);
}

.guide-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.4rem 0;
}

.guide-card p {
    color: #8b8b9f;
    font-size: 0.9rem;
    margin: 0;
}

/* ===========================================
   Legal Pages - Premium Design
   =========================================== */

.legal-page {
    margin: -1.5rem;
}

/* Legal Hero */
.legal-hero {
    position: relative;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, var(--space-indigo) 0%, #2d2d50 50%, var(--dusty-grape) 100%);
    text-align: center;
    overflow: hidden;
}

.legal-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 173, 167, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(154, 140, 152, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.legal-hero-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.legal-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: var(--almond-silk);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.legal-hero h1 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.03em;
}

.legal-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    margin: 0 0 1.5rem 0;
}

.legal-meta {
    display: flex;
    justify-content: center;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    font-weight: 500;
}

.legal-badge svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Legal Container */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* Legal Nav */
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(34, 34, 59, 0.04);
}

.legal-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
}

.legal-nav-link {
    padding: 0.375rem 0.75rem;
    background: var(--seashell);
    color: var(--dusty-grape);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms ease;
}

.legal-nav-link:hover {
    background: var(--dusty-grape);
    color: white;
}

/* Legal Content */
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Legal Card */
.legal-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: all 200ms ease;
}

.legal-card:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 4px 16px rgba(34, 34, 59, 0.08);
}

.legal-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--seashell) 0%, #ebe6e2 100%);
    border-radius: 12px;
    color: var(--dusty-grape);
    flex-shrink: 0;
}

.legal-card-icon-warning {
    background: linear-gradient(135deg, #fef3e2 0%, #fde8c8 100%);
    color: var(--warning);
}

.legal-card-content {
    flex: 1;
    min-width: 0;
}

.legal-card-content h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.legal-card-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 0.75rem 0;
}

.legal-card-content p:last-child {
    margin-bottom: 0;
}

.legal-card-content ul {
    margin: 0.75rem 0;
    padding: 0;
    list-style: none;
}

.legal-card-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.legal-card-content li svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--success);
}

.legal-list-muted li svg {
    color: var(--warning);
}

.legal-card-content a {
    color: var(--dusty-grape);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-card-content a:hover {
    color: var(--space-indigo);
}

/* Legal Callout */
.legal-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef8f0 0%, #fdf3e8 100%);
    border-radius: 10px;
    margin-top: 1rem;
    border-left: 3px solid var(--warning);
}

.legal-callout svg {
    flex-shrink: 0;
    color: var(--warning);
    margin-top: 0.125rem;
}

.legal-callout span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Legal Contact Card */
.legal-card-contact {
    background: linear-gradient(135deg, #fafaf8 0%, #f5f3f0 100%);
}

.legal-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--space-indigo);
    color: white;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: all 150ms ease;
}

.legal-email-btn:hover {
    background: var(--dusty-grape);
    transform: translateY(-1px);
    color: white;
}

.legal-email-btn svg {
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 640px) {
    .legal-hero {
        padding: 2rem 1rem;
    }

    .legal-hero h1 {
        font-size: 1.75rem;
    }

    .legal-hero-icon {
        width: 56px;
        height: 56px;
    }

    .legal-container {
        padding: 1.5rem 1rem 2rem;
    }

    .legal-nav {
        display: none;
    }

    .legal-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .legal-card-icon {
        width: 42px;
        height: 42px;
    }
}

/* ===========================================
   Billing Page — Redesigned
   =========================================== */

.billing-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

@media (max-width: 640px) {
    .billing-page {
        padding: 1.25rem 1rem 2rem;
    }
}

.billing-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.billing-page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: var(--space-indigo);
}

.billing-page-header p {
    margin: 0.25rem 0 0;
    color: var(--dusty-grape);
    font-size: 0.9375rem;
}

@media (max-width: 640px) {
    .billing-page-header {
        flex-direction: column;
        gap: 1rem;
    }
    .billing-page-header h1 {
        font-size: 1.5rem;
    }
}

/* Plan Card — shared */
.billing-plan-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.billing-plan-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 1.25rem;
    gap: 1rem;
}

.billing-plan-top-centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 0.5rem;
}

.billing-plan-info h2 {
    margin: 0.25rem 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--space-indigo);
}

.billing-plan-price {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dusty-grape);
}

.billing-plan-price span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Badges */
.billing-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-trial {
    background: linear-gradient(135deg, var(--dusty-grape), var(--space-indigo));
    color: white;
}

.badge-active {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-inactive {
    background: var(--seashell-dark);
    color: var(--text-secondary);
}

/* Trial countdown — compact, right-aligned */
.billing-plan-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--space-indigo), var(--dusty-grape));
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    min-width: 70px;
}

.billing-plan-countdown .countdown-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.billing-plan-countdown .countdown-label {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.125rem;
}

/* Detail rows */
.billing-plan-details {
    border-top: 1px solid var(--border-light);
    margin: 0 1.5rem;
    padding: 0.25rem 0;
}

.billing-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
}

.billing-detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-active {
    color: var(--success);
    font-weight: 600;
}

/* Actions */
.billing-plan-actions {
    padding: 1.25rem 1.5rem 1.5rem;
}

.billing-action-hint {
    margin: 0.625rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* Payment warning */
.billing-payment-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
    padding: 1rem 1.5rem;
    color: #991b1b;
}

.billing-payment-warning svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.billing-payment-warning p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Card variants — border accent */
.billing-plan-trial {
    border-color: var(--dusty-grape);
}

.billing-plan-active {
    border-color: var(--success);
}

.billing-plan-warning {
    border-color: var(--warning);
}

/* No-subscription pricing */
.billing-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.billing-pricing-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--space-indigo);
    line-height: 1;
}

.billing-pricing-meta {
    display: flex;
    flex-direction: column;
}

.billing-pricing-currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dusty-grape);
}

.billing-pricing-note {
    font-size: 0.8125rem;
    color: var(--success);
    font-weight: 500;
}

/* Features list — no-sub state */
.billing-features {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border-light);
}

.billing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.billing-features li svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Includes card — for subscribers */
.billing-includes-card {
    margin-top: 1rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
}

.billing-includes-card h3 {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--space-indigo);
}

.billing-includes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .billing-includes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.billing-include-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.billing-include-item svg {
    color: var(--dusty-grape);
    flex-shrink: 0;
}

/* Footer */
.billing-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.billing-footer a {
    color: var(--dusty-grape);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.billing-footer a:hover {
    color: var(--space-indigo);
}

/* Alert Styles (enhanced) */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.alert-content p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.alert-paywall {
    background: linear-gradient(135deg, #fef3cd 0%, #fff8e6 100%);
    border: 1px solid #f0d78c;
}

.alert-paywall .alert-icon {
    background: #f59e0b;
    color: white;
}

.alert-paywall .alert-content {
    color: #92400e;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
    border: 1px solid #6ee7b7;
}

.alert-success .alert-icon {
    background: var(--success);
    color: white;
}

.alert-success .alert-content {
    color: #065f46;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    border: 1px solid #fca5a5;
}

.alert-error .alert-icon {
    background: var(--error);
    color: white;
}

.alert-error .alert-content {
    color: #991b1b;
}

/* ===========================================
   Error Pages
   =========================================== */

.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-content {
    max-width: 480px;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--dusty-grape);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-page h1 {
    font-size: 1.75rem;
    color: var(--space-indigo);
    margin-bottom: 0.75rem;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================================
   Loading States
   =========================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Search form loading */
form.loading .search-btn,
form.loading button[type="submit"] {
    position: relative;
    color: transparent;
    pointer-events: none;
}

form.loading .search-btn::after,
form.loading button[type="submit"]::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===========================================
   Buyer Pages
   =========================================== */

/* List Page */
.buyers-page {
    min-height: 100vh;
}

.buyers-header-section {
    padding: 2rem 1.5rem 0;
}

.buyers-header-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.buyers-header-section .search-card {
    margin-bottom: 0;
}

.buyers-header-section .sort-options {
    margin-top: 0.75rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sort-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.sort-option {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.sort-option:hover {
    background: var(--lilac-ash);
    color: white;
}

.sort-option.active {
    background: var(--space-indigo);
    color: white;
}

.buyers-list {
    padding: 2rem 1.5rem;
}

.buyers-list .container {
    max-width: 1200px;
    margin: 0 auto;
}

.buyers-table-wrapper {
    overflow-x: auto;
}

.buyers-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.buyers-table th,
.buyers-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.buyers-table th {
    background: var(--warm-cream);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.buyers-table .col-name {
    min-width: 300px;
}

.buyers-table .col-contracts,
.buyers-table .col-value,
.buyers-table .col-open {
    text-align: right;
    white-space: nowrap;
}

.buyer-link {
    color: var(--space-indigo);
    text-decoration: none;
    font-weight: 500;
}

.buyer-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: var(--space-indigo);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.875rem;
}

.pagination-link:hover {
    background: var(--dusty-grape);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Detail Page */
.buyer-detail-page {
    min-height: 100vh;
}

.breadcrumb {
    background: var(--warm-cream);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb a {
    color: var(--space-indigo);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb .current {
    color: var(--text-secondary);
}

.buyer-hero {
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    padding: 2.5rem 1.5rem;
}

.buyer-hero .container {
    max-width: 1200px;
    margin: 0 auto;
}

.buyer-hero h1 {
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.buyer-hero .hero-subtitle {
    color: var(--lilac-ash);
    font-size: 1rem;
    margin: 0;
}

.buyer-stats {
    padding: 2rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.buyer-stats .container {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.25rem;
    background: var(--warm-cream);
    border-radius: var(--radius-lg);
}

.stat-card.stat-highlight {
    background: var(--success);
}

.stat-card.stat-highlight .stat-value,
.stat-card.stat-highlight .stat-label {
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--space-indigo);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.buyer-section {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.buyer-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.buyer-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--space-indigo);
    margin: 0 0 1.25rem;
}

.buyer-section-muted {
    background: var(--warm-cream);
}

.contracts-table-wrapper {
    overflow-x: auto;
}

.contracts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.contracts-table th,
.contracts-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.contracts-table th {
    background: var(--warm-cream);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.contracts-table .col-date {
    white-space: nowrap;
    width: 100px;
}

.contracts-table .col-amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
}

.contracts-table .col-deadline {
    white-space: nowrap;
}

.contracts-table .col-status {
    width: 80px;
}

.contract-link {
    color: var(--space-indigo);
    text-decoration: none;
}

.contract-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pub { background: var(--success); color: white; }
.status-ev { background: #f59e0b; color: white; }
.status-adj { background: #3b82f6; color: white; }
.status-res { background: var(--dusty-grape); color: white; }
.status-anul { background: #ef4444; color: white; }
.status-pre { background: var(--lilac-ash); color: white; }

.cpv-list {
    display: grid;
    gap: 1rem;
}

.cpv-item {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.cpv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cpv-code {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--space-indigo);
    font-weight: 600;
}

.cpv-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cpv-description {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cpv-value {
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 500;
}

.status-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-count {
    font-weight: 600;
    color: var(--text-primary);
}

.section-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .buyers-hero h1 {
        font-size: 1.5rem;
    }

    .buyer-hero h1 {
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ===========================================
   Buyer Profile Pages - Premium Redesign
   =========================================== */

.buyer-profile {
    min-height: 100vh;
    background: var(--seashell);
}

/* Breadcrumb */
.buyer-breadcrumb {
    background: white;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.buyer-breadcrumb .container {
    max-width: 1100px;
    margin: 0 auto;
}

.buyer-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dusty-grape);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.buyer-breadcrumb a:hover {
    color: var(--space-indigo);
}

/* Hero */
.buyer-profile-hero {
    background: linear-gradient(135deg, var(--space-indigo) 0%, #2d2d4a 50%, var(--dusty-grape) 100%);
    padding: 3rem 1.5rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.buyer-profile-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.buyer-profile-hero .container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: var(--almond-silk);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.buyer-profile-hero h1 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

.hero-description {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0 0;
    max-width: 600px;
}

.hero-meta {
    color: var(--lilac-ash);
    font-size: 1rem;
    margin: 0.25rem 0 0;
}

.info-tooltip {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.2rem;
    cursor: help;
    opacity: 0.6;
}
.info-tooltip:hover { opacity: 1; }

.competitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}
.competitor-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #f0ebe7;
    border-radius: 0.5rem;
}
.competitor-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--space-indigo);
    text-decoration: none;
}
.competitor-name:hover { color: var(--dusty-grape); }
.competitor-count {
    font-size: 0.78rem;
    color: var(--lilac-ash);
}

.hero-actions {
    margin-top: 1.25rem;
}

.btn-create-alert {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #4a7c59 0%, #3d6b4a 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.btn-create-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.4);
}

.btn-create-alert svg {
    width: 18px;
    height: 18px;
}

/* Stats Cards */
.buyer-stats-section {
    padding: 0 1.5rem;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.buyer-stats-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(34, 34, 59, 0.08);
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 34, 59, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--seashell);
    color: var(--dusty-grape);
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    background: rgba(34, 34, 59, 0.1);
    color: var(--space-indigo);
}

.stat-card-value .stat-icon {
    background: rgba(74, 124, 89, 0.1);
    color: var(--success);
}

.stat-card-open {
    background: linear-gradient(135deg, var(--success) 0%, #5a9469 100%);
    border-color: var(--success);
}

.stat-card-open .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-card-open .stat-number,
.stat-card-open .stat-label {
    color: white;
}

.stat-pulse {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--space-indigo);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--dusty-grape);
    margin-top: 0.25rem;
}

/* Sectors */
.buyer-sectors {
    padding: 2.5rem 1.5rem;
}

.buyer-sectors .container {
    max-width: 1100px;
    margin: 0 auto;
}

.buyer-sectors h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--space-indigo);
    margin: 0 0 1.25rem;
}

.sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sector-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 2rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.sector-tag:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 2px 8px rgba(34, 34, 59, 0.08);
}

.sector-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--space-indigo);
    background: var(--seashell);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 600;
}

.sector-name {
    color: var(--dusty-grape);
}

.sector-count {
    background: var(--space-indigo);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--space-indigo);
    margin: 0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(74, 124, 89, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* Tenders Section */
.buyer-tenders-section {
    padding: 2rem 1.5rem 2.5rem;
    background: white;
}

.buyer-tenders-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.tenders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tender-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--seashell);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    transition: all 0.15s;
}

.tender-card:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 4px 12px rgba(34, 34, 59, 0.08);
    transform: translateX(4px);
}

.tender-main {
    flex: 1;
    min-width: 0;
}

.tender-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--space-indigo);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.tender-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--dusty-grape);
}

.tender-id {
    font-family: var(--font-mono);
    background: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.tender-deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tender-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
}

/* Gated Preview */
.tenders-preview-gated,
.history-preview-gated {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
}

.tenders-blur,
.history-blur {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.tender-card-blur {
    background: var(--seashell);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.blur-line {
    height: 12px;
    background: linear-gradient(90deg, var(--lilac-ash) 0%, var(--border-light) 50%, var(--lilac-ash) 100%);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.blur-title { width: 80%; }
.blur-meta { width: 40%; height: 10px; }
.blur-amount {
    width: 100px;
    height: 16px;
    background: linear-gradient(90deg, var(--success) 0%, #5a9469 100%);
    opacity: 0.3;
    border-radius: 4px;
    margin-left: auto;
}

.gate-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-overlay-table {
    background: linear-gradient(180deg, rgba(242, 233, 228, 0.8) 0%, rgba(242, 233, 228, 0.98) 100%);
}

.gate-content {
    text-align: center;
    padding: 2rem;
}

.gate-icon {
    width: 64px;
    height: 64px;
    background: var(--space-indigo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
}

.gate-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--space-indigo);
    margin: 0 0 0.5rem;
}

.gate-content p {
    color: var(--dusty-grape);
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}

.gate-note {
    font-size: 0.8rem !important;
    color: var(--lilac-ash) !important;
    margin-top: 0.75rem !important;
}

.gate-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--dusty-grape);
    text-decoration: underline;
}
.gate-link:hover { color: var(--space-indigo); }

/* History Section */
.buyer-history-section {
    padding: 2rem 1.5rem 2.5rem;
    background: var(--seashell);
}

.buyer-history-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.contracts-table-modern {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(34, 34, 59, 0.06);
}

.contracts-table-modern th {
    background: var(--space-indigo);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.875rem 1rem;
    text-align: left;
}

.contracts-table-modern td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.contracts-table-modern tr:hover {
    background: var(--seashell);
}

.contracts-table-modern .col-date {
    color: var(--dusty-grape);
    white-space: nowrap;
    width: 80px;
}

.contracts-table-modern .col-desc a {
    color: var(--space-indigo);
    text-decoration: none;
}

.contracts-table-modern .col-desc a:hover {
    text-decoration: underline;
}

.contracts-table-modern .col-amount {
    font-weight: 600;
    color: var(--success);
    text-align: right;
    white-space: nowrap;
}

.contracts-table-modern .col-status {
    width: 70px;
}

/* Sortable table headers */
.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background 150ms ease;
}

.contracts-table-modern .sortable-th:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sort-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.3;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid currentColor;
    transition: opacity 150ms ease, transform 150ms ease;
}

.sort-asc .sort-arrow {
    opacity: 1;
    border-bottom: 5px solid currentColor;
    border-top: none;
}

.sort-desc .sort-arrow {
    opacity: 1;
    transform: rotate(180deg);
}

/* Table filter input */
.table-filter-input {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.table-filter-input:focus {
    outline: none;
    border-color: var(--dusty-grape);
    box-shadow: 0 0 0 3px rgba(74, 78, 105, 0.1);
}

.table-filter-input::placeholder {
    color: var(--text-muted);
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pill.status-pub { background: var(--success); color: white; }
.status-pill.status-ev { background: #f59e0b; color: white; }
.status-pill.status-adj { background: #3b82f6; color: white; }
.status-pill.status-res { background: var(--dusty-grape); color: white; }
.status-pill.status-anul { background: #ef4444; color: white; }
.status-pill.status-pre { background: var(--lilac-ash); color: white; }

/* Blur table */
.contracts-table-blur {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.contracts-table-blur th {
    background: var(--dusty-grape);
    color: white;
    font-size: 0.75rem;
    padding: 0.875rem 1rem;
    text-align: left;
}

.contracts-table-blur td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.blur-cell {
    height: 14px;
    background: var(--lilac-ash);
    border-radius: 4px;
    opacity: 0.4;
}

.blur-date { width: 60px; }
.blur-desc { width: 100%; }
.blur-amt { width: 80px; margin-left: auto; }
.blur-status { width: 50px; }

/* CTA Section */
.buyer-cta-section {
    padding: 3rem 1.5rem;
    background: white;
}

.buyer-cta-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.cta-card {
    background: linear-gradient(135deg, var(--space-indigo) 0%, var(--dusty-grape) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-content {
    flex: 1;
    min-width: 280px;
}

.cta-card h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.cta-card > .cta-content > p {
    color: var(--lilac-ash);
    font-size: 1rem;
    margin: 0 0 1.25rem;
}

.cta-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

.cta-feature svg {
    color: var(--success);
}

.cta-action {
    text-align: center;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-note {
    color: var(--lilac-ash);
    font-size: 0.8rem;
    margin: 0.75rem 0 0;
}

.section-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-card {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-features {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .buyer-profile-hero h1 {
        font-size: 1.5rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .tender-card {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tender-amount {
        align-self: flex-end;
    }
}

/* Gated Preview - Real content with masked sensitive data */
.tender-card-preview {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--seashell);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.tender-preview-main {
    flex: 1;
    min-width: 0;
}

.tender-preview-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--space-indigo);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.tender-preview-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.preview-badge {
    font-family: var(--font-mono);
    background: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    color: var(--dusty-grape);
}

.preview-deadline {
    color: var(--lilac-ash);
}

.tender-preview-amount .amount-blur {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--success);
    opacity: 0.6;
    filter: blur(4px);
    user-select: none;
}

.contracts-table-preview {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(34, 34, 59, 0.06);
}

.contracts-table-preview th {
    background: var(--space-indigo);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.875rem 1rem;
    text-align: left;
}

.contracts-table-preview td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.col-date-preview {
    color: var(--lilac-ash);
    filter: blur(3px);
    user-select: none;
}

.col-desc-preview {
    color: var(--space-indigo);
}

.col-amt-preview {
    text-align: right;
    font-weight: 600;
    color: var(--success);
    opacity: 0.6;
    filter: blur(4px);
    user-select: none;
}

.col-status-preview .status-blur {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--lilac-ash);
    color: white;
    filter: blur(3px);
    user-select: none;
}

/* ===========================================
   UI REFRESH - Issue #40: Gobierto Polish
   =========================================== */

/* ===========================================
   Mobile Navigation Drawer
   =========================================== */

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: var(--radius-md);
    transition: background 150ms ease;
}

.nav-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none !important;
    }

    .nav-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.nav-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--space-indigo) 100%);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 250ms ease, visibility 250ms ease;
    padding-top: 5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-mobile-drawer.open {
    visibility: visible;
    opacity: 1;
}

.nav-mobile-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background 150ms ease;
}

.nav-mobile-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
}

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all 150ms ease;
}

.nav-mobile-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-mobile-link svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.75rem 0;
}

.nav-mobile-cta {
    background: var(--success);
    color: white !important;
    margin-top: 0.5rem;
}

.nav-mobile-cta:hover {
    background: var(--success-light);
}

.nav-mobile-logout {
    color: rgba(255, 255, 255, 0.6);
}

.nav-mobile-logout:hover {
    color: var(--error);
    background: rgba(155, 35, 53, 0.1);
}

/* ===========================================
   Enhanced Footer - 4 Column Layout
   =========================================== */

.site-footer {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--space-indigo) 100%);
    padding: 0;
    text-align: left;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-container {
        padding: 2.5rem 1rem 1.5rem;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-logo-img {
    height: 2.5rem;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    color: var(--lilac-ash);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0;
}

.footer-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(74, 124, 89, 0.15);
    border: 1px solid rgba(74, 124, 89, 0.3);
    border-radius: var(--radius-md);
    color: var(--success-light);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.footer-trust-badge svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-heading {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: var(--lilac-ash);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 150ms ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 600px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.footer-copyright {
    color: var(--lilac-ash);
    font-size: 0.8125rem;
    margin: 0;
}

.footer-source {
    color: var(--lilac-ash);
    font-size: 0.8125rem;
    margin: 0;
}

.footer-source a {
    color: var(--almond-silk);
    text-decoration: none;
}

.footer-source a:hover {
    color: white;
    text-decoration: underline;
}

/* ===========================================
   Standardized Card Styling
   =========================================== */

.card,
.stat-card-premium,
.alert-card,
.quick-action-premium,
.contract-card-modern,
.contract-card,
.pricing-card,
.feature-card,
.preview-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 200ms ease;
}

.card:hover,
.stat-card-premium:hover,
.alert-card:hover,
.quick-action-premium:hover,
.contract-card-modern:hover,
.contract-card:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 8px 24px rgba(34, 34, 59, 0.1);
}

/* ===========================================
   Breadcrumb Component
   =========================================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--dusty-grape);
    text-decoration: none;
    transition: color 150ms ease;
}

.breadcrumbs a:hover {
    color: var(--space-indigo);
}

.breadcrumbs svg {
    color: var(--lilac-ash);
    flex-shrink: 0;
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* ===========================================
   Form Styling Standardization
   =========================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    font-family: inherit;
    font-size: 0.9375rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    transition: all 150ms ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--dusty-grape);
    box-shadow: 0 0 0 3px rgba(74, 78, 105, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Filter form styling */
.filter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dusty-grape);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.filter-select,
.filter-input {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    background: var(--seashell);
    border: 1px solid transparent;
}

.filter-select:focus,
.filter-input:focus {
    background: white;
    border-color: var(--dusty-grape);
}

/* ===========================================
   Enhanced Social Proof (Landing)
   =========================================== */

.social-proof-section {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.social-proof-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.social-proof-users {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatars {
    display: flex;
}

.user-avatars > * {
    margin-left: -0.75rem;
}

.user-avatars > *:first-child {
    margin-left: 0;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-proof-text {
    color: var(--dusty-grape);
    font-size: 0.9375rem;
}

.social-proof-text strong {
    color: var(--space-indigo);
}

.social-proof-badges {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dusty-grape);
    font-size: 0.875rem;
}

.trust-badge svg {
    color: var(--success);
    flex-shrink: 0;
}

.trust-badge strong {
    color: var(--space-indigo);
}

/* Client logos placeholder */
.client-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 2rem;
    flex-wrap: wrap;
}

.client-logo-placeholder {
    height: 2rem;
    padding: 0 1.5rem;
    background: var(--seashell);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lilac-ash);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .social-proof-container {
        flex-direction: column;
        text-align: center;
    }

    .social-proof-users {
        flex-direction: column;
    }

    .social-proof-badges {
        justify-content: center;
    }
}

/* ===========================================
   Clean Dashboard Design
   =========================================== */

.dashboard-clean {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Notice/Alert banners */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.notice svg {
    flex-shrink: 0;
    color: var(--success);
    margin-top: 2px;
}

.notice strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.notice p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notice-dismiss {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    text-decoration: none;
}

.notice-dismiss:hover {
    color: var(--text-primary);
}

/* Page Header - Simple */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .page-header {
        flex-wrap: wrap;
    }
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--space-indigo);
}

.page-header p {
    margin: 0.375rem 0 0;
    color: var(--dusty-grape);
    font-size: 0.9375rem;
}

.page-header-actions {
    flex-shrink: 0;
}

.page-header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Search Card - Refined */
.search-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(34, 34, 59, 0.04);
}

.search-card-form {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 150ms ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--dusty-grape);
    box-shadow: 0 0 0 3px rgba(74, 78, 105, 0.1);
}

.search-input-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-left: 0.875rem;
    color: var(--lilac-ash);
    pointer-events: none;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0.75rem 0.75rem 0.625rem;
    font-size: 1rem;
    color: var(--text-primary);
    min-width: 0;
}

.search-input-wrapper input:focus {
    outline: none;
    box-shadow: none;
}

.search-input-wrapper input::placeholder {
    color: var(--lilac-ash);
}

.search-input-wrapper .btn {
    flex-shrink: 0;
    margin: 0.375rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
}

.search-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-card-links a {
    font-size: 0.8125rem;
    color: var(--dusty-grape);
    padding: 0.375rem 0.75rem;
    background: var(--seashell);
    border-radius: 9999px;
    text-decoration: none;
    transition: all 150ms ease;
}

.search-card-links a:hover {
    background: var(--almond-silk);
    color: var(--space-indigo);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    transition: all 150ms ease;
}

.stat-item:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 2px 8px rgba(34, 34, 59, 0.08);
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--space-indigo);
    line-height: 1.2;
}

.stat-value.stat-plan {
    font-size: 1.125rem;
    color: var(--dusty-grape);
    text-transform: capitalize;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--lilac-ash);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.375rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--space-indigo);
    margin: 0;
}

.section-link {
    font-size: 0.8125rem;
    color: var(--lilac-ash);
    text-decoration: none;
    transition: color 150ms ease;
}

.section-link:hover {
    color: var(--dusty-grape);
}

/* Alerts List - Clean */
.alerts-list-clean {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(34, 34, 59, 0.04);
}

.alert-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 150ms ease;
}

.alert-row:last-child {
    border-bottom: none;
}

.alert-row:hover {
    background: var(--seashell);
}

.alert-row-inactive {
    opacity: 0.5;
}

.alert-row-status {
    flex-shrink: 0;
}

.status-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lilac-ash);
}

.status-dot.active {
    background: #4a7c59;
}

.alert-row-info {
    flex: 1;
    min-width: 0;
}

.alert-row-name {
    display: block;
    font-weight: 500;
    color: var(--space-indigo);
    font-size: 0.9375rem;
}

.alert-row-meta {
    display: block;
    font-size: 0.8125rem;
    color: var(--lilac-ash);
    margin-top: 0.125rem;
}

.alert-row-count {
    flex-shrink: 0;
    text-align: right;
}

.alert-row-count span {
    display: inline-block;
    min-width: 2rem;
    padding: 0.25rem 0.625rem;
    background: var(--seashell);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dusty-grape);
    text-align: center;
}

.alert-row-edit {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--lilac-ash);
    text-decoration: none;
    transition: color 150ms ease;
}

.alert-row-edit:hover {
    color: var(--dusty-grape);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.empty-state p {
    color: var(--lilac-ash);
    margin: 0 0 1rem;
}

/* Quick Links Grid */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--space-indigo);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 150ms ease;
}

.quick-link:hover {
    border-color: var(--almond-silk);
    box-shadow: 0 4px 12px rgba(34, 34, 59, 0.08);
    transform: translateY(-1px);
}

.quick-link svg {
    flex-shrink: 0;
    color: var(--lilac-ash);
}

.quick-link:hover svg {
    color: var(--dusty-grape);
}

/* Search UX: Open tenders CTA */
.open-tenders-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: #16a34a;
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.open-tenders-btn:hover {
    background: #15803d;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
    transform: translateY(-1px);
}

/* Search UX: Amount chips */
.amount-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}
.amount-chip {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--seashell);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--dusty-grape);
    text-decoration: none;
    transition: all 150ms ease;
    white-space: nowrap;
}
.amount-chip:hover {
    border-color: var(--almond-silk);
    background: white;
    color: var(--space-indigo);
}
.amount-chip.active {
    background: var(--space-indigo);
    color: white;
    border-color: var(--space-indigo);
}

/* A-Z Navigation Bar */
.az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 1rem;
    justify-content: center;
}
.az-nav-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dusty-grape);
    background: var(--seashell);
    text-decoration: none;
    transition: all 150ms ease;
    border: 1px solid transparent;
}
.az-nav-letter:hover {
    background: var(--surface, #fff);
    border-color: var(--almond-silk);
    color: var(--space-indigo);
}
.az-nav-letter.active {
    background: var(--space-indigo);
    color: white;
    border-color: var(--space-indigo);
}
@media (max-width: 640px) {
    .az-nav-letter {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }
}

