/* ═══════════════════════════════════════════
   Pet Clinic Manager — Green/Teal Vet Theme
   Override Uni Pro Admin colors
   ═══════════════════════════════════════════ */

:root {
    --pc-primary: #0d9488;
    --pc-primary-dark: #0f766e;
    --pc-primary-light: #14b8a6;
    --pc-primary-bg: #f0fdfa;
    --pc-primary-rgb: 13, 148, 136;
    --pc-accent: #059669;
    --pc-accent-light: #10b981;
    --pc-sidebar-bg: #0f766e;
    --pc-sidebar-active: #0d9488;
    --pc-sidebar-hover: rgba(255,255,255,0.1);
    --pc-gradient: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    --pc-gradient-light: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
}

/* ─── Sidebar Theme ─────────────────────── */
.sidebar-wrapper {
    background: var(--pc-sidebar-bg) !important;
}

.sidebar-wrapper .sidebar-tabs .nav {
    background: var(--pc-primary-dark) !important;
}

.sidebar-wrapper .sidebar-tabs .nav .nav-link {
    color: rgba(255,255,255,0.6) !important;
}

.sidebar-wrapper .sidebar-tabs .nav .nav-link:hover,
.sidebar-wrapper .sidebar-tabs .nav .nav-link.active {
    color: #fff !important;
    background: var(--pc-sidebar-active) !important;
}

.sidebar-wrapper .sidebar-tabs .nav .logo {
    background: var(--pc-primary-dark) !important;
}

.sidebar-wrapper .tab-content {
    background: var(--pc-sidebar-bg) !important;
}

.sidebar-wrapper .tab-pane-header {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

.sidebar-wrapper .sidebar-menu ul li a {
    color: rgba(255,255,255,0.85) !important;
}

.sidebar-wrapper .sidebar-menu ul li a:hover,
.sidebar-wrapper .sidebar-menu ul li a.current-page {
    color: #fff !important;
    background: rgba(255,255,255,0.08) !important;
}

.sidebar-wrapper .sidebar-menu ul .list-heading {
    color: rgba(255,255,255,0.5) !important;
}

.sidebar-wrapper .sidebar-actions .support-tile {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

.sidebar-wrapper .sidebar-actions a {
    color: rgba(255,255,255,0.9) !important;
}

.sidebar-wrapper .sidebar-actions .bg-avatar {
    background: var(--pc-primary-light) !important;
}

/* ─── Primary Buttons ───────────────────── */
.btn-primary {
    background: var(--pc-primary) !important;
    border-color: var(--pc-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--pc-primary-dark) !important;
    border-color: var(--pc-primary-dark) !important;
    box-shadow: 0 4px 15px rgba(var(--pc-primary-rgb), 0.35) !important;
}

.btn-outline-primary {
    color: var(--pc-primary) !important;
    border-color: var(--pc-primary) !important;
}

.btn-outline-primary:hover {
    background: var(--pc-primary) !important;
    color: #fff !important;
}

/* ─── Links & Accents ───────────────────── */
a {
    color: var(--pc-primary);
}

a:hover {
    color: var(--pc-primary-dark);
}

/* ─── Cards & Widgets ───────────────────── */
.card {
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-radius: 12px;
}

.card-header {
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
}

/* ─── Dashboard Stats Cards ─────────────── */
.stats-card .icon-box {
    background: var(--pc-gradient) !important;
}

/* ─── Badges ────────────────────────────── */
.badge.bg-primary,
.badge-primary {
    background: var(--pc-primary) !important;
}

/* ─── Progress Bars ─────────────────────── */
.progress-bar {
    background: var(--pc-gradient) !important;
}

/* ─── Page Header ───────────────────────── */
.page-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

/* ─── Form Focus States ─────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--pc-primary-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--pc-primary-rgb), 0.15) !important;
}

/* ─── Table Hover ───────────────────────── */
.table-hover tbody tr:hover {
    background: var(--pc-primary-bg) !important;
}

/* ─── Pagination ────────────────────────── */
.page-item.active .page-link {
    background: var(--pc-primary) !important;
    border-color: var(--pc-primary) !important;
}

.page-link {
    color: var(--pc-primary) !important;
}

/* ─── Nav Tabs ──────────────────────────── */
.nav-tabs .nav-link.active {
    color: var(--pc-primary) !important;
    border-bottom-color: var(--pc-primary) !important;
}

/* ─── DataTables ────────────────────────── */
table.dataTable thead th {
    background: var(--pc-primary-bg) !important;
    color: var(--pc-primary-dark) !important;
    font-weight: 600;
}

/* ─── Scrollbar ─────────────────────────── */
::-webkit-scrollbar-thumb {
    background: var(--pc-primary-light);
    border-radius: 4px;
}

/* ─── Loading Spinner ───────────────────── */
#loading-wrapper .spinner-border {
    color: var(--pc-primary) !important;
}

/* ─── Custom Alert for Success ──────────── */
.alert-success {
    background: var(--pc-primary-bg) !important;
    color: var(--pc-primary-dark) !important;
    border-color: var(--pc-primary-light) !important;
}

/* ─── Clinic Specific Styles ────────────── */
.pet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pc-primary-light);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active { background: #ecfdf5; color: #059669; }
.status-inactive { background: #fef2f2; color: #dc2626; }
.status-pending { background: #fffbeb; color: #d97706; }
.status-completed { background: #eff6ff; color: #2563eb; }

/* ─── Quick Stats ───────────────────────── */
.quick-stat {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.quick-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.quick-stat .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.quick-stat .stat-icon.green { background: var(--pc-gradient); }
.quick-stat .stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.quick-stat .stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.quick-stat .stat-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.quick-stat .stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.quick-stat h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0 2px;
    color: #1e293b;
}

.quick-stat p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* ─── Sidebar Profile Footer ─────────────── */
.sidebar-tabs .nav {
    display: flex !important;
    flex-direction: column !important;
}

.sidebar-tabs .nav .logout {
    margin-top: auto !important;
    background: rgba(0,0,0,0.1) !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
}

.sidebar-profile-footer {
    position: absolute;
    bottom: 0;
    left: 0; /* Align to the left edge of the tab pane */
    width: 100%; /* Spans the full width of the active tab pane */
    height: 60px;
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
}

.sidebar-wrapper .tab-content {
    height: 100% !important;
    padding-bottom: 60px !important;
    position: relative;
}

.user-profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Enable flex-child truncation */
    max-width: calc(100% - 62px); /* Reserve clear space for cart and logout buttons */
}

.user-profile-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pc-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0; /* Always maintain a perfect round circle shape! */
}

.user-profile-info .details {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Enable inner hierarchy text shrinking */
}

.user-profile-info .details h6 {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Breathtaking ellipsis truncation */
}

.user-profile-info .details span {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
}

.sidebar-profile-footer .logout-btn {
    color: rgba(255,255,255,0.6) !important;
    font-size: 20px;
    transition: all 0.2s;
}

.sidebar-profile-footer .logout-btn:hover {
    color: #fff !important;
    transform: translateX(3px);
}

.sidebar-profile-footer .pos-footer-btn {
    color: rgba(255,255,255,0.6) !important;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-footer .pos-footer-btn:hover {
    color: #ef4444 !important; /* Standout vibrant Red on hover! */
    transform: scale(1.15);
}

.sidebar-profile-footer .service-invoice-footer-btn {
    color: rgba(255,255,255,0.6) !important;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-profile-footer .service-invoice-footer-btn:hover {
    color: #10b981 !important; /* Standout emerald green on hover! */
    transform: scale(1.15);
}

@media (max-width: 991px) {
    .sidebar-profile-footer {
        width: 100%;
        left: 0;
    }
}

/* ─── Dynamic Sidebar Switching Styles ─────────────────── */
/* Always display the sidebar toggle button for smooth dynamic switching */
.page-header .toggle-sidebar {
    display: flex !important;
    margin-right: 15px !important;
    transition: all 0.3s ease;
}

/* Subtle micro-animation when hovering on the toggle button */
.page-header .toggle-sidebar:hover {
    transform: scale(1.08);
    background-color: var(--pc-primary-bg) !important;
    border-color: var(--pc-primary) !important;
}

.page-header .toggle-sidebar i {
    color: var(--pc-primary) !important;
    transition: transform 0.3s ease;
}

/* Rotate icon slightly on hover to give a premium feel */
.page-header .toggle-sidebar:hover i {
    transform: rotate(90deg);
}
