.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 15px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    color: #ffffff;
    background: var(--btn-primary-grad);
    box-shadow: var(--btn-primary-shadow);
}

.btn--ghost {
    color: var(--green-800);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(50, 108, 58, 0.55);
}

.btn--soft {
    color: var(--green-800);
    background: linear-gradient(180deg, rgba(243, 248, 240, 0.96) 0%, rgba(233, 243, 229, 0.96) 100%);
    border-color: rgba(50, 108, 58, 0.16);
    box-shadow: 0 14px 24px rgba(47, 115, 56, 0.10);
}

.btn--hero {
    min-height: 64px;
    padding: 0 36px;
    font-size: 18px;
    border-radius: 16px;
}

.btn--icon svg {
    width: 18px;
    height: 18px;
}

.btn--full {
    width: 100%;
}

.btn--tall {
    min-height: 58px;
    font-size: 18px;
}

.btn--cta {
    min-width: 188px;
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(36, 49, 42, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #263329;
    font-weight: 700;
}

.outline-btn--accent {
    border-color: rgba(55, 122, 66, 0.44);
    color: var(--green-700);
}

.outline-btn--danger {
    border-color: rgba(223, 103, 88, 0.42);
    color: var(--danger-500);
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
}

.panel-card__head a,
.back-link {
    color: var(--green-700);
    font-size: 16px;
    font-weight: 700;
}

.pill,
.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.pill--green,
.badge--soft {
    color: var(--green-700);
    background: var(--green-200);
}

.status-pill--success {
    color: var(--green-700);
    background: var(--green-200);
}

.status-pill--warning {
    color: var(--orange-500);
    background: var(--orange-100);
}

.status-pill--danger {
    color: var(--danger-500);
    background: var(--danger-100);
}

.status-pill--accent {
    color: var(--gold-500);
    background: var(--gold-100);
}

.status-pill--muted {
    color: var(--muted);
    background: rgba(54, 92, 44, 0.08);
}

.status-pill--blue {
    color: var(--blue-500);
    background: var(--blue-100);
}

.status-pill--gold {
    color: var(--gold-500);
    background: var(--gold-100);
}

.status-pill--green {
    color: var(--green-700);
    background: var(--green-200);
}

.status-pill--orange {
    color: var(--orange-500);
    background: var(--orange-100);
}

.status-pill--violet {
    color: var(--violet-500);
    background: var(--violet-100);
}

.empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 54px 28px;
    border: 1px dashed rgba(55, 122, 66, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.empty-panel h2,
.empty-panel p {
    margin: 0;
}

.empty-panel--compact {
    padding: 42px 28px;
}

.empty-inline {
    padding: 18px 0;
    color: var(--muted);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: #17241d;
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-700);
    font-size: 16px;
    font-weight: 700;
}

.section-link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.filter-bar,
.admin-toolbar {
    display: grid;
    grid-template-columns: minmax(320px, 1.6fr) repeat(3, minmax(0, 0.7fr)) auto auto;
    gap: 18px;
    align-items: center;
}

.admin-toolbar {
    grid-template-columns: minmax(320px, 1.4fr) minmax(160px, 0.5fr) auto;
    margin-bottom: 22px;
}

.filter-input,
.filter-select,
.field__control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(36, 49, 42, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
    color: #a0a6a2;
}

.filter-input svg,
.filter-select svg,
.field__control svg {
    width: 22px;
    height: 22px;
    color: #a9afab;
    flex: 0 0 22px;
}

.filter-input input,
.filter-select select,
.field__control input,
.field__control select,
.field__control textarea {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #27352d;
}

.filter-select {
    padding-right: 14px;
}

.filter-select select {
    appearance: none;
    cursor: pointer;
}

.filter-bar .btn.is-active {
    color: #ffffff;
    background: var(--btn-primary-grad);
    border-color: transparent;
    box-shadow: var(--btn-primary-shadow);
}

.filter-bar .btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.field {
    display: grid;
    gap: 10px;
}

.field span {
    color: #2e372f;
    font-size: 15px;
    font-weight: 700;
}

.field span em {
    color: #ef6252;
    font-style: normal;
}

.field__control {
    position: relative;
    min-height: 56px;
}

.field__control.is-error {
    border-color: rgba(235, 99, 86, 0.55);
    box-shadow: 0 0 0 3px rgba(235, 99, 86, 0.08);
}

.field__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
}

.field-error {
    margin: -2px 0 0;
    color: #ef6252;
    font-size: 13px;
    font-weight: 700;
}

.segmented {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.segment-option {
    position: relative;
}

.segment-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.segment-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid rgba(36, 49, 42, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    color: #324235;
    font-size: 18px;
    font-weight: 700;
}

.segment-option input:checked + span {
    border-color: rgba(55, 122, 66, 0.54);
    box-shadow: 0 0 0 3px rgba(55, 122, 66, 0.08);
    color: var(--green-700);
    background: linear-gradient(180deg, #f5faf2 0%, #f0f7ee 100%);
}

.upload-field {
    position: relative;
    display: grid;
    gap: 10px;
}

.upload-field input {
    position: absolute;
    inset: 38px 0 0;
    opacity: 0;
}

.upload-field__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 168px;
    border: 1px dashed rgba(55, 122, 66, 0.24);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 251, 245, 0.92) 0%, rgba(255, 255, 255, 0.96) 100%);
    text-align: center;
}

.upload-field__dropzone strong {
    color: #203128;
    font-size: 20px;
}

.upload-field__dropzone small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
}

.form-actions--detail {
    justify-content: flex-start;
}

.field--wide,
.field--grow {
    grid-column: 1 / -1;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 24px;
    margin-top: 24px;
}

.settings-grid--single {
    grid-template-columns: minmax(0, 640px);
    justify-content: start;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.page-head,
.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.page-head h1,
.form-header h1 {
    margin: 0;
    color: #16261b;
    font-size: clamp(38px, 3vw, 58px);
    line-height: 1.08;
    font-weight: 800;
}

.page-head p,
.form-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.page-head--tight h1 {
    font-size: 40px;
}

.app-stats-grid,
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.admin-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.stat-card,
.app-stat-card,
.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px 28px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 36px rgba(56, 93, 44, 0.10);
}

.stat-card {
    min-height: 164px;
}

.stat-card__icon,
.app-stat-card__icon,
.admin-stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(243, 247, 239, 0.95) 0%, rgba(249, 251, 247, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--green-700);
}

.stat-card__icon svg,
.app-stat-card__icon svg,
.admin-stat-card__icon svg {
    width: 36px;
    height: 36px;
}

.stat-card__icon--heart {
    color: var(--gold-500);
}

.app-stat-card__icon--blue {
    color: var(--blue-500);
}

.stat-card__label,
.app-stat-card__label,
.admin-stat-card p {
    margin: 0;
    color: #2e372f;
    font-size: 16px;
}

.stat-card__value,
.app-stat-card__value,
.admin-stat-card strong {
    margin: 8px 0 0;
    color: #1a2421;
    font-size: clamp(34px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-card__note,
.app-stat-card__note,
.admin-stat-card small {
    display: block;
    margin: 12px 0 0;
    color: var(--green-700);
    font-size: 14px;
    font-weight: 700;
}

.panel-card,
.table-card,
.detail-card,
.plant-form-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
}

.panel-card,
.table-card,
.detail-card {
    padding: 28px 30px;
}

.panel-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.panel-card__hint {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.detail-group h2,
.panel-card__head h2,
.detail-card h2 {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 800;
}

.detail-group {
    padding-top: 26px;
    margin-top: 26px;
    border-top: 1px solid rgba(36, 49, 42, 0.09);
}

.detail-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

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

.detail-list dt {
    color: var(--green-700);
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
    color: #233027;
    line-height: 1.8;
}

.detail-paragraph {
    margin: 16px 0 0;
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(234, 244, 231, 0.55);
    color: #3d5142;
    font-size: 14.5px;
    line-height: 1.75;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    border: none;
}

.info-grid > div {
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(234, 244, 231, 0.45);
    border: 1px solid rgba(36, 79, 42, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.info-grid > div:hover {
    background: rgba(234, 244, 231, 0.75);
    border-color: rgba(36, 79, 42, 0.12);
}

.info-grid dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.info-grid dd {
    margin: 6px 0 0;
    color: #1c2f20;
    font-size: 16px;
    font-weight: 700;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.health-control {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 16px 0 0;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(36, 49, 42, 0.07);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 14px rgba(54, 92, 44, 0.04);
}

.health-control span {
    color: #28352b;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.health-control select {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(36, 49, 42, 0.12);
    border-radius: 12px;
    background: #ffffff;
    font-weight: 600;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 24px;
    color: var(--green-700);
    font-size: 15px;
    font-weight: 700;
}

.stars {
    display: inline-flex;
    gap: 2px;
    margin-right: 10px;
    color: #d3d9d4;
    vertical-align: middle;
}

.stars svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
}

.stars .is-filled {
    color: var(--green-700);
}

.activity-list {
    display: grid;
    gap: 16px;
}

.activity-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid rgba(36, 49, 42, 0.07);
}

.activity-row:first-child {
    border-top: 0;
}

.activity-row img {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    object-fit: cover;
}

.activity-row__body h3,
.timeline-item__content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.activity-row__body p,
.activity-row__time span,
.timeline-item__content p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.activity-row__time {
    text-align: right;
}

.activity-row__time strong {
    display: block;
    color: #203128;
}

.timeline {
    display: grid;
    gap: 22px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 18px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 30px;
    bottom: -22px;
    width: 2px;
    background: rgba(55, 122, 66, 0.28);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item__dot {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--green-200);
    box-shadow: inset 0 0 0 1px rgba(55, 122, 66, 0.14);
}

.timeline-item--blue .timeline-item__dot {
    background: var(--blue-100);
}

.timeline-item--orange .timeline-item__dot,
.timeline-item--gold .timeline-item__dot {
    background: var(--gold-100);
}

.timeline-item--violet .timeline-item__dot {
    background: var(--violet-100);
}

.timeline-item__date {
    font-size: 14px;
    font-weight: 700;
}

.thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.thumb-card {
    width: 96px;
    height: 96px;
    padding: 0;
    border: 1px solid rgba(48, 111, 57, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-card.is-active {
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(55, 122, 66, 0.14);
}

.thumb-row--large .thumb-card {
    width: 126px;
    height: 126px;
}

.thumb-card--adder {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: #4f6053;
    font-weight: 700;
}

.thumb-card--adder input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.table-card {
    margin-top: 24px;
}

.data-table {
    display: grid;
}

.data-table__head,
.data-table__row {
    display: grid;
    align-items: center;
    gap: 18px;
}

.data-table--plants .data-table__head,
.data-table--plants .data-table__row {
    grid-template-columns: 1.2fr 160px 150px 170px minmax(260px, 1fr);
}

.data-table--users .data-table__head,
.data-table--users .data-table__row {
    grid-template-columns: 1.2fr 1.3fr 0.7fr 0.9fr 0.7fr 1.1fr;
}

.data-table--logs .data-table__head,
.data-table--logs .data-table__row {
    grid-template-columns: 1.6fr 1fr 1fr 2fr 1.2fr;
}

.data-table--plants-admin .data-table__head,
.data-table--plants-admin .data-table__row {
    grid-template-columns: 1.8fr 1fr 0.8fr 0.8fr 0.9fr 1fr 1.4fr;
}

.data-table__head {
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(36, 49, 42, 0.08);
    color: #223026;
    font-size: 15px;
    font-weight: 800;
}

.data-table__row {
    min-height: 120px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(36, 49, 42, 0.08);
}

.data-table__title {
    font-size: 18px;
    font-weight: 800;
}

.table-thumb {
    width: 98px;
    height: 98px;
    border-radius: 18px;
    object-fit: cover;
}

.table-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    object-fit: cover;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.next-water strong {
    display: block;
    font-size: 17px;
}

.next-water span {
    display: block;
    margin-top: 6px;
    color: var(--green-700);
    font-size: 15px;
    font-weight: 700;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    color: var(--muted);
}

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pager__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(36, 49, 42, 0.09);
    background: rgba(255, 255, 255, 0.88);
    color: #425146;
    font-weight: 700;
}

.pager__item.is-active {
    color: #fff;
    background: var(--green-700);
}

.cell-sub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.log-notes {
    color: #4a5a4f;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@media (max-width: 1260px) {
    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 920px) {
    .dashboard-panels,
    .data-table--plants .data-table__head,
    .data-table--plants .data-table__row,
    .data-table--users .data-table__head,
    .data-table--users .data-table__row {
        grid-template-columns: 1fr;
    }

    .data-table__head {
        display: none;
    }

    .data-table__row {
        gap: 12px;
        min-height: auto;
        padding: 18px 16px;
    }

    .page-head,
    .form-header,
    .panel-card__head,
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .btn {
        min-height: 44px;
        padding-left: 20px;
        padding-right: 20px;
        font-size: 14px;
    }

    .stat-card,
    .app-stat-card,
    .admin-stat-card {
        gap: 18px;
        padding: 22px 18px;
        min-height: 138px;
        border-radius: 22px;
    }

    .stat-card__icon,
    .app-stat-card__icon,
    .admin-stat-card__icon {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        border-radius: 20px;
    }

    .stat-card__icon svg,
    .app-stat-card__icon svg,
    .admin-stat-card__icon svg {
        width: 30px;
        height: 30px;
    }

    .filter-bar,
    .admin-toolbar {
        grid-template-columns: 1fr;
    }

    .table-card,
    .detail-card,
    .plant-form-card,
    .panel-card {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .thumb-card {
        width: 78px;
        height: 78px;
    }
}
