/* ============================================
   Beekeeping Central — Nature Theme
   Light, warm, mobile-first
   ============================================ */

:root {
    --honey: #d4a017;
    --honey-light: #f5e6b8;
    --honey-dark: #b8860b;
    --green: #4a7c59;
    --green-light: #e8f0eb;
    --green-dark: #2d5a3f;
    --earth: #6b4f3a;
    --cream: #faf8f4;
    --white: #ffffff;
    --gray-100: #f7f5f2;
    --gray-200: #ede9e3;
    --gray-300: #d4cfc7;
    --gray-500: #8a8279;
    --gray-700: #4a4640;
    --gray-900: #2c2925;
    --danger: #c44545;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

html { font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* ---- Nav ---- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--green-dark) !important;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-icon { font-size: 1.4rem; }

.nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: var(--green-light);
    color: var(--green-dark) !important;
}

.navbar-toggler {
    border: 1px solid var(--gray-300);
    padding: 0.35rem 0.6rem;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ---- Footer ---- */
footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

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

/* ---- Buttons ---- */
.btn {
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.1rem;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--honey);
    border-color: var(--honey);
    color: var(--gray-900);
}
.btn-primary:hover {
    background: var(--honey-dark);
    border-color: var(--honey-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--white); }

.btn-outline-success { border-color: var(--green); color: var(--green); }
.btn-outline-success:hover { background: var(--green); color: var(--white); }

.btn-group { display: flex; gap: 0.5rem; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-body { padding: 1.25rem; }
.card-title { font-weight: 600; margin-bottom: 0.5rem; color: var(--gray-700); }

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

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 0;
}

/* ---- Hive Grid ---- */
.hive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hive-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
    display: block;
}

.hive-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--honey);
    color: inherit;
    text-decoration: none;
}

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

.hive-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--gray-900);
}

.hive-location {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.hive-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--gray-100);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

/* ---- Status Badges ---- */
.status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}

.status-active { background: #dff5e3; color: #1a7a2e; }
.status-winterized { background: #dbeafe; color: #1e40af; }
.status-inactive { background: var(--gray-200); color: var(--gray-500); }
.status-lost { background: #fde2e2; color: #991b1b; }

/* ---- Health Badges ---- */
.health-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.health-excellent { background: #dff5e3; color: #1a7a2e; }
.health-good { background: #e8f0eb; color: var(--green); }
.health-fair { background: var(--honey-light); color: var(--earth); }
.health-poor { background: #fed7aa; color: #9a3412; }
.health-critical { background: #fde2e2; color: #991b1b; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--gray-700); font-weight: 600; }
.empty-state p { max-width: 400px; margin: 0.5rem auto 1.5rem; }
.small-empty { padding: 2rem; }

/* ---- Forms ---- */
.content-narrow { max-width: 560px; }

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

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.3rem;
}

.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--honey);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
    outline: none;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-row.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.form-check-input:checked {
    background-color: var(--honey);
    border-color: var(--honey);
}

/* ---- Inspection List ---- */
.inspection-list { display: flex; flex-direction: column; gap: 0.75rem; }

.inspection-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}

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

.inspection-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.check-tag {
    font-size: 0.75rem;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}

.inspection-notes { font-size: 0.9rem; color: var(--gray-700); margin: 0.5rem 0 0; }
.inspection-actions { font-size: 0.85rem; color: var(--gray-500); margin: 0.25rem 0 0; }

/* ---- Stats Row (Admin) ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--honey-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ---- Table ---- */
.table {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.table thead th {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.bg-success { background: var(--green) !important; }
.bg-secondary { background: var(--gray-300) !important; color: var(--gray-700) !important; }
.bg-warning { background: var(--honey-light) !important; }

/* ---- Home Page ---- */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    max-width: 640px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.hero-cta { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.9rem; color: var(--gray-500); margin: 0; }

/* ---- Nature Divider ---- */
.nature-divider {
    text-align: center;
    color: var(--gray-300);
    font-size: 1.25rem;
    letter-spacing: 0.5rem;
    margin: 2rem 0;
}

/* ---- Utility ---- */
.text-muted { color: var(--gray-500) !important; }
h1, h2, h3 { color: var(--green-dark); }
h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 1rem; }
a { color: var(--green); }
hr { border-color: var(--gray-200); }

/* ---- Articles ---- */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--gray-500);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    transition: all 0.15s;
}

.tab:hover { background: var(--gray-200); color: var(--gray-700); }
.tab.active { background: var(--green); color: var(--white); border-color: var(--green); }

.article-list { display: flex; flex-direction: column; gap: 1rem; }

.article-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.article-card:hover { box-shadow: var(--shadow-md); border-color: var(--honey); color: inherit; text-decoration: none; }
.article-card h3 { font-size: 1.2rem; margin: 0.4rem 0; color: var(--gray-900); }
.article-card p { font-size: 0.9rem; color: var(--gray-500); margin: 0; }

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.article-category-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: var(--honey-light);
    color: var(--earth);
}

.article-author { font-size: 0.8rem; color: var(--gray-500); }

.content-article { max-width: 720px; }
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 2rem; margin: 0.5rem 0; }
.article-meta { font-size: 0.9rem; color: var(--gray-500); }

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.article-body h2 { margin-top: 2rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body img { max-width: 100%; border-radius: var(--radius); }

/* ---- Forum ---- */
.forum-categories { display: flex; flex-direction: column; gap: 0.75rem; }

.forum-category-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.forum-category-card:hover { box-shadow: var(--shadow-md); border-color: var(--honey); color: inherit; text-decoration: none; }
.forum-category-info h3 { font-size: 1.1rem; margin: 0 0 0.25rem; color: var(--gray-900); }
.forum-category-info p { font-size: 0.85rem; color: var(--gray-500); margin: 0; }

.forum-category-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.forum-stat { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }
.forum-last-activity { font-size: 0.75rem; }

.topic-list { display: flex; flex-direction: column; gap: 0.5rem; }

.topic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.topic-row:hover { background: var(--gray-100); color: inherit; text-decoration: none; }

.topic-title-area { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.topic-title { font-weight: 500; color: var(--gray-900); }
.pin-icon, .lock-icon { font-size: 0.85rem; }

.topic-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray-500);
    flex-shrink: 0;
}

.topic-breadcrumb { font-size: 0.85rem; }
.topic-breadcrumb a { text-decoration: none; }
.topic-breadcrumb a:hover { text-decoration: underline; }

.forum-post {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}

.op-post { border-left: 3px solid var(--honey); }

.forum-post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.forum-post-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray-700);
    white-space: pre-wrap;
}

.forum-reply-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.forum-reply-form h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }

.forum-locked-notice, .forum-login-prompt {
    text-align: center;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    color: var(--gray-500);
}

.admin-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Pricing Page ---- */
.pricing-page { max-width: 900px; margin: 0 auto; }

.pricing-header {
    text-align: center;
    padding: 2rem 0 3rem;
}

.pricing-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-dark);
}

.pricing-header p {
    font-size: 1.1rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.pricing-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--honey);
    box-shadow: var(--shadow-md), 0 0 0 2px var(--honey);
    transform: scale(1.03);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--honey);
    color: var(--gray-900);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-card-header { text-align: center; margin-bottom: 1.5rem; }
.pricing-card-header h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.5rem; }

.pricing-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1;
}

.pricing-amount span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-500);
}

.pricing-savings {
    font-size: 0.8rem;
    color: var(--honey-dark);
    font-weight: 600;
    margin-top: 0.3rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}

.pricing-features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

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

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

.pricing-active {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border: 1px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.active-badge {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.success-icon { font-size: 3rem; margin-bottom: 1rem; }

@media (max-width: 768px) {
    .pricing-comparison { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .pricing-card.featured { transform: none; }
}

/* ---- Identity Pages Override ---- */
.card-header { background: var(--gray-100); border-bottom: 1px solid var(--gray-200); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { padding: 3rem 1rem 2.5rem; }
    .hero h1 { font-size: 1.85rem; }
    .page-header { flex-direction: column; }
    .hive-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    .table-responsive { font-size: 0.85rem; }
    .forum-category-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .forum-category-stats { align-items: flex-start; flex-direction: row; gap: 1rem; }
    .topic-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .topic-meta { gap: 0.75rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn-group .btn { width: 100%; }
}
