/* Spirit in the Hills - Dashboard Shared Styles */

/* View Transition API */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
}

::view-transition-old(root) {
    animation: fade-out 0.3s ease-out;
}

::view-transition-new(root) {
    animation: fade-in 0.3s ease-in;
}

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

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

/* CSS Variables */
:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8b;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--info);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    view-transition-name: header;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.header-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-draft { background: var(--warning); color: var(--bg-dark); }
.badge-project { background: var(--primary-light); color: var(--text-primary); }

/* Navigation */
.nav-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.nav-link.active {
    background: var(--primary-light);
    color: var(--text-primary);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2.5rem 0 1.25rem;
}

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

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

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

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .dashboard { padding: 1rem; }
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.card-icon.blue { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.card-icon.green { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.card-icon.amber { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.card-icon.purple { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.card-icon.red { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Link Cards */
.link-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.link-card:hover {
    text-decoration: none;
}

.link-card .card {
    position: relative;
}

.link-card .card::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.link-card:hover .card::after {
    color: var(--info);
    transform: translateY(-50%) translateX(4px);
}

/* Stat Cards */
.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.stat-change.positive { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.stat-change.negative { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.stat-change.neutral { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

/* Chart Cards */
.chart-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.chart-card .card-title {
    margin-bottom: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

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

.data-table tr:hover {
    background: var(--bg-card-hover);
}

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

/* Status Badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.status-active .status-dot { background: #22c55e; }

.status-blocked { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status-blocked .status-dot { background: #f59e0b; }

.status-new { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.status-new .status-dot { background: #3b82f6; }

.status-inactive { background: rgba(100, 116, 139, 0.15); color: #64748b; }
.status-inactive .status-dot { background: #64748b; }

/* Priority Badges */
.priority {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-must { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.priority-should { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.priority-drop { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Insight Boxes */
.insight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.insight-box h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--info);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.insight-box strong {
    color: var(--text-primary);
}

/* Hero/Feature Boxes */
.hero-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
}

.hero-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.hero-box .hero-date {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.hero-box p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Action Items */
.action-list {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.action-list-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-item {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.action-item.highlight {
    color: var(--warning);
}

.action-item i {
    width: 16px;
    text-align: center;
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist li i {
    color: var(--text-muted);
}

.checklist li.done {
    color: var(--success);
}

.checklist li.done i {
    color: var(--success);
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--info);
    text-decoration: none;
}

/* Summary Cards for Main Page */
.summary-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.summary-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.summary-card .summary-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.summary-card .summary-stat {
    text-align: center;
}

.summary-card .summary-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-card .summary-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.summary-card .view-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--info);
    font-size: 0.85rem;
    font-weight: 500;
}

.summary-card .view-details:hover {
    text-decoration: underline;
}
