
:root {
    --green-900: #183d32;
    --green-800: #245344;
    --green-700: #326b55;
    --green-100: #e8f0e9;
    --sage: #a8bda8;
    --honey: #d5a642;
    --honey-light: #f7edcf;
    --background: #f5f7f3;
    --surface: #ffffff;
    --text: #26352e;
    --muted: #78857c;
    --border: #e4e9e2;
    --danger: #bd5148;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(24, 61, 50, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

/* Główny układ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--green-900);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--honey);
    color: var(--green-900);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 11px;
    color: #c5d5ca;
}

.sidebar-nav {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-label {
    color: #a9c0b2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    color: #e0eae3;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.nav-link.active {
    border-left: 3px solid var(--honey);
    padding-left: 10px;
}

/* Obszar roboczy */

.main-area {
    flex: 1;
    min-width: 0;
}

.topbar {
    position: relative;
    height: 82px;
    background-color: #ffffff;
    background-image: url("../images/topbar-bg.svg");
    background-repeat: no-repeat;
    background-position: right 110px center;
    background-size: 55% auto;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    overflow: hidden;
}

.topbar > div {
    position: relative;
    z-index: 2;
}


.topbar-title {
    font-size: 18px;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.page-content {
    padding: 30px;
    max-width: 1500px;
    margin: 0 auto;
}

.page-heading {
    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 0 0 6px;
    color: var(--green-900);
    font-size: 26px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
}

/* Karty */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card-title {
    margin: 0 0 16px;
    color: var(--green-900);
    font-size: 17px;
    font-weight: 700;
}

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

/* Przyciski */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--green-700);
    color: #fff;
}

.btn-primary:hover {
    background: var(--green-900);
}

.btn-secondary {
    background: var(--green-100);
    color: var(--green-900);
}

.btn-honey {
    background: var(--honey);
    color: var(--green-900);
}

/* Formularze */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--green-900);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.form-control:focus {
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(50,107,85,0.12);
}

/* Tabele */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--green-900);
    background: var(--green-100);
    font-size: 13px;
}

/* Komunikaty */

.alert {
    padding: 14px 17px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.alert-success {
    background: #e7f3e8;
    color: #28613d;
}

.alert-danger {
    background: #fae9e7;
    color: #943d36;
}

.alert-warning {
    background: var(--honey-light);
    color: #765719;
}

/* Menu mobilne */

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: var(--green-900);
    font-size: 25px;
}

.sidebar-overlay {
    display: none;
}

/* Responsywność */

@media (max-width: 1000px) {
    .sidebar {
        width: 230px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.visible {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(0,0,0,0.4);
    }

    .mobile-menu-button {
        display: block;
    }

    .topbar {
        height: 62px;
        padding: 0 16px;
        gap: 12px;
    }

    .topbar-title {
        font-size: 16px;
    }

    .page-content {
        padding: 20px 15px;
    }

    .page-heading h1 {
        font-size: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 17px;
    }
}
/* Komunikaty systemowe Flask */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.flash-message {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid transparent;
}

.flash-success {
    background: #eef7ed;
    color: #245b2a;
    border-color: #c9dfc5;
}

.flash-error,
.flash-danger {
    background: #fff0ef;
    color: #9b2922;
    border-color: #edc5c1;
}

.flash-warning {
    background: #fff7e6;
    color: #805b13;
    border-color: #ead8a8;
}

.flash-info {
    background: #edf4fb;
    color: #24527a;
    border-color: #c7d9eb;
}

.logout-button {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.10);
}

/* Nowe logo Rolnik–Pszczelarz */
.sidebar-brand-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px;
    gap: 8px;
}

.sidebar-logo {
    width: 145px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-brand-new .brand-name {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
}

.brand-partner {
    margin-top: 4px;
    color: #e8d9a7;
    font-size: 12px;
    line-height: 1.5;
    font-style: italic;
}

/* Karta danych użytkownika – panel administratora */
.admin-user-card {
    background: #ffffff;
    border: 1px solid #dce6dc;
    border-left: 5px solid #d5a642;
    border-radius: 16px;
    padding: 26px;
    margin: 22px 0;
    box-shadow: 0 5px 20px rgba(24, 61, 50, 0.07);
}

.admin-user-card h2 {
    color: #183d32;
    font-size: 23px;
    font-weight: 800;
    margin: 0 0 20px;
}

.admin-user-card p {
    margin: 11px 0;
    line-height: 1.6;
}

.admin-user-card strong {
    color: #245344;
}

/* Statusy weryfikacji użytkownika */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 8px;
}

.status-verified {
    background: #e5f3e8;
    color: #28613d;
    border: 1px solid #c4dfca;
}

.status-pending {
    background: #fff4d8;
    color: #85621b;
    border: 1px solid #ead59c;
}

.status-rejected {
    background: #fbe9e7;
    color: #a33b32;
    border: 1px solid #edc5c1;
}
/* Karty ról użytkownika w panelu administratora */
.role-card {
    background: #ffffff;
    border: 1px solid #dce6dc;
    border-radius: 14px;
    padding: 22px;
    margin: 18px 0;
    box-shadow: 0 3px 12px rgba(24, 61, 50, 0.05);
}

.role-card h3 {
    color: #183d32;
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 18px;
}

.role-card p {
    margin: 12px 0;
    line-height: 1.6;
}

/* Karty lokalizacji użytkownika */
.location-card {
    background: #ffffff;
    border: 1px solid #dce6dc;
    border-left: 4px solid #6c9b65;
    border-radius: 14px;
    padding: 20px 22px;
    margin: 16px 0;
    box-shadow: 0 3px 12px rgba(24, 61, 50, 0.05);
}

.location-card h3 {
    color: #183d32;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 16px;
}

.location-card p {
    margin: 10px 0;
    line-height: 1.6;
}

/* Sekcja dokumentów weryfikacyjnych */
.documents-card {
    background: #ffffff;
    border: 1px solid #dce6dc;
    border-left: 5px solid #d5a642;
    border-radius: 16px;
    padding: 24px;
    margin: 22px 0;
    box-shadow: 0 4px 16px rgba(24, 61, 50, 0.05);
}

.documents-card h2 {
    color: #183d32;
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 18px;
}

.documents-card h3 {
    color: #245344;
    font-size: 16px;
    margin: 16px 0 10px;
}

.documents-card p {
    line-height: 1.6;
}

/* Historia weryfikacji */
.verification-history {
    margin-top: 20px;
    padding: 16px;
    background: #f5f8f4;
    border-radius: 12px;
    border: 1px solid #e1e9df;
}

.verification-history h4 {
    color: #245344;
    margin: 0 0 14px;
    font-size: 16px;
}

.history-entry {
    padding: 12px 15px;
    background: #ffffff;
    border-left: 3px solid #6c9b65;
    border-radius: 8px;
    margin-top: 10px;
}

.history-entry p {
    margin: 7px 0;
    line-height: 1.5;
}