:root {
    --primary-blue: #1f7ae0;
    --secondary-blue: #0d5bbf;
    --primary-green: #3aab55;
    --dark-green: #2e8c46;
    --soft-green: #e9f7ee;
    --lime: #c6f6d5;
    --teal: #d9f2ff;
    --background: #f4f7fb;
    --text-color: #0f172a;
    --muted: #6b7280;
    --card: #ffffff;
    --border: #e5e7eb;
    --petid-blue: #1E5EFF;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text-color);
}

a {
    color: inherit;
    text-decoration: none;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: linear-gradient(135deg, #0c5fb9, #1387f2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.logo {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-pet {
    color: #ffffff;
}

.logo-id {
    color: #7ac8ff;
}

.logo {
    text-decoration: none;
}

.navbar nav {
    display: flex;
    gap: 18px;
    font-weight: 500;
}

.navbar nav a {
    padding: 8px 10px;
    border-radius: 10px;
    color: #e7f1ff;
}

.navbar nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 1.125rem;
    border-radius: 0.75rem;
    border: none;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0.625rem 1.25rem rgba(31, 122, 224, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.875rem 1.75rem rgba(31, 122, 224, 0.3);
}

.btn.ghost {
    background: transparent;
    color: #e7f1ff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: none;
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

main {
    padding: 60px 24px 80px;
    max-width: 1380px;
    margin: 0 auto;
}

.home-page main {
    padding: 16px 0 60px;
    max-width: 100%;
}

.dashboard-page main {
    padding: 24px 16px 36px;
    max-width: 100%;
    width: 100%;
}

.full-bleed {
    width: 100vw;
    margin: 0 calc(-50vw + 50%);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    align-items: center;
    padding: 40px;
}

.insight-hero {
    position: relative;
    overflow: hidden;
}

.insight-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(31, 122, 224, 0.12), transparent 40%),
        radial-gradient(circle at 85% 0%, rgba(13, 91, 191, 0.12), transparent 35%);
    pointer-events: none;
}

.insight-hero > * {
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin: 10px 0;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 18px;
}

.pill {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(31, 122, 224, 0.1);
    color: var(--primary-blue);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stat-number {
    display: block;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 18px;
}

.hero-visual .illustration {
    height: 260px;
    border-radius: 16px;
    background: radial-gradient(circle at 20% 20%, rgba(31, 122, 224, 0.1), transparent),
        radial-gradient(circle at 80% 0, rgba(13, 91, 191, 0.12), transparent),
        #fff;
    border: 1px dashed rgba(31, 122, 224, 0.25);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 600;
}

.hero-visual.card {
    padding: 18px;
}

.mini-label {
    font-size: 13px;
    margin: 0 0 6px 0;
}

.hero-mini-table {
    margin-top: 14px;
    border-top: 1px solid var(--border);
}

.hero-mini-table .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.section {
    margin-top: 60px;
}

.page-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    align-items: center;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.page-hero.vets {
    background: linear-gradient(120deg, rgba(58, 171, 85, 0.12), #fff);
}

.page-hero.owners {
    background: linear-gradient(120deg, rgba(13, 91, 191, 0.12), #fff);
}

.section-header h2 {
    margin: 0 0 6px 0;
    font-size: 26px;
}

.section-header p {
    margin: 0;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.06);
}

.card.mini {
    padding: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card .icon {
    font-size: 24px;
    margin-bottom: 10px;
}

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

.list li {
    margin-bottom: 8px;
}

.split {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.split.reverse {
    direction: rtl;
}

.split.reverse > * {
    direction: ltr;
}

.highlight {
    border: 1px solid rgba(31, 122, 224, 0.25);
    background: linear-gradient(145deg, rgba(31, 122, 224, 0.05), #fff);
}

.pet-card {
    min-height: 200px;
}

.control-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    grid-column: 1 / -1;
}

.control-card {
    border-radius: 1rem;
    padding: 1rem;
    color: #fff;
    display: grid;
    gap: 0.5rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.control-card.pink {
    background: linear-gradient(135deg, #ff4d79, #ff7aa2);
}

.control-card.orange {
    background: linear-gradient(135deg, #ff7b39, #ffb347);
}

.control-card.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.control-card.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.control-card.blue {
    background: linear-gradient(135deg, #1e40af, #2563eb);
}

.control-card.slate {
    background: linear-gradient(135deg, #334155, #475569);
}

.control-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 700;
}

.control-icon-img img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.control-body h3 {
    margin: 0;
}

.control-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.control-card .btn.ghost {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: none;
}

.link-like {
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: underline;
}

.pet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.status {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.status.success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.insight-block {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    padding: 10px;
}

.steps .icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: rgba(31, 122, 224, 0.1);
    border-radius: 10px;
    color: var(--primary-blue);
    font-weight: 700;
}

.cards.three {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.chip {
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

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

th {
    color: var(--muted);
    font-weight: 600;
    background: rgba(31, 122, 224, 0.04);
}

.contact .form label,
.auth form label {
    display: block;
    font-weight: 600;
    margin-bottom: 14px;
}

input, select, textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    font-family: inherit;
    font-size: 15px;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(31, 122, 224, 0.2);
}

textarea {
    resize: vertical;
}

.contact .form {
    margin-top: 20px;
    gap: 12px;
}

.auth {
    display: grid;
    place-items: center;
    min-height: 70vh;
}

.auth-page main {
    padding: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

.auth-hero {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 20% 20%, rgba(31, 122, 224, 0.14), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(58, 171, 85, 0.16), transparent 35%),
        linear-gradient(135deg, #0f8b5f, #0d5bbf);
    padding: 24px;
}

.auth-shell {
    width: min(420px, 100%);
}

.auth-card {
    width: min(460px, 100%);
    background: var(--card);
    padding: 28px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.auth-card.modern {
    border: none;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
    border-radius: 20px;
    padding: 26px;
}

.auth h2 {
    margin: 0 0 6px 0;
}

.auth-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
}

.auth-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-form {
    display: grid;
    gap: 12px;
    margin: 14px 0;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.patient-board input[type="search"] {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    min-width: 220px;
}

.patient-section {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    display: grid;
    gap: 10px;
}

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

.patient-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 6px;
    justify-items: center;
    background: #fff;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.patient-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(31, 122, 224, 0.08);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--primary-blue);
}

.patient-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
}

.mini-card img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.08);
}

.product-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50%;
    object-fit: contain !important;
    background: #fff;
    border: 1px solid var(--border);
}

.health-modal {
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
    gap: 16px;
}

.health-header {
    background: rgba(30, 94, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
}

.health-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.health-header .header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(30, 94, 255, 0.12);
    font-size: 18px;
}

.health-form {
    display: grid;
    gap: 12px;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.health-col {
    display: grid;
    gap: 10px;
}

.health-species {
    display: grid;
    gap: 6px;
}

.dropzone {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.03);
}

.dropzone-inner {
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--muted);
}

.dropzone-inner:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.dropzone-input {
    display: none;
}

.health-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.health-switch input[type="checkbox"] {
    appearance: none;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.health-switch input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.health-switch input[type="checkbox"]:checked {
    background: var(--petid-blue);
}

.health-switch input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

.modal-actions.separated {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.btn.primary {
    background: var(--petid-blue);
    box-shadow: 0 0.625rem 1.25rem rgba(30, 94, 255, 0.25);
}
.card-header .card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

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

.radio-group {
    display: flex;
    gap: 20px;
    margin: 12px 0;
}

.switch {
    text-align: center;
    margin-top: 10px;
}

.dashboard-header h1 {
    margin: 0 0 6px 0;
}

.dashboard {
    display: grid;
    gap: 18px;
}

.dashboard.green {
    max-width: min(1800px, 96vw);
    margin: 0 auto;
}

.dashboard.green main {
    max-width: none;
}

.dashboard-page .dashboard.green {
    max-width: 100%;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 2fr 1fr;
}

.dashboard-grid.hero {
    align-items: stretch;
}

.dashboard-grid .card.side {
    height: fit-content;
}

.dashboard-actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.125rem;
}

.owner-hub {
    display: grid;
    gap: 18px;
}

.owner-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
    background: linear-gradient(120deg, #e9f7ee, #d9f2ff);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.owner-top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 14px;
}

.owner-card {
    background: linear-gradient(120deg, #e9f7ee, #d9f2ff);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.owner-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #34d399;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0f172a;
}

.owner-info h1 {
    margin: 4px 0;
}

.owner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.owner-quick {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    align-content: start;
}

.owner-meta {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    border: 1px solid var(--border);
}

.owner-meta .badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(58, 171, 85, 0.12);
    color: var(--dark-green);
    font-weight: 700;
}

.owner-meta .meta-big {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 0;
}

.owner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.owner-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.ascii-owner h1 {
    margin: 0;
}

.owner-ascii {
    display: grid;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 8px;
}

.ascii-header {
    background: #0f172a;
    color: #e5edf7;
    border-radius: 16px;
    padding: 14px 16px;
    display: grid;
    gap: 8px;
}

.ascii-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ascii-owner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
}

.ascii-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #1f7ae0;
    color: #fff;
    font-weight: 600;
}

.pill-btn.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: #e5edf7;
}

.ascii-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    width: 100%;
}

/* Centrar layout solo en el panel ascii de dueño */
.ascii-owner main {
    display: flex;
    justify-content: center;
    padding: 32px 16px 48px;
}

.ascii-owner main > section {
    flex: 1 1 1200px;
}

.ascii-card {
    background: #0b1221;
    color: #e5edf7;
    border: 1px dashed #5b6b85;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.35);
}

.ascii-title {
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.ascii-body {
    display: grid;
    gap: 6px;
}

.ascii-line {
    border-bottom: 1px dashed rgba(255,255,255,0.12);
    padding-bottom: 6px;
}

.ascii-owner .muted,
.ascii-card .muted {
    color: #a8b3c7;
}

.tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
}

.tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 700;
}

.tile-icon.green { background: rgba(58, 171, 85, 0.12); }
.tile-icon.blue { background: rgba(31, 122, 224, 0.12); }
.tile-icon.teal { background: rgba(13, 91, 191, 0.12); }
.tile-icon.purple { background: rgba(139, 92, 246, 0.12); }
.tile-icon.orange { background: rgba(249, 115, 22, 0.12); }

.tile-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
}

.tile-list li {
    display: grid;
    gap: 2px;
}

.tile-list.bullet {
    list-style: disc;
    padding-left: 18px;
}

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

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.stat-card.ghost {
    background: linear-gradient(135deg, rgba(31, 122, 224, 0.05), #fff);
    border-color: rgba(31, 122, 224, 0.2);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin: 4px 0;
}

.profile {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.profile .contact {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
}

.profile-actions {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.pill.soft {
    background: rgba(31, 122, 224, 0.1);
    color: var(--primary-blue);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pill.strong {
    background: #0d5bbf;
    color: #fff;
}

.focus {
    background: linear-gradient(145deg, #0d5bbf, #1f7ae0);
    color: #fff;
    border: none;
}

.focus .muted {
    color: #dbeafe;
}

.upcoming {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: grid;
    gap: 12px;
}

.upcoming li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.focus .pill.soft {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.actions {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 10px;
}

.actions li {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.actions a {
    font-weight: 600;
}

.actions span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.mini-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(31, 122, 224, 0.06);
    border: 1px dashed rgba(31, 122, 224, 0.3);
}

.btn.full {
    width: 100%;
}

.compact table {
    min-width: 0;
}

.minimal-hero {
    position: relative;
    min-height: 82vh;
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
}

.minimal-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 23, 61, 0.55), rgba(0, 23, 61, 0.25));
}

.minimal-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    max-width: 640px;
    padding: 0 20px;
    display: grid;
    gap: 18px;
}

.minimal-content h1 {
    margin: 0;
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 700;
}

.minimal-content h1 span {
    color: #7ac8ff;
}

.minimal-content .subtitle {
    color: #e5edf7;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

.sidebar {
    width: 100%;
    max-width: 280px;
    min-width: 240px;
    background: linear-gradient(180deg, #0f2742, #1c3a5f);
    color: #e5edf7;
    border-radius: 1rem;
    padding: 1.125rem;
    box-shadow: 0 0.875rem 1.75rem rgba(12, 26, 58, 0.45);
    position: sticky;
    top: 5rem;
    height: fit-content;
    min-height: calc(100vh - 6.25rem);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-profile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #34d399;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
}

.sidebar .mini {
    font-size: 13px;
}

.sidebar-nav {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.sidebar-nav .nav-label {
    text-transform: uppercase;
    font-size: 12px;
    color: #9fb6d6;
    letter-spacing: 0.6px;
    margin: 10px 0 4px;
}

.sidebar-nav a {
    padding: 0.625rem 0.75rem;
    border-radius: 0.625rem;
    color: #e7f1ff;
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, #1f7ae0, #34d399);
    color: #0f172a;
    font-weight: 700;
}

.sidebar-nav a.logout {
    color: #fecdd3;
}

.sidebar-nav a.logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

.sidebar-nav .sub-link {
    padding-left: 26px;
    font-size: 14px;
    opacity: 0.95;
}

.sidebar-nav .sub-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

.sidebar-nav .back-site {
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
    font-weight: 700;
}

.sidebar-nav .sub-link {
    padding-left: 26px;
    font-size: 14px;
    opacity: 0.9;
}
.sidebar-nav .sub-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

.dash-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.general-block {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.owners-screen {
    display: none;
    gap: 14px;
}

.dash-main.owners-mode .general-block {
    display: none;
}

.dash-main.owners-mode .owners-screen {
    display: grid;
}

.hero-panel {
    background: linear-gradient(120deg, #3aab55, #2d974b);
    color: #fff;
    border-radius: 1.125rem;
    padding: 1rem 1.125rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: 0 0.875rem 1.75rem rgba(23, 120, 70, 0.3);
}

.pet-hero-panel .pet-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.glassy {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    padding: 12px;
    backdrop-filter: blur(4px);
}

.pet-hero-info .info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.pet-info-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.info-pill {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 2px;
}

.hero-panel .muted {
    color: #d7f1df;
}

.hero-panel .hero-actions .btn.ghost {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.hero-meta {
    text-align: right;
    min-width: 180px;
    flex: 1 1 180px;
}

.pill.success {
    background: #22c55e;
    color: #0f172a;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.mini-label.light {
    color: #d7f1df;
}

.stat-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    min-width: 0;
}

.view-switch {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.toggle-group {
    display: inline-flex;
    gap: 8px;
    background: rgba(31, 122, 224, 0.05);
    padding: 4px;
    border-radius: 999px;
}

.toggle-chip {
    border: none;
    background: transparent;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.toggle-chip.active {
    background: #fff;
    color: var(--primary-blue);
    box-shadow: 0 6px 14px rgba(31, 122, 224, 0.18);
}

.search-row {
    display: grid;
    gap: 6px;
    margin: 10px 0;
}

.search-row input[type="search"] {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.625rem;
    align-items: center;
    padding: 0.875rem;
    border-radius: 0.875rem;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: 0 0.625rem 1.25rem rgba(15, 23, 42, 0.05);
}

.stat-card.green {
    border-color: rgba(58, 171, 85, 0.2);
}

.stat-card.lime {
    border-color: rgba(52, 211, 153, 0.2);
    background: var(--soft-green);
}

.stat-card.teal {
    border-color: rgba(13, 91, 191, 0.18);
    background: var(--teal);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: rgba(58, 171, 85, 0.12);
    font-size: 1.375rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1rem;
}

.panel-grid.two-col {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
}

.view-section {
    display: grid;
    gap: 14px;
}

.view-section.hidden {
    display: none;
}

.owner-detail .owner-pets-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.owner-detail .pet-chip {
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: rgba(31, 122, 224, 0.04);
    color: var(--text-color);
    font-weight: 600;
    display: grid;
    gap: 4px;
}

.owner-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px dashed rgba(31, 122, 224, 0.25);
}

.owners-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.owners-header-actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.owners-grid .stacked {
    display: grid;
    gap: 0.75rem;
    align-self: start;
}
.owners-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    gap: 1rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.4);
    z-index: 50;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
    display: grid;
    gap: 12px;
}

.modal-content.wide {
    width: min(720px, 100%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-close {
    border: none;
    background: #f3f4f6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

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

.modal-content .btn.ghost,
.owners-header .btn.ghost {
    border-color: rgba(31, 122, 224, 0.45);
    color: var(--primary-blue);
    background: rgba(31, 122, 224, 0.06);
}

.modal-content .btn.ghost:hover,
.owners-header .btn.ghost:hover {
    background: rgba(31, 122, 224, 0.12);
}

.card-actions .btn.ghost.small,
.table-wrapper .btn.ghost.small {
    border-color: rgba(31, 122, 224, 0.45);
    color: var(--primary-blue);
    background: rgba(31, 122, 224, 0.06);
}

.card-actions .btn.ghost.small:hover,
.table-wrapper .btn.ghost.small:hover {
    background: rgba(31, 122, 224, 0.12);
}

.chip-result {
    width: min(760px, 100%);
    gap: 16px;
}

.chip-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.chip-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chip-badge {
    background: rgba(31, 122, 224, 0.1);
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.chip-section {
    display: grid;
    gap: 12px;
}

.chip-code {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 10px;
}

.mono {
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
}

.pet-info-grid.compact {
    margin-top: 8px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 12px;
}

.status-tag.success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.status-tag.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.status-note {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.contact-card {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-result .btn.ghost {
    border-color: rgba(31, 122, 224, 0.45);
    color: var(--primary-blue);
    background: rgba(31, 122, 224, 0.06);
}

.chip-result .btn.ghost:hover {
    background: rgba(31, 122, 224, 0.12);
}

.chip-footer {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.owner-profile-action {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.owner-profile-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pending-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pending-badge {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pending-badge.alert {
    background: rgba(251, 146, 60, 0.2);
    color: #c2410c;
    border-color: rgba(251, 146, 60, 0.4);
}

.pending-badge.ok {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.35);
}

.pet-modal .modal-header {
    align-items: flex-start;
}

.pet-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.pet-form .full {
    grid-column: 1 / -1;
}

.helper-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.input-error {
    border-color: rgba(239, 68, 68, 0.6);
    outline: 2px solid rgba(239, 68, 68, 0.2);
}

.field-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: grid;
    gap: 10px;
    z-index: 70;
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-weight: 600;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.4);
    color: #15803d;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #b91c1c;
}

.pet-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.pet-photo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: rgba(31, 122, 224, 0.08);
    display: grid;
    place-items: center;
    font-size: 24px;
    color: var(--primary-blue);
    overflow: hidden;
}

.pet-photo.large {
    width: 124px;
    height: 124px;
}

.pet-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pet-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--primary-blue);
    overflow: hidden;
}

.pet-avatar.small {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    display: inline-block;
}

.card.quick .card-header,
.card.status .card-header {
    margin-bottom: 8px;
}

.card-header.tight {
    align-items: center;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.625rem;
}

.quick-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    background: #fff;
}

.quick-item:hover {
    border-color: rgba(58, 171, 85, 0.35);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.quick-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(58, 171, 85, 0.1);
    font-size: 18px;
}

.status {
    border: 1px solid rgba(58, 171, 85, 0.25);
}

.status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: grid;
    gap: 8px;
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.success {
    background: #22c55e;
}

.dot.warning {
    background: #f59e0b;
}

.dot.info {
    background: #0ea5e9;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.stacked-forms {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.625rem 0.75rem;
}

.stacked-actions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.stacked-actions li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.form-grid.compact input,
.form-grid.compact select {
    padding: 10px;
}

.btn.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    box-shadow: none;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(31, 122, 224, 0.08);
    border-radius: 999px;
    margin: 2px 4px 2px 0;
    font-weight: 600;
}

.activity-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.search-box input {
    margin: 0;
    border-radius: 10px;
}

.hero-actions.compact {
    justify-content: center;
}

.hero-actions.compact .btn {
    border-color: #fff;
    color: #fff;
}

.hero-actions.compact .btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.process {
    text-align: center;
}

.flash-container {
    margin: 10px auto;
    display: grid;
    gap: 8px;
    max-width: 700px;
}

.flash {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.flash.success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.flash.error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-top: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer a {
    color: var(--primary-blue);
}

@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        min-height: auto;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.875rem;
        flex-wrap: wrap;
    }

    .sidebar-profile {
        padding-bottom: 0;
        border-bottom: none;
        flex: 1 1 200px;
        min-width: 200px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        align-items: center;
        flex: 1 1 100%;
    }

    .sidebar-nav .nav-label {
        margin-top: 0;
    }

    .hero-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .pet-hero-panel .pet-hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta {
        text-align: left;
        min-width: auto;
    }

    .panel-grid,
    .panel-grid.two-col,
    .owners-grid {
        grid-template-columns: 1fr;
    }

    .stat-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

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

@media (max-width: 980px) {
    .page-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        padding: 14px 12px;
    }

    .navbar nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .navbar nav a {
        padding: 6px 8px;
        font-size: 15px;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    main {
        padding: 1.5rem 1rem 3.75rem;
    }

    .hero {
        padding: 1.5rem;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 520px;
    }

    .owner-hero {
        grid-template-columns: 1fr;
    }

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

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

    .view-switch {
        grid-template-columns: 1fr;
    }

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

    .sidebar-nav {
        grid-template-columns: 1fr;
    }
}
