/* Terreway Dashboard - Shared Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: linear-gradient(to bottom right, #f8fafc, #d1fae5);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: linear-gradient(to right, #047857, #059669, #0d9488);
    color: white;
    padding: 2rem 0;
}

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header nav {
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #065f46;
    margin-bottom: 1rem;
}

.page-description {
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card h2, .card h3 {
    color: #065f46;
    margin-bottom: 1rem;
}

.card h2 {
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
}

.card p {
    margin-bottom: 0.75rem;
    color: #475569;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Info Cards */
.info-card {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #059669;
}

.info-card h4 {
    font-weight: bold;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.875rem;
    color: #475569;
}

/* Metric Display */
.metric-large {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

.metric-large .value {
    font-size: 3rem;
    font-weight: bold;
    color: #059669;
}

.metric-large .label {
    font-size: 1.125rem;
    color: #64748b;
    margin-top: 0.5rem;
}

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

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #065f46;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Composition Bar */
.composition-bar {
    display: flex;
    height: 3rem;
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 1.5rem 0;
}

.composition-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem;
}

/* Images */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.full-width-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
}

.badge-emerald {
    background: #059669;
    color: white;
}

.badge-amber {
    background: #f59e0b;
    color: white;
}

.badge-teal {
    background: #0d9488;
    color: white;
}

.badge-red {
    background: #dc2626;
    color: white;
}

/* Links */
a {
    color: #059669;
    text-decoration: underline;
}

a:hover {
    color: #047857;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-emerald {
    color: #059669;
}

.text-teal {
    color: #0d9488;
}

.text-amber {
    color: #f59e0b;
}

.text-red {
    color: #dc2626;
}

.text-blue {
    color: #2563eb;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: bold;
}

.italic {
    font-style: italic;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

#map {
  height: 400px; /* or any fixed height */
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.panel {
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer p {
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header nav,
    .footer {
        display: none;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

