.glassmorphism {
    background: rgba(15, 17, 21, 0.45) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Tailwind-style Utility Aliases (Rule 4.A) */
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
.flex-column { flex-direction: column !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-2 { gap: 0.5rem !important; }


.btn-dark, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-dark:hover, .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

body {
    font-size: 14px;
    line-height: 1.5;
}

/* Dashboard Grid System */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.dashboard-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

/* Profile Grids (Pet/Tutor) */
.profile-main-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .profile-main-grid {
        grid-template-columns: 1fr;
    }
}

.profile-sidebar-card {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 24px;
    overflow: hidden;
}

.profile-main-card {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Info Blocks & Boxes */
.info-block {
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}

.info-block:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: var(--primary);
}

.icon-circle-box {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.icon-circle-box-sm {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-primary-glass { background: rgba(var(--primary-rgb), 0.1) !important; }
.bg-accent-glass { background: rgba(var(--accent-rgb), 0.1) !important; }

/* Standardized Header Icon Box (Rule 4.A) */
.header-icon-box {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 16px;
    background: rgba(var(--primary-rgb), 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--primary);
    flex-shrink: 0;
    margin-right: 4px;
    transition: var(--transition, all 0.3s ease);
}

/* Icon Scales (Rule 6) */
.icon-sm, .icon-sm svg { width: 14px !important; height: 14px !important; min-width: 14px; }
.icon-lg, .icon-lg svg { width: 24px !important; height: 24px !important; min-width: 24px; }
[data-lucide], [data-lucide] svg { 
    width: 16px; 
    height: 16px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
}

/* Logs Filter Specifics */
.logs-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logs-filter-form .floating-group {
    flex: 1;
    margin-bottom: 0; /* Integrated version doesn't need bottom margin */
}

.logs-filter-form button, 
.logs-filter-form a {
    height: 54px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .logs-filter-form {
        flex-wrap: wrap !important;
    }
    .logs-filter-form .floating-group {
        min-width: 100% !important;
    }
}


/* Timeline & History */
.section-full-width {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    padding: 3.5rem !important;
    margin-bottom: 3rem;
    width: 100%;
    box-shadow: var(--card-shadow);
}

.timeline-container {
    position: relative;
    padding-left: 50px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 10px;
}

.timeline-marker {
    position: absolute;
    left: -47px;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 6px solid var(--bg-card);
    z-index: 2;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.timeline-item-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    transition: var(--transition);
}

.timeline-item-card:hover {
    border-color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.02) !important;
}

/* Forms & Modals */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .icon-lucide {
    position: absolute;
    left: 15px;
    color: var(--primary);
    width: 18px;
    height: 18px;
}

.input-with-icon .form-control {
    padding-left: 45px !important;
}

.modern-upload-box {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(var(--primary-rgb), 0.02);
    transition: var(--transition);
}

.modern-upload-box:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

/* Specialty Cards (Pets in Tutor profile, etc) */
.item-grid-card {
    text-decoration: none;
    border-radius: 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    padding: 1.5rem;
    height: 100%;
    transition: var(--transition);
}

.item-grid-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-5px);
    background: rgba(var(--primary-rgb), 0.05) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Overlay Utility */
.badge-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.status-badge-premium {
    color: var(--text-on-primary);
    padding: 6px 15px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Helper Classes for Modals and Forms */
.search-input-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 15px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
    width: 100%;
}

.search-input-box .form-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 10px 0 !important;
    flex: 1;
    margin: 0 !important;
}

.search-input-box .icon-lucide {
    flex-shrink: 0;
}

.text-primary-important { color: var(--primary) !important; }
.tracking-1 { letter-spacing: 1px; }

.label-caps-header {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--primary);
}

.company-logo-dashboard {
    width: 65px;
    height: 65px;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.next-event-card-premium {
    margin-top: 20px;
    background: rgba(var(--primary-rgb), 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.next-event-card-premium:hover {
    background: rgba(var(--primary-rgb), 0.06);
    border-color: var(--primary);
}

.icon-box-bell {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Margin Utilities */
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mb-8 { margin-bottom: 32px !important; }
.mb-10 { margin-bottom: 40px !important; }

/* Icon Box Variants */
.header-icon-box.sm { width: 40px; height: 40px; border-radius: 10px; }
.header-icon-box.md { width: 52px; height: 52px; border-radius: 16px; }
.header-icon-box.lg { width: 80px; height: 80px; border-radius: 24px; }

/* Layout Utilities */
.list-none { list-style: none; padding: 0; }
.rounded-16 { border-radius: 16px !important; }
.rounded-20 { border-radius: 20px !important; }
.rounded-24 { border-radius: 24px !important; }
.bg-card-alt { background: rgba(255, 255, 255, 0.03); }
.line-height-md { line-height: 1.6; }

/* Buttons Overrides */
.btn-premium {
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
}

.flex-2 { flex: 2 !important; }
.flex-3 { flex: 3 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* Icon Sizing Standards */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* Spacing Utilities */
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-5 { margin-top: 20px !important; }
.mt-6 { margin-top: 24px !important; }
.mt-7 { margin-top: 28px !important; }
.mt-8 { margin-top: 32px !important; }
.mt-9 { margin-top: 36px !important; }
.mt-10 { margin-top: 40px !important; }

.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mb-7 { margin-bottom: 28px !important; }
.mb-8 { margin-bottom: 32px !important; }
.mb-9 { margin-bottom: 36px !important; }
.mb-10 { margin-bottom: 40px !important; }

.pt-1 { padding-top: 4px !important; }
.pt-2 { padding-top: 8px !important; }
.pt-3 { padding-top: 12px !important; }
.pt-4 { padding-top: 16px !important; }
.pt-5 { padding-top: 20px !important; }
.pt-6 { padding-top: 24px !important; }

.pb-1 { padding-bottom: 4px !important; }
.pb-2 { padding-bottom: 8px !important; }
.pb-3 { padding-bottom: 12px !important; }
.pb-4 { padding-bottom: 16px !important; }
.pb-5 { padding-bottom: 20px !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.hidden { display: none !important; } /* Alias */
.invisible { visibility: hidden !important; }

/* Font Utilities */
.font-xs { font-size: 11px !important; }
.font-sm { font-size: 13px !important; }
.font-md { font-size: 18px !important; }
.font-lg { font-size: 24px !important; }
.font-mono { font-family: monospace !important; }

/* Grid Utilities */
.grid-span-2 { grid-column: span 2 !important; }
.grid-span-3 { grid-column: span 3 !important; }

/* Icon Button Square */
.icon-btn-square {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.icon-btn-square-lg {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Standardized Page Headers spacing */
.page-header, 
.dashboard-header, 
.profile-header, 
.logs-header, 
.users-header, 
.settings-page-header {
    margin-bottom: 40px !important;
}

/* Standardized Page Titles Color */
.page-header h2, 
.dashboard-header h2, 
.profile-header h2, 
.logs-header h2, 
.users-header h2, 
.settings-page-header h2 {
    color: var(--primary) !important;
    font-weight: 800 !important;
}

/* Card Spacing Defaults */
.card {
    margin-bottom: 24px !important;
}







/* Danger Glass Button */
.btn-danger-glass {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-danger-glass:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* ── Table Action Dropdown Pattern ──────────────────────────── */
.gear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.gear-btn:hover {
    background: var(--primary);
    color: #000 !important;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.gear-btn svg, .gear-btn i {
    width: 14px !important;
    height: 14px !important;
}

#action-dropdown-portal {
    position: fixed;
    z-index: 999999;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    min-width: 190px;
    display: none;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

#action-dropdown-portal.show {
    display: block;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#action-dropdown-portal a, 
#action-dropdown-portal button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    transition: 0.15s;
    cursor: pointer;
}

#action-dropdown-portal a:last-child, 
#action-dropdown-portal button:last-child {
    border-bottom: none;
}

#action-dropdown-portal a:hover, 
#action-dropdown-portal button:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

#action-dropdown-portal a.text-danger:hover, 
#action-dropdown-portal button.text-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

#action-dropdown-portal i, 
#action-dropdown-portal svg {
    width: 14px !important;
    height: 14px !important;
    opacity: 0.8;
}

