﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef7fb;
    color: #102a43;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1 {
    color: #005f73;
}

h2 {
    color: #0a9396;
}

a {
    color: #0077b6;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

button {
    background: #0077b6;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    background: #023e8a;
}

input, select, textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th {
    background: #005f73;
    color: white;
}

table th, table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

.card {
    border: 1px solid #d9e2ec;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: #ffffff;
}

.notice {
    background: #e0f7fa;
    border-color: #94d2bd;
}

.result-card {
    overflow: hidden;
}

.preview-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 12px 0 18px;
    border-radius: 8px;
    border: 1px solid #d9e2ec;
}

.preview-image.small {
    max-width: 250px;
}

.note {
    color: #486581;
    font-size: 14px;
    line-height: 1.5;
    background: #f0f7ff;
    border-left: 4px solid #0a9396;
    padding: 10px 12px;
    border-radius: 6px;
}
.nav {
    background: #005f73;
    padding: 15px 30px;
    color: white;
}

.nav a {
    color: white;
    margin-right: 15px;
}
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
}

.button-link {
    display: inline-block;
    background: #0077b6;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
}

.button-link:hover {
    background: #023e8a;
    text-decoration: none;
}

.danger-link {
    color: #b42318;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.identification-table {
    table-layout: fixed;
    min-width: 980px;
}

.identification-table .image-column,
.identification-table .image-cell {
    width: 120px;
    max-width: 120px;
    text-align: center;
}

.identification-table .table-image {
    width: 90px !important;
    height: 70px !important;
    max-width: 90px !important;
    max-height: 70px !important;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    border: 1px solid #d9e2ec;
}

.status-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e0f7fa;
    color: #005f73;
    font-size: 13px;
    font-weight: bold;
}
.success {
    background: #e6f4ea;
    border-color: #7bc47f;
    color: #1f6f3d;
}

.auth-container {
    max-width: 720px;
}

.nav {
    line-height: 1.8;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #005f73;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    flex: 0 0 auto;
}

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

.stat-card span {
    display: block;
    color: #486581;
    margin-bottom: 8px;
}

.stat-card strong {
    color: #005f73;
    font-size: 30px;
}

.profile-record {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.profile-record .preview-image {
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 700px) {
    .profile-header,
    .profile-record {
        display: block;
    }

    .profile-avatar {
        margin-bottom: 16px;
    }

    .profile-record .preview-image {
        margin-bottom: 14px;
    }
}
.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

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

.species-card {
    display: flex;
    flex-direction: column;
}

.species-image-wrap,
.species-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.species-image,
.species-detail-image {
    width: 100%;
    max-width: 420px;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9e2ec;
}

.species-placeholder,
.species-detail-placeholder {
    width: 100%;
    max-width: 420px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f7fa;
    color: #005f73;
    border-radius: 8px;
    font-weight: bold;
}

.info-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-split .card {
    margin-bottom: 0;
}

.profile-avatar-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #005f73;
    flex: 0 0 auto;
}

@media (max-width: 800px) {
    .info-split {
        grid-template-columns: 1fr;
    }
}
.narrow-container {
    max-width: 760px;
}

.success {
    border-color: #9bd7b8;
    background: #f0fff4;
    color: #22543d;
}

.error {
    border-color: #f4b4ab;
    background: #fff5f5;
    color: #8a1f11;
}

.danger-zone {
    border-color: #f4b4ab;
    background: #fff8f7;
}

.danger-zone h2 {
    color: #9b1c1c;
}

.danger-button,
.button-link.danger-button {
    background: #b42318;
    color: #ffffff;
}

.danger-button:hover,
.button-link.danger-button:hover {
    background: #7a1a12;
}

.delete-account-form input[type="text"] {
    max-width: 320px;
    margin-bottom: 16px;
}

.delete-account-form button {
    margin-right: 12px;
}
.online-info-card {
    border-color: #b8e0d2;
    background: #f8fffd;
}

.online-info-card h3 {
    color: #005f73;
    margin-top: 10px;
}

.online-summary {
    line-height: 1.7;
}

.source-note {
    color: #486581;
    font-size: 14px;
    margin-top: 14px;
}
.language-switcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: flex;
    gap: 6px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.16);
}

.language-switcher .lang-option {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 6px;
    color: #005f73;
    font-weight: 700;
    text-decoration: none;
}

.language-switcher .lang-option.active {
    background: #0077b6;
    color: #ffffff;
}
.favorite-link {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 6px;
    background: #0a9396;
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
}

.favorite-link:hover {
    background: #007f82;
}

.favorite-link.saved {
    background: #6c757d;
}

.favorite-link.saved:hover {
    background: #495057;
}
.admin-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-chart-grid {
    align-items: start;
    margin: 18px 0 28px;
}

.bar-row {
    margin-bottom: 16px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: #102a43;
    font-weight: 700;
}

.bar-track {
    height: 12px;
    background: #e6f4f1;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    min-width: 8px;
    background: #0077b6;
    border-radius: 999px;
}

.bar-fill.secondary {
    background: #0a9396;
}
.reference-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.reference-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9e2ec;
}

.reference-image-card p {
    margin-top: 8px;
    color: #486581;
}

.image-library-grid .species-image {
    max-height: 220px;
}
.confidence-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.confidence-high {
    background: #d8f3dc;
    color: #1b5e20;
}

.confidence-medium {
    background: #fff3bf;
    color: #7a4f01;
}

.confidence-low {
    background: #ffe3e3;
    color: #8a1f11;
}
.filter-panel {
    margin: 18px 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #102a43;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 42px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.notification-banner {
    border-left: 5px solid #0077b6;
    background: #f0fbff;
}

.notification-card.notification-unread {
    border-left: 5px solid #0a9396;
    background: #f1fcfb;
}

.notification-card.notification-read {
    opacity: 0.82;
}

.inline-form {
    display: inline;
}

.link-button {
    background: none;
    border: 0;
    color: #0077b6;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-decoration: none;
}

.link-button:hover {
    text-decoration: underline;
}

.link-button.danger-link,
.danger-link {
    color: #c21807;
}

.home-page {
    background: #eef7f9;
}

.home-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 36px auto 64px;
}

.home-hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 34, 48, 0.86), rgba(0, 71, 86, 0.50), rgba(0, 0, 0, 0.08)), url('../images/bluehole-hero.png') center / cover no-repeat;
    color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(17, 61, 75, 0.22);
}

.home-hero-content {
    width: min(620px, 100%);
    padding: 64px;
}

.home-kicker {
    margin: 0 0 14px;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #c8f5ff;
}

.home-hero h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 4.8rem;
    line-height: 0.95;
}

.home-hero p {
    color: #f4fbfd;
    font-size: 1.08rem;
    max-width: 580px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.home-actions .button-link.secondary {
    background: #ffffff;
    color: #064c5a;
}

.home-alert {
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.94);
    color: #063947;
    border-radius: 6px;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.home-feature-grid article {
    background: #ffffff;
    border: 1px solid #d8e7ec;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 10px 24px rgba(17, 61, 75, 0.08);
}

.home-feature-grid h2 {
    margin-top: 0;
    color: #006876;
    font-size: 1.28rem;
}

.home-feature-grid p {
    margin-bottom: 0;
}

.danger-button {
    background: #c21807;
}

@media (max-width: 820px) {
    .home-shell {
        width: min(100% - 24px, 720px);
        margin-top: 18px;
    }

    .home-hero {
        min-height: 460px;
        align-items: flex-end;
        background-position: center;
    }

    .home-hero-content {
        padding: 34px 24px;
    }

    .home-hero h1 {
        font-size: 3.2rem;
    }

    .home-feature-grid {
        grid-template-columns: 1fr;
    }
}

.species-detail-page {
    max-width: 1180px;
}

.species-detail-heading {
    text-align: center;
    margin-bottom: 18px;
}

.section-kicker {
    margin: 0 0 8px;
    color: #0077b6;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.centered-actions {
    justify-content: center;
}

.species-detail-hero {
    display: flex;
    justify-content: center;
    margin: 20px 0 24px;
}

.species-detail-image-large,
.large-placeholder {
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    max-height: 430px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d7e5ea;
    box-shadow: 0 14px 32px rgba(16, 42, 67, 0.14);
}

.large-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f7fa;
    color: #005f73;
    font-weight: 800;
}

.detail-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.detail-section-card {
    margin-bottom: 0;
}

.full-detail-card,
.detail-note {
    margin-top: 18px;
}

.detail-list {
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #edf3f5;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: #486581;
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.prototype-warning {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #ffd79a;
    border-left: 5px solid #f59f00;
    border-radius: 8px;
    background: #fff8e6;
    color: #4f3500;
}

.prototype-warning p {
    margin: 8px 0 0;
}

.result-detail-grid {
    align-items: start;
}

.confidence-explanation {
    padding: 10px 12px;
    background: #f6fbfd;
    border: 1px solid #d7e8ee;
    border-radius: 8px;
    color: #334e68;
}

.confidence-guide {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fbfc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.confidence-guide h3 {
    margin-top: 0;
    color: #005f73;
}

.confidence-guide ul {
    margin-bottom: 0;
    padding-left: 20px;
}

@media (max-width: 820px) {
    .detail-card-grid {
        grid-template-columns: 1fr;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.admin-nav a.active {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    padding: 6px 10px;
}

.admin-message {
    border-left: 5px solid #0a9396;
}

.admin-message.success {
    background: #f0fff4;
    border-color: #38a169;
    color: #22543d;
}

.admin-message.error {
    background: #fff5f5;
    border-color: #e53e3e;
    color: #8a1f11;
}

.admin-message.notice {
    background: #f0fbff;
    border-color: #0077b6;
    color: #102a43;
}

.empty-state {
    text-align: center;
    padding: 30px 24px;
    border-style: dashed;
    background: #fbfdfe;
}

.empty-state h2 {
    margin-top: 0;
    color: #005f73;
}

.empty-state p {
    max-width: 620px;
    margin: 0 auto 18px;
    color: #486581;
}

.dashboard-alerts {
    margin: 18px 0 24px;
}

.dashboard-recent-grid {
    align-items: start;
    margin: 18px 0 28px;
}

.mini-alert {
    padding: 16px;
}

.mini-alert a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 700;
}

.compact-table table {
    font-size: 14px;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.source-breakdown-card {
    margin-top: 18px;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.source-item {
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fbfdfe;
}

.source-item h3 {
    margin-top: 0;
    color: #005f73;
}

.source-item p {
    margin-bottom: 0;
    color: #334e68;
}

.status-guide {
    margin: 18px 0;
    background: #fbfdfe;
}

.status-guide h2 {
    margin-top: 0;
}

.status-guide ul {
    margin-bottom: 0;
    padding-left: 22px;
}

.status-guide li {
    margin: 8px 0;
}

.status-explanation {
    margin-top: -4px;
    padding: 10px 12px;
    border-left: 4px solid #0a9396;
    background: #f6fbfd;
    color: #334e68;
}

@media (max-width: 900px) {
    .source-grid {
        grid-template-columns: 1fr;
    }
}
