/* ============================================================================
   POLLOCK - LIGHT THEME (v3 Aesthetic)
   Greek Business Intelligence Platform
   Design: Editorial, Investigative, Refined
   ============================================================================ */

/* Fonts - Instrument Serif (display) + DM Sans (body) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
    /* Colors - Light Theme */
    --bg-deep: #f8f7f4;
    --bg-page: #f8f7f4;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-card-alt: #f5f4f1;
    --bg-hover: #f0eeeb;
    --bg-input: #ffffff;

    /* Text */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #7a7a7a;
    --text-placeholder: #9a9a9a;

    /* Accents */
    --accent-gold: #9a7b4f;
    --accent-gold-light: #c9a962;
    --accent-gold-dim: rgba(154, 123, 79, 0.1);
    --accent-gold-hover: #b8935d;
    --accent-cyan: #0077a3;
    --accent-cyan-dim: rgba(0, 119, 163, 0.08);
    --accent-green: #2d8a5f;
    --accent-green-dim: rgba(45, 138, 95, 0.1);
    --accent-red: #c94a4a;
    --accent-red-dim: rgba(201, 74, 74, 0.1);
    --accent-orange: #c97a3c;
    --accent-purple: #7c5cbf;

    /* Borders */
    --border-subtle: #e5e2dc;
    --border-medium: #d5d2cc;
    --border-gold: rgba(154, 123, 79, 0.3);
    --border-focus: var(--accent-gold);

    /* Typography */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows - Subtle for light theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--accent-gold-hover);
}

/* Headings use serif display font */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(248, 247, 244, 0.97), rgba(248, 247, 244, 0.92));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}

/* Logo - V3 Style */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-brand:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--accent-gold);
    transition: all var(--transition-fast);
}

.nav-brand:hover .logo-icon {
    border-color: var(--accent-gold);
    box-shadow: 0 2px 8px rgba(154, 123, 79, 0.15);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    color: var(--accent-gold);
    background: var(--accent-gold-dim);
}

/* Nav Badge */
.nav-link-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bg-elevated);
    background: var(--accent-gold);
    border-radius: 9px;
}

.nav-badge.hidden {
    display: none;
}

/* Quick Search */
.nav-search {
    margin-left: auto;
    position: relative;
    width: 260px;
}

.quick-search-input {
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.quick-search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-dim);
}

.quick-search-input::placeholder {
    color: var(--text-placeholder);
}

.quick-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.quick-search-results.open {
    display: block;
}

.quick-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.quick-search-item:last-child {
    border-bottom: none;
}

.quick-search-item:hover {
    background: var(--bg-hover);
}

.quick-search-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gold-dim);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    flex-shrink: 0;
}

.quick-search-item-content {
    flex: 1;
    min-width: 0;
}

.quick-search-item-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-search-item-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - 64px - 60px);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-medium);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Card variants */
.card-gold {
    border-color: var(--border-gold);
    background: linear-gradient(135deg, var(--bg-elevated), var(--accent-gold-dim));
}

.card-clickable {
    cursor: pointer;
}

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

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary - Gold */
.btn-primary {
    background: var(--accent-gold);
    color: var(--bg-deep);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(154, 123, 79, 0.25);
}

/* Secondary - Outline */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: var(--accent-gold-dim);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Danger */
.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #b54040;
}

/* Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Icon button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-dim);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a7a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

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

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-card-alt);
}

th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--bg-hover);
}

/* Clickable rows */
tr.clickable {
    cursor: pointer;
}

tr.clickable:hover {
    background: var(--accent-gold-dim);
}

/* ============================================================================
   BADGES & TAGS
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
}

.badge-default {
    background: var(--bg-card-alt);
    color: var(--text-secondary);
}

.badge-gold {
    background: var(--accent-gold-dim);
    color: var(--accent-gold);
    border: 1px solid var(--border-gold);
}

.badge-cyan {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.badge-green {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.badge-red {
    background: var(--accent-red-dim);
    color: var(--accent-red);
}

/* Status badges */
.status-active {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.status-inactive {
    background: var(--bg-card-alt);
    color: var(--text-muted);
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

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

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-gold-dim);
    border: 1px solid var(--border-gold);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* ============================================================================
   PAGE HEADER (for detail pages)
   ============================================================================ */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.page-header-content {
    flex: 1;
}

.page-header-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-header-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent-gold);
}

.breadcrumb-separator {
    color: var(--border-medium);
}

/* ============================================================================
   GRID LAYOUTS
   ============================================================================ */

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

/* Sidebar + Content layout */
.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.layout-sidebar-right {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

/* ============================================================================
   STATS / METRICS
   ============================================================================ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Inline stats row */
.stats-row {
    display: flex;
    gap: 32px;
    align-items: center;
}

.stats-row .stat-item {
    display: flex;
    flex-direction: column;
}

.stats-row .stat-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.stats-row .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-subtle);
}

/* ============================================================================
   LISTS
   ============================================================================ */

.list {
    list-style: none;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--bg-hover);
}

.list-item-clickable {
    cursor: pointer;
}

.list-item-clickable:hover {
    background: var(--accent-gold-dim);
}

.list-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gold-dim);
    border-radius: var(--radius-sm);
    color: var(--accent-gold);
    flex-shrink: 0;
}

.list-item-icon.company {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.list-item-icon.person {
    background: var(--accent-gold-dim);
    color: var(--accent-gold);
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.list-item-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.list-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-alt);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 24px;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-card-alt) 25%, var(--bg-hover) 50%, var(--bg-card-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   TABS
   ============================================================================ */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

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

.tab.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

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

.modal {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-medium);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px 24px 0;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================================================
   TOOLTIPS
   ============================================================================ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--text-primary);
    color: var(--bg-elevated);
    font-size: 12px;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    margin-bottom: 8px;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    padding: 20px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-secondary);
}

.footer-divider {
    color: var(--border-subtle);
}

.footer a {
    color: var(--text-muted);
}

.footer a:hover {
    color: var(--accent-gold);
}

/* ============================================================================
   SEARCH PAGE SPECIFIC
   ============================================================================ */

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-hero {
    text-align: center;
    padding: 48px 0;
}

.search-hero-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.search-hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 18px 24px;
    padding-right: 56px;
    font-size: 16px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px var(--accent-gold-dim);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--accent-gold);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--bg-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-50%) scale(1.02);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* Search results */
.search-results {
    margin-top: 32px;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.search-results-count {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================================================
   ENTITY ICONS (Company/Person)
   ============================================================================ */

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

.entity-icon.company {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.entity-icon.person {
    background: var(--accent-gold-dim);
    color: var(--accent-gold);
}

.entity-icon svg {
    width: 24px;
    height: 24px;
}

/* ============================================================================
   RESEARCH TAB NAVIGATION (if research feature enabled)
   ============================================================================ */

.nav-menu-container {
    position: relative;
}

.nav-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-menu-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.nav-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
    z-index: 1001;
}

.nav-menu-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-menu-item.active {
    color: var(--accent-gold);
    background: var(--accent-gold-dim);
}

.nav-menu-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.nav-menu-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 0;
}

/* Research tabs */
.research-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    padding: 0 8px;
}

.research-tabs::-webkit-scrollbar {
    display: none;
}

.research-tabs-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.research-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.research-tab:hover {
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.research-tab.active {
    background: var(--accent-gold-dim);
    border-color: var(--border-gold);
    color: var(--accent-gold);
}

.research-tab-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.research-tab-close {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.research-tab-close:hover {
    background: var(--accent-red-dim);
    color: var(--accent-red);
}

.research-tab-close svg {
    width: 12px;
    height: 12px;
}

.research-new-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent-gold);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.research-new-btn:hover {
    background: var(--accent-gold-hover);
}

.research-new-btn svg {
    width: 14px;
    height: 14px;
}

/* Research modal */
.research-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

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

.research-modal {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px;
}

.research-modal h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.research-modal-field {
    margin-bottom: 20px;
}

.research-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.research-modal-field input,
.research-modal-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.research-modal-field input:focus,
.research-modal-field textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-dim);
}

.research-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.research-modal-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.research-modal-cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.research-modal-create {
    padding: 10px 20px;
    background: var(--accent-gold);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-deep);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.research-modal-create:hover {
    background: var(--accent-gold-hover);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }
.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

.font-serif { font-family: var(--font-display); }
.font-mono { font-family: 'SF Mono', 'Monaco', monospace; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .layout-sidebar { grid-template-columns: 1fr; }
    .layout-sidebar-right { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        gap: 16px;
    }

    .nav-links {
        display: none;
    }

    .nav-search {
        width: 180px;
    }

    .main-container {
        padding: 24px 16px;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .search-hero-title {
        font-size: 1.75rem;
    }

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

    .stats-row {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .nav-search {
        width: 140px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .card {
        padding: 16px;
    }
}

/* ============================================================================
   HOME PAGE - HERO & APP GRID
   ============================================================================ */

.hero {
    text-align: center;
    padding: 64px 0 48px;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

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

.hero-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Apps Section */
.apps-section {
    margin-bottom: 48px;
}

.apps-section .section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.apps-section-muted {
    opacity: 0.8;
}

.section-title-muted {
    color: var(--text-muted);
}

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

.apps-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* App Card */
.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-card);
}

.app-card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.app-card-compact {
    padding: 16px 20px;
}

/* App Icon */
.app-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gold-dim);
    border-radius: var(--radius-md);
    color: var(--accent-gold);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.app-icon svg {
    width: 24px;
    height: 24px;
}

.app-card:hover .app-icon {
    background: var(--accent-gold);
    color: var(--bg-elevated);
}

/* App icon variants */
.app-search .app-icon { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.app-search:hover .app-icon { background: var(--accent-cyan); color: var(--bg-elevated); }

.app-network .app-icon { background: rgba(124, 92, 191, 0.1); color: var(--accent-purple); }
.app-network:hover .app-icon { background: var(--accent-purple); color: var(--bg-elevated); }

.app-cluster .app-icon { background: var(--accent-red-dim); color: var(--accent-red); }
.app-cluster:hover .app-icon { background: var(--accent-red); color: var(--bg-elevated); }

.app-address .app-icon { background: var(--accent-green-dim); color: var(--accent-green); }
.app-address:hover .app-icon { background: var(--accent-green); color: var(--bg-elevated); }

.app-geo .app-icon { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.app-geo:hover .app-icon { background: var(--accent-cyan); color: var(--bg-elevated); }

.app-industry .app-icon { background: var(--accent-gold-dim); color: var(--accent-gold); }
.app-industry:hover .app-icon { background: var(--accent-gold); color: var(--bg-elevated); }

.app-pulse .app-icon { background: rgba(201, 122, 60, 0.1); color: var(--accent-orange); }
.app-pulse:hover .app-icon { background: var(--accent-orange); color: var(--bg-elevated); }

.app-registrations .app-icon { background: var(--accent-green-dim); color: var(--accent-green); }
.app-registrations:hover .app-icon { background: var(--accent-green); color: var(--bg-elevated); }

.app-timeline .app-icon,
.app-path .app-icon {
    background: var(--bg-card-alt);
    color: var(--text-muted);
}
.app-timeline:hover .app-icon,
.app-path:hover .app-icon {
    background: var(--text-muted);
    color: var(--bg-elevated);
}

/* App Content */
.app-content {
    flex: 1;
    min-width: 0;
}

.app-title {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.app-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* App Arrow */
.app-arrow {
    color: var(--text-muted);
    font-size: 18px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.app-card:hover .app-arrow {
    color: var(--accent-gold);
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 32px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .app-card {
        padding: 16px;
    }

    .app-icon {
        width: 40px;
        height: 40px;
    }

    .app-icon svg {
        width: 20px;
        height: 20px;
    }
}
