:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --line: #e5e7eb;
    --text: #0f172a;
    --muted: #64748b;
    --brand: #0f766e;
    --brand-soft: #dff7f3;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: #0f172a;
    color: white;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.brand-subtitle {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    margin-top: 4px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.82);
    padding: 10px 12px;
    border-radius: 12px;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,.08);
}

.sidebar-footer {
    padding: 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    background: rgba(255,255,255,.04);
}

.main-panel {
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-kicker {
    color: var(--muted);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.page-title {
    margin: 6px 0 0;
    font-size: 2rem;
    font-weight: 700;
}

.content-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-card,
.surface-card,
.alert-card,
.pet-summary-box,
.info-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.metric-card {
    padding: 20px;
}

.metric-label {
    font-size: .95rem;
    color: var(--muted);
}

.metric-value {
    margin-top: 8px;
    font-size: 2rem;
    font-weight: 700;
}

.surface-card {
    padding: 22px;
}

.surface-title,
.info-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.alert-card {
    padding: 16px;
    background: var(--panel-soft);
}

.table-modern thead th {
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--line);
}

.table-modern tbody td {
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom-color: #eef2f7;
}

.pet-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.pet-name {
    font-size: 2rem;
    font-weight: 700;
}

.pet-summary-box {
    padding: 18px 22px;
    min-width: 150px;
}

.summary-label {
    color: var(--muted);
    font-size: .9rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 6px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .85rem;
    font-weight: 600;
}

.section-tabs .nav-link {
    color: var(--muted);
    border-radius: 999px;
    border: none;
    padding: 10px 16px;
}

.section-tabs .nav-link.active {
    background: white;
    color: var(--text);
    border: 1px solid var(--line);
}

.simple-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.simple-list li + li {
    margin-top: 10px;
}

.info-card {
    padding: 22px;
}

.info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px 16px;
}

.info-grid dt {
    color: var(--muted);
    margin: 0;
}

.info-grid dd {
    margin: 0;
    font-weight: 500;
}

.form-shell .form-control,
.form-shell .form-select {
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    border-color: var(--line);
}

.form-shell textarea.form-control {
    min-height: 120px;
}

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

.quick-action-item {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    background: var(--panel-soft);
}

.quick-action-item:hover {
    color: var(--brand);
    border-color: #b7e4dc;
}

@media (max-width: 991px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-panel {
        padding: 18px;
    }

    .topbar,
    .pet-hero {
        flex-direction: column;
        align-items: stretch;
    }

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

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}


.status-chip-primary {
    background: #e0f2fe;
    color: #0c4a6e;
}

.status-chip-success {
    background: #dcfce7;
    color: #166534;
}

.status-chip-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-chip-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-chip-muted {
    background: #e5e7eb;
    color: #475569;
}

.status-chip-info {
    background: #ede9fe;
    color: #5b21b6;
}

.empty-state-box {
    padding: 28px;
    border-radius: 18px;
    background: var(--panel-soft);
    border: 1px dashed #cbd5e1;
}

.medicine-grid { display:grid; grid-template-columns: 1.2fr .7fr 1.4fr .4fr; gap:12px; }
@media (max-width: 992px) { .medicine-grid { grid-template-columns: 1fr; } }
