/* ============================================
   Plantel - Styles
   ============================================ */

:root {
    --accent: #2D5F2D;
    --accent-light: #e8f0e8;
    --accent-dark: #1f4620;
    --accent-glow: rgba(45, 95, 45, 0.08);
}

/* ── Landing Dark Theme ── */
.landing-dark {
    background: #0B0E14;
    color: #fff;
}

.landing-dark .hero {
    padding: 100px 20px 80px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(45, 95, 45, 0.1) 0%, transparent 60%);
}

.landing-dark .hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.12;
    max-width: 720px;
    margin: 0 auto 20px;
    letter-spacing: -0.02em;
}

.landing-dark .hero .lead {
    font-size: 1.15rem;
    color: #8B95A5;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.landing-dark .navbar {
    background: rgba(11, 14, 20, 0.95);
    border-bottom: 1px solid #1A1F2E;
}

.landing-dark .navbar-brand { color: #fff; }

.landing-dark .section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.landing-dark .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.landing-dark .feature-card {
    background: #12161F;
    border: 1px solid #1A1F2E;
    border-radius: 12px;
    padding: 24px;
}

.landing-dark .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(45, 95, 45, 0.12);
    color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.landing-dark .feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.landing-dark .feature-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.landing-dark .feature-text {
    font-size: 14px;
    color: #8B95A5;
    line-height: 1.6;
}

.landing-dark .cta-section {
    text-align: center;
    padding: 80px 20px;
}

.landing-dark .btn-landing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.landing-dark .btn-landing:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 95, 45, 0.3);
}

/* ── Onboarding Wizard ── */
.wizard {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
}
.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border, #e0e0e0);
    transition: background 0.2s;
}
.step-dot.active { background: var(--accent); }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.wizard-subtitle {
    color: var(--text-secondary, #666);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Species chips (onboarding multi-select) */
.species-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.species-chip {
    padding: 8px 16px;
    border: 1px solid var(--border, #ddd);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--text, #333);
}
.species-chip.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.species-chip:hover:not(.selected) {
    border-color: var(--accent);
    color: var(--accent);
}

/* Flock size options (onboarding) */
.flock-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
}
.flock-option {
    padding: 16px;
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
}
.flock-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* ── Bird Grid ── */
.bird-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.bird-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}
.bird-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.bird-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--bg-input, #f5f5f5);
}

.bird-card-body {
    padding: 12px;
}
.bird-card-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bird-card-species {
    font-size: 12px;
    color: var(--text-muted, #888);
    margin-bottom: 6px;
}
.bird-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary, #666);
}
.bird-card-ring {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: var(--bg-input, #f3f3f3);
    padding: 2px 6px;
    border-radius: 4px;
}
.bird-card-sex {
    font-size: 14px;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-breeding { background: #fce4ec; color: #c62828; }
.status-resting { background: #e3f2fd; color: #1565c0; }
.status-sick { background: #fff3e0; color: #e65100; }
.status-deceased { background: #f5f5f5; color: #616161; }
.status-transferred { background: #ede7f6; color: #4527a0; }
.status-escaped { background: #fff8e1; color: #f57f17; }

/* ── Bird Detail ── */
.bird-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}
.bird-detail-sidebar {
    text-align: center;
}
.bird-detail-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius, 8px);
    background: var(--bg-input, #f5f5f5);
    margin-bottom: 16px;
}
.bird-detail-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.bird-detail-species {
    color: var(--text-muted, #888);
    font-size: 14px;
    margin-bottom: 8px;
}
.bird-detail-ring {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: var(--bg-input, #f3f3f3);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 16px;
}

/* ── Detail Subtabs ── */
.subtabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border, #e5e5e5);
    margin-bottom: 20px;
    overflow-x: auto;
}
.subtab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted, #888);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.subtab:hover { color: var(--text, #333); }
.subtab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.subtab-panel { display: none; }
.subtab-panel.active { display: block; }

/* ── Media Gallery ── */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.media-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm, 6px);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--bg-input, #f5f5f5);
}
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.audio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-input, #f5f5f5);
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
}
.audio-item audio {
    flex: 1;
    height: 32px;
}

/* ── Health Cards ── */
.health-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    margin-bottom: 8px;
    align-items: flex-start;
}
.health-card-bird {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-input, #f5f5f5);
    flex-shrink: 0;
}
.health-card-body { flex: 1; }
.health-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.health-card-date {
    font-size: 12px;
    color: var(--text-muted, #888);
}
.health-card-desc {
    font-size: 13px;
    line-height: 1.5;
}

/* Health type badges */
.type-symptom { background: #fff3e0; color: #e65100; }
.type-treatment { background: #e3f2fd; color: #1565c0; }
.type-vaccine { background: #e8f5e9; color: #2e7d32; }
.type-checkup { background: #f3e5f5; color: #7b1fa2; }
.type-observation { background: #f5f5f5; color: #616161; }

/* ── Breeding Cards ── */
.breeding-card {
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    padding: 16px;
    margin-bottom: 12px;
}
.breeding-pair {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.breeding-bird {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.breeding-bird img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-input, #f5f5f5);
}
.breeding-bird-name {
    font-size: 13px;
    font-weight: 600;
}
.breeding-separator {
    font-size: 18px;
    color: var(--text-muted, #888);
}
.eggs-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.egg-icon {
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s;
}
.egg-icon:hover { transform: scale(1.1); }
.egg-unknown { background: #f5f5f5; color: #888; border: 1px dashed #ccc; }
.egg-fertile { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.egg-infertile { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.egg-hatched { background: #fff9c4; color: #f57f17; border: 1px solid #fff176; }

/* ── Tournament Results ── */
.tournament-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    margin-bottom: 8px;
}
.tournament-placement {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.placement-1 { background: #fff9c4; color: #f57f17; }
.placement-2 { background: #f5f5f5; color: #757575; }
.placement-3 { background: #ffccbc; color: #bf360c; }
.placement-other { background: var(--bg-input, #f5f5f5); color: var(--text-muted, #888); }

/* ── Documentation / Print ── */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.doc-table th {
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #888);
    padding: 8px 10px;
    border-bottom: 2px solid var(--border, #e5e5e5);
}
.doc-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border, #f0f0f0);
    vertical-align: middle;
}
.doc-table tr:last-child td { border-bottom: none; }

/* ── Mural / Achievement Wall ── */
.mural-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.medal-card {
    text-align: center;
    padding: 20px 12px;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    background: var(--bg-card, #fff);
}
.medal-icon {
    font-size: 48px;
    margin-bottom: 8px;
}
.medal-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.medal-sub {
    font-size: 12px;
    color: var(--text-muted, #888);
}

/* ── Upload Area ── */
.upload-area {
    border: 2px dashed var(--border, #ddd);
    border-radius: var(--radius, 8px);
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: var(--text-muted, #888);
    font-size: 14px;
}
.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.upload-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius-sm, 6px);
    margin-top: 8px;
}

/* ── Lineage Tree ── */
.lineage-tree {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lineage-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: var(--radius, 8px);
    cursor: pointer;
    transition: background 0.15s;
}
.lineage-node:hover {
    background: var(--accent-light);
}
.lineage-node img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-input, #f5f5f5);
}
.lineage-label {
    font-size: 11px;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ── Print Styles ── */
@media print {
    .sidebar, .app-header, .no-print, .header-hamburger { display: none !important; }
    .app-layout { display: block !important; }
    .app-main { margin: 0 !important; }
    .app-content { padding: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    .doc-table th { color: #333 !important; }
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 2px solid #333;
    }
    .print-footer {
        display: block !important;
        text-align: center;
        margin-top: 32px;
        padding-top: 16px;
        border-top: 1px solid #ccc;
        font-size: 11px;
        color: #888;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .landing-dark .hero h1 { font-size: 2rem; }
    .landing-dark .hero { padding: 60px 16px 40px; }
    .landing-dark .section-title { font-size: 1.5rem; }

    .bird-detail {
        grid-template-columns: 1fr;
    }
    .bird-detail-sidebar {
        display: flex;
        gap: 16px;
        text-align: left;
    }
    .bird-detail-photo {
        width: 100px;
        height: 100px;
        aspect-ratio: 1;
        margin-bottom: 0;
    }
    .bird-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .flock-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .landing-dark .hero h1 { font-size: 1.75rem; }
}

/* ── Disabled button (locked features) ── */
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
