/**
 * Pet & Buddy - Estilos SaaS Premium
 * Diseño basado en la identidad de marca Pet & Buddy y mockup comercial
 * Desarrollado por VisibleAhora
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --pyb-primary: #FA6400;
    --pyb-primary-dark: #E05300;
    --pyb-primary-light: #FFF5EB;
    --pyb-primary-border: #FFDFC2;
    --pyb-secondary: #2B2D42;
    --pyb-bg: #F8F9FB;
    --pyb-card-bg: #FFFFFF;
    --pyb-border: #EDF0F5;
    --pyb-text-main: #1E293B;
    --pyb-text-muted: #64748B;
    --pyb-sidebar-width: 250px;
    --pyb-radius-sm: 8px;
    --pyb-radius-md: 14px;
    --pyb-radius-lg: 20px;
    --pyb-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    --pyb-shadow-hover: 0 8px 24px rgba(250, 100, 0, 0.12);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--pyb-bg);
    color: var(--pyb-text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* =====================================================================
   LAYOUT PRINCIPAL (SIDEBAR + TOPBAR + MAIN)
   ===================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--pyb-sidebar-width);
    background: #FFFFFF;
    border-right: 1px solid var(--pyb-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.25s ease-in-out;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--pyb-text-main);
}

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

.sidebar-brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--pyb-primary);
    line-height: 1.1;
}

.sidebar-brand-text small {
    display: block;
    font-size: 0.7rem;
    color: var(--pyb-text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 0.5rem 0.85rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94A3B8;
    padding: 0.75rem 0.75rem 0.25rem;
    letter-spacing: 0.5px;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.sidebar-nav .nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background-color: #F8FAFC;
    color: var(--pyb-primary);
}

.sidebar-nav .nav-link.active {
    background-color: var(--pyb-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(250, 100, 0, 0.25);
}

.sidebar-nav .nav-link .badge {
    margin-left: auto;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--pyb-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #FAFAFC;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sidebar-user-info {
    flex-grow: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--pyb-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--pyb-text-muted);
}

/* =====================================================================
   MAIN CONTENT & TOPBAR
   ===================================================================== */
.main-wrapper {
    flex-grow: 1;
    margin-left: var(--pyb-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--pyb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-search {
    position: relative;
    width: 380px;
    max-width: 100%;
}

.topbar-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    background-color: #F8FAFC;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.topbar-search input:focus {
    background: #FFFFFF;
    border-color: var(--pyb-primary);
    box-shadow: 0 0 0 3px rgba(250, 100, 0, 0.15);
    outline: none;
}

.topbar-search i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: #F1F5F9;
    color: var(--pyb-primary);
}

.btn-icon .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #EF4444;
    border: 2px solid #FFFFFF;
}

.content-body {
    padding: 1.75rem;
    flex-grow: 1;
}

/* =====================================================================
   CARDS & STATS
   ===================================================================== */
.stat-card {
    background: var(--pyb-card-bg);
    border-radius: var(--pyb-radius-md);
    padding: 1.25rem;
    border: 1px solid var(--pyb-border);
    box-shadow: var(--pyb-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pyb-shadow-hover);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-icon.primary { background: #FFF5EB; color: #FA6400; }
.stat-icon.success { background: #E8F8EE; color: #1EB564; }
.stat-icon.warning { background: #FEF6E7; color: #F59E0B; }
.stat-icon.danger  { background: #FDECEE; color: #EF4444; }
.stat-icon.purple  { background: #F3E8FF; color: #9333EA; }

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pyb-text-muted);
    margin: 0;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--pyb-text-main);
    line-height: 1.1;
    margin: 0.25rem 0;
}

.stat-footer {
    font-size: 0.78rem;
    color: var(--pyb-text-muted);
}

/* Hero Banner matching Mockup */
.hero-banner {
    background: linear-gradient(135deg, #FA6400 0%, #FF8A3D 100%);
    border-radius: var(--pyb-radius-md);
    padding: 1.5rem 1.75rem;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(250, 100, 0, 0.22);
}

.hero-banner h4 {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.hero-banner p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 70%;
}

.hero-banner-art {
    position: absolute;
    right: 1.5rem;
    bottom: -10px;
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

/* =====================================================================
   BUTTONS & BADGES
   ===================================================================== */
.btn-pyb-primary {
    background-color: var(--pyb-primary);
    border-color: var(--pyb-primary);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s;
}

.btn-pyb-primary:hover {
    background-color: var(--pyb-primary-dark);
    border-color: var(--pyb-primary-dark);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(250, 100, 0, 0.3);
}

.btn-pyb-outline {
    background-color: transparent;
    border: 1.5px solid var(--pyb-primary);
    color: var(--pyb-primary);
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
}

.btn-pyb-outline:hover {
    background-color: var(--pyb-primary-light);
    color: var(--pyb-primary-dark);
}

/* Custom modern card */
.pyb-card {
    background: #FFFFFF;
    border-radius: var(--pyb-radius-md);
    border: 1px solid var(--pyb-border);
    box-shadow: var(--pyb-shadow);
    padding: 1.5rem;
}

.pyb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--pyb-border);
}

.pyb-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pyb-text-main);
    margin: 0;
}

/* Professional avatar pills in calendar header */
.prof-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.8rem;
    border-radius: 24px;
    background: #FFFFFF;
    border: 1px solid var(--pyb-border);
    font-size: 0.85rem;
    font-weight: 600;
}

.prof-pill img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Pet Avatar Thumbnails */
.pet-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #FFF5EB;
    border: 1px solid #FFE4CC;
}

/* Agenda list items matching right column in mockup */
.agenda-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid var(--pyb-border);
    margin-bottom: 0.65rem;
    transition: all 0.15s;
}

.agenda-item:hover {
    border-color: var(--pyb-primary-border);
    background: #FFFDFB;
}

.agenda-item-time {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1E293B;
    min-width: 52px;
}

.agenda-item-info {
    flex-grow: 1;
}

.agenda-item-pet {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0F172A;
}

.agenda-item-meta {
    font-size: 0.78rem;
    color: #64748B;
}

/* FullCalendar styling overrides to fit modern SaaS */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1.25rem;
}

.fc .fc-button-primary {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.85rem !important;
    box-shadow: none !important;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary.fc-button-active {
    background-color: var(--pyb-primary) !important;
    border-color: var(--pyb-primary) !important;
    color: #FFFFFF !important;
}

.fc .fc-event {
    border-radius: 8px !important;
    padding: 3px 6px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.1s;
}

.fc .fc-event:hover {
    transform: scale(1.02);
}

/* Responsive sidebar toggle */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}
