.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card,
.panel,
.table-card,
.form-panel,
.info-card,
.plan-card,
.login-card {
    background: var(--white);
    border: 1px solid rgba(221, 229, 239, .72);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(18, 59, 106, .055);
}

.metric-card {
    position: relative;
    min-height: 92px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    align-content: center;
    gap: 8px;
    border-color: rgba(221, 229, 239, .64);
    box-shadow: 0 10px 26px rgba(18, 59, 106, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.metric-card:hover,
.panel:hover,
.table-card:hover,
.info-card:hover,
.plan-card:hover {
    border-color: rgba(20, 199, 214, .16);
    box-shadow: 0 14px 34px rgba(18, 59, 106, .065);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.metric-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.metric-card strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.12;
}

.metric-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(20, 199, 214, .08);
    opacity: .72;
    pointer-events: none;
}

.metric-icon::before {
    content: none;
}

.metric-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-card > div {
    display: grid;
    gap: 8px;
    padding-right: 42px;
}

.accent-green .metric-icon { color: var(--green); background: rgba(46, 204, 113, .08); }
.accent-orange .metric-icon { color: var(--orange); background: rgba(245, 158, 11, .09); }
.accent-red .metric-icon { color: var(--red); background: rgba(239, 68, 68, .075); }
.accent-cyan .metric-icon { color: var(--cyan); background: rgba(20, 199, 214, .08); }

.split-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 16px;
    margin-top: 16px;
}

.panel,
.info-card,
.plan-card {
    padding: 22px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-header h2 {
    margin-bottom: 0;
    font-size: 17px;
    font-weight: 600;
}

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

.timeline div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.timeline span {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #E9EEF5;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
}

.badge-green { background: rgba(53, 201, 121, .11); color: #177044; }
.badge-orange { background: rgba(255, 159, 28, .12); color: #8A5708; }
.badge-cyan { background: rgba(18, 199, 212, .11); color: #08717A; }
.badge-muted { background: #EEF2F7; color: #6B7788; }

.table-card {
    overflow: hidden;
}

.responsive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.responsive-table th,
.responsive-table td {
    padding: 17px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.responsive-table th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.actions-cell {
    width: 1%;
    white-space: nowrap;
}

.actions-cell form {
    display: inline-flex;
    margin-left: 6px;
}

.form-panel {
    padding: 20px;
}

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

.form-stack {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    min-height: 44px;
    padding: 10px 12px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(18, 199, 212, .14);
}

.span-2 {
    grid-column: span 2;
}

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

.alert {
    padding: 13px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 700;
}

.alert-danger {
    background: rgba(217, 48, 37, .12);
    color: var(--red);
}

.empty-state {
    padding: 26px;
    text-align: center;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 6px;
}

.empty-state.compact {
    padding: 16px;
}

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

.info-card {
    display: grid;
    gap: 8px;
}

.info-card strong,
.plan-card strong {
    font-size: 24px;
    color: var(--blue);
}

.plan-card {
    display: grid;
    gap: 10px;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.pond-overview {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.plan-usage {
    display: grid;
    align-content: space-between;
    min-height: 118px;
}

.plan-usage h2 {
    margin-bottom: 4px;
    font-size: 22px;
}

.plan-usage p {
    margin-bottom: 0;
    color: var(--muted);
    font-weight: 700;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #E8EEF6;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan), var(--green));
}

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

.pond-card {
    background: var(--white);
    border: 1px solid rgba(221, 229, 239, .66);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(18, 59, 106, .05);
    padding: 22px;
    display: grid;
    gap: 16px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pond-card.status-cultivation {
    border-color: rgba(46, 204, 113, .18);
}

.pond-card.status-inactive {
    border-color: rgba(239, 68, 68, .16);
}

.pond-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(18, 59, 106, .07);
}

.pond-card-header,
.pond-card-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pond-card-header h2 {
    margin: 4px 0 2px;
    font-size: 18px;
    font-weight: 600;
}

.pond-card-header p {
    margin-bottom: 0;
    color: var(--muted);
    font-weight: 500;
}

.pond-card-data,
.pond-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pond-card-data div,
.pond-info-grid div {
    padding: 13px 14px;
    border: 1px solid rgba(221, 229, 239, .58);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #FFFFFF, #FBFCFE);
}

.pond-card-data span,
.pond-info-grid span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.pond-card-data strong,
.pond-info-grid strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.pond-card-actions {
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.pond-card-actions form {
    margin: 0;
}

.badge-red {
    background: rgba(217, 48, 37, .10);
    color: var(--red);
}

.pond-detail-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.pond-tabs {
    display: grid;
    gap: 18px;
}

.tab-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid rgba(221, 229, 239, .76);
    border-radius: 14px;
    background: #F8FAFC;
}

.tab-nav button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-nav button.active {
    background: var(--white);
    border-color: rgba(20, 199, 214, .22);
    color: var(--blue);
    box-shadow: 0 8px 22px rgba(18, 59, 106, .08);
}

.tab-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-panel[hidden] {
    display: none;
}

.btn-large {
    min-height: 52px;
    padding: 0 22px;
    font-size: 16px;
}

.feeding-panel {
    display: grid;
    gap: 16px;
}

.feeding-form {
    box-shadow: none;
}

.feeding-list {
    box-shadow: none;
}

.feeding-items {
    display: grid;
    gap: 10px;
}

.feeding-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #FBFCFE;
}

.feeding-edit-grid {
    display: grid;
    grid-template-columns: 150px 160px minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.mortality-edit-grid {
    display: grid;
    grid-template-columns: 150px 130px minmax(150px, 1fr) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.biometric-edit-grid {
    display: grid;
    grid-template-columns: 150px 150px 140px minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.feeding-actions {
    display: flex;
    align-items: end;
}

.feeding-readonly {
    display: grid;
    grid-template-columns: 120px 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.mortality-readonly {
    display: grid;
    grid-template-columns: 120px 90px 160px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.biometric-readonly {
    display: grid;
    grid-template-columns: 120px 110px 120px 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.biometric-history-line {
    display: grid;
    grid-template-columns: 110px 110px 120px;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-weight: 700;
}

.notes-panel {
    display: grid;
    gap: 16px;
}

.note-form {
    box-shadow: none;
}

.note-items {
    display: grid;
    gap: 12px;
}

.note-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #FBFCFE;
}

.note-card-header,
.note-meta,
.note-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.note-card-header {
    justify-content: space-between;
}

.note-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.note-badge-manejo { background: #DFF7EA; color: #0F7A3B; }
.note-badge-alimentacao { background: #E4F4FF; color: #09698F; }
.note-badge-mortalidade { background: #FFE7E7; color: #A73535; }
.note-badge-biometria { background: #EEF2FF; color: #4058B6; }
.note-badge-consultoria { background: #F0E7FF; color: #6B3FB3; }
.note-badge-sanidade { background: #E6F8F4; color: #167064; }
.note-badge-equipamentos { background: #FFF2D6; color: #8A5A00; }
.note-badge-outro { background: #EEF2F7; color: #6B7788; }

.note-edit-grid {
    display: grid;
    grid-template-columns: 150px 170px minmax(220px, 1fr);
    gap: 10px;
    align-items: end;
}

.note-readonly {
    display: grid;
    gap: 8px;
}

.note-readonly p {
    margin-bottom: 0;
    color: var(--text);
}

.water-panel {
    gap: 16px;
}

.water-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
}

.water-edit-grid .span-2 {
    grid-column: span 2;
}

.water-readonly {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 8px 12px;
}

.water-readonly strong,
.water-readonly p,
.water-indicators {
    grid-column: 1 / -1;
}

.water-readonly p {
    margin-bottom: 0;
    color: var(--muted);
}

.water-indicators {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.costs-panel {
    gap: 16px;
}

.cost-edit-grid {
    display: grid;
    grid-template-columns: 140px 170px 130px minmax(180px, 1fr) minmax(180px, 1fr) 90px;
    gap: 10px;
    align-items: end;
}

.cost-readonly {
    display: grid;
    grid-template-columns: 120px 140px 120px minmax(180px, 1fr);
    gap: 8px 12px;
    align-items: center;
}

.cost-readonly p {
    grid-column: 1 / -1;
    margin-bottom: 0;
    color: var(--muted);
}

.feeding-readonly p,
.mortality-readonly p,
.biometric-readonly p {
    margin-bottom: 0;
    color: var(--muted);
}

.login-screen {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
    background: #F4F6FA;
}

.login-card {
    width: min(420px, 100%);
    padding: 28px;
}

.login-card h1 {
    margin: 14px 0 4px;
}

.login-card p {
    color: var(--muted);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: var(--radius);
    background: var(--blue);
    color: var(--cyan);
    font-size: 20px;
    font-weight: 700;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-height: 165px;
    margin-bottom: 24px;
    padding: 22px 26px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 16%, rgba(20, 199, 214, .42), transparent 28%),
        linear-gradient(135deg, #123B6A 0%, #173F6E 100%);
    color: var(--white);
    box-shadow: 0 18px 42px rgba(18, 59, 106, .15);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
}

.dashboard-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.hero-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.operational-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(46, 204, 113, .18);
    border-radius: 999px;
    background: rgba(46, 204, 113, .08);
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    font-weight: 600;
}

.operational-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.dashboard-hero .eyebrow {
    color: rgba(255, 255, 255, .62);
    letter-spacing: .04em;
}

.dashboard-hero h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 600;
    line-height: 1.05;
}

.dashboard-welcome {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    font-weight: 500;
}

.hero-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-metrics div {
    min-width: 148px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 14px;
    background: rgba(255, 255, 255, .065);
    backdrop-filter: blur(10px);
}

.hero-metrics span {
    display: block;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 500;
}

.hero-metrics strong {
    display: block;
    margin-top: 3px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.1;
}

.hero-action {
    position: relative;
    z-index: 1;
    min-width: 150px;
    border-color: rgba(255, 255, 255, .22);
    background: var(--cyan);
    color: #06233D;
}

.dashboard-section {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-section-production,
.dashboard-section-feed,
.dashboard-section-finance,
.dashboard-section-water {
    padding: 16px;
    border: 1px solid rgba(221, 229, 239, .78);
    border-radius: 18px;
}

.dashboard-section-production {
    background: #FBFEFC;
}

.dashboard-section-feed {
    background: #FFFDF7;
}

.dashboard-section-finance {
    background: #FFFAFA;
}

.dashboard-section-water {
    background: #FAFEFF;
}

.section-title {
    display: grid;
    gap: 2px;
}

.section-title h2 {
    margin-bottom: 0;
    font-size: 19px;
    font-weight: 600;
}

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

.dashboard-groups {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr;
    gap: 16px;
    align-items: start;
}

.dashboard-groups .dashboard-section {
    margin-bottom: 0;
}

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

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

.metric-card-feature {
    min-height: 140px;
    padding: 24px;
    grid-template-columns: 1fr;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
}

.metric-card-feature .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    opacity: .62;
}

.metric-card-feature .metric-icon svg {
    width: 24px;
    height: 24px;
}

.metric-card-feature strong {
    display: block;
    margin-top: 6px;
    color: var(--blue);
    font-size: 34px;
    font-weight: 700;
}

.metric-card-feature p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.cycle-command-metrics .metric-card:nth-child(3),
.cycle-command-metrics .metric-card:nth-child(5),
.cycle-command-metrics .metric-card:nth-child(8) {
    border-color: rgba(46, 204, 113, .16);
    background: linear-gradient(180deg, #FFFFFF, #F0FDF4);
}

.cycle-command-metrics .metric-card:nth-child(3) strong,
.cycle-command-metrics .metric-card:nth-child(5) strong,
.cycle-command-metrics .metric-card:nth-child(8) strong {
    color: var(--blue);
    font-size: 25px;
}

.cycle-command-metrics .metric-card:nth-child(5) strong {
    font-size: 28px;
}

.cycle-command-metrics .metric-card:nth-child(2),
.cycle-command-metrics .metric-card:nth-child(6),
.cycle-command-metrics .metric-card:nth-child(7) {
    background: #FFFFFF;
}

.cycle-command-metrics .metric-card:nth-child(4),
.cycle-command-metrics .metric-card:nth-child(9) {
    background: #FCFCFD;
}

.cycle-command-metrics .metric-card:nth-child(4) strong,
.cycle-command-metrics .metric-card:nth-child(9) strong {
    color: #4B5565;
    font-size: 20px;
}

.operation-panel {
    background: linear-gradient(180deg, #FFFFFF, #F8FCFF);
}

.empty-state {
    border-radius: 14px;
}

.empty-state h3 {
    font-size: 17px;
}

.table-card {
    border-color: rgba(221, 229, 239, .82);
}

.responsive-table th {
    background: #F8FAFC;
    color: #607086;
    letter-spacing: .04em;
}

.responsive-table tbody tr {
    transition: background .15s ease;
}

.responsive-table tbody tr:hover {
    background: #FBFCFE;
}

.dashboard-bottom-grid {
    align-items: start;
}

.active-cycle-grid {
    display: grid;
    gap: 12px;
}

.active-cycle-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(221, 229, 239, .9);
    border-radius: 14px;
    background: #FBFCFE;
}

.active-cycle-header,
.active-cycle-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.active-cycle-header strong {
    font-size: 17px;
}

.active-cycle-stats span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.operational-status-panel {
    background: linear-gradient(180deg, var(--white), #F8FCFD);
}

.status-list {
    display: grid;
    gap: 12px;
}

.status-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(46, 204, 113, .09);
    color: #155C37;
    font-weight: 600;
}

.status-check {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(46, 204, 113, .18);
    color: #118345;
    font-weight: 700;
}
