/* Webdash Bootstrap 5 Custom CSS - Dual Sidebar Theme */
/* Font is self-hosted via fonts.css (loaded separately), no CDN import. */

:root {
    --primary-color: #00b49d;
    --primary-hover: #009c88;
    --primary-light: rgba(0, 180, 157, 0.1);
    --secondary-color: #7c3aed;
    --sidebar-primary-bg: #16191f;
    --sidebar-secondary-bg: #1e232d;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --body-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --sidebar-primary-width: 84px;
    --sidebar-secondary-width: 210px;
    --header-height: 70px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    font-size: 0.875rem;
    overflow-x: hidden;
}

/* ==========================================================================
   Dual Level Sidebar Layout
   ========================================================================== */

.app-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Sidebar Wrapper */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    transition: transform 0.3s ease;
}

/* Level 1: Primary Icon Sidebar */
.sidebar-primary {
    width: var(--sidebar-primary-width);
    background-color: var(--sidebar-primary-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    z-index: 2;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #00b49d 0%, #00d2b5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 180, 157, 0.3);
    overflow: hidden;
}

.brand-logo.has-logo {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.nav-primary {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nav-primary-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.nav-primary-link {
    width: 100%;
    max-width: 68px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.2rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
}

.nav-primary-link i {
    font-size: 1.2rem;
    line-height: 1;
}

.nav-primary-link span {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    white-space: normal;
}

.nav-primary-link:hover {
    color: #ffffff;
    background-color: var(--sidebar-hover-bg);
}

.nav-primary-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 180, 157, 0.35);
}

.nav-primary-bottom {
    margin-top: auto;
}

/* Level 2: Secondary Sub-Menu Sidebar */
.sidebar-secondary {
    width: var(--sidebar-secondary-width);
    background-color: var(--sidebar-secondary-bg);
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow-y: auto;
    padding-top: 1.5rem;
    transition: width 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    white-space: nowrap;
}

/* Collapsed Secondary Sidebar State */
.sidebar-wrapper.collapsed-secondary .sidebar-secondary {
    width: 0 !important;
    opacity: 0;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
}

.sidebar-secondary-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.2px;
}

.sub-menu-group {
    display: none;
    padding: 0 0.85rem;
    flex: 1;
}

.sub-menu-group.active {
    display: block;
}

.sub-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sub-menu-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.835rem;
    transition: all 0.2s ease;
    gap: 0.6rem;
}

.sub-menu-link i {
    font-size: 1rem;
    opacity: 0.8;
}

.sub-menu-link:hover {
    color: #ffffff;
    background-color: var(--sidebar-hover-bg);
}

.sub-menu-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 180, 157, 0.25);
}

/* Rocket Upgrade Promo Box */
.upgrade-promo-box {
    margin: 1.25rem 0.85rem;
    background: radial-gradient(circle at top right, #2b323e, #1a1e27);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.upgrade-promo-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 180, 157, 0.15);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.75rem;
}

.upgrade-promo-title {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-bottom: 0.85rem;
    line-height: 1.4;
    font-weight: 400;
}

.btn-upgrade {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 0.45rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 180, 157, 0.3);
}

.btn-upgrade:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.promo-version {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.65rem;
    display: block;
}

/* ==========================================================================
   Main Content Layout & Top Header
   ========================================================================== */

.main-content {
    flex: 1;
    margin-left: calc(var(--sidebar-primary-width) + var(--sidebar-secondary-width));
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Main Content Margin when secondary sidebar is collapsed */
.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-primary-width) !important;
}

/* Top Navbar Header */
.top-header {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.search-form {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.45rem 2.75rem 0.45rem 1rem;
    font-size: 0.85rem;
    width: 100%;
    transition: all 0.2s ease;
}

.search-input:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 157, 0.15);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.header-icon-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Header Profile & Profile Dropdown Styling */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.user-profile:hover,
.user-profile.show {
    background-color: #f8fafc;
}

.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.user-info {
    line-height: 1.25;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    margin: 0;
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Custom Profile Dropdown Menu */
.profile-dropdown-menu {
    width: 270px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-radius: 16px !important;
    padding: 0;
    margin-top: 0.65rem !important;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown-header {
    background: linear-gradient(135deg, rgba(0, 180, 157, 0.08) 0%, rgba(0, 180, 157, 0.02) 100%);
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-dropdown-user-info {
    min-width: 0;
}

.profile-dropdown-user-info h6,
.profile-dropdown-user-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-user-info span {
    font-size: 0.75rem;
}

.profile-dropdown-body {
    padding: 0.5rem;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.profile-dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.profile-dropdown-item i {
    font-size: 1.1rem;
    transition: transform 0.15s ease;
}

.profile-dropdown-item:hover i {
    transform: translateX(2px);
}

.profile-dropdown-footer {
    padding: 0.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #fafafa;
}

.profile-dropdown-item-logout {
    color: #ef4444;
}

.profile-dropdown-item-logout:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Content Container */
.content-body {
    padding: 1.5rem;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.breadcrumb {
    margin: 0;
    font-size: 0.8rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 600;
}

/* Footer */
.app-footer {
    padding: 1rem 1.5rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 575.98px) {
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        text-align: left;
    }
}

.floating-settings-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 180, 157, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 1020;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.floating-settings-btn:hover {
    transform: rotate(45deg);
}

/* ==========================================================================
   SweetAlert2 popup - restyled to match the app's rounded/teal look
   instead of the plugin's own default styling. Buttons use
   buttonsStyling:false everywhere already (project-wide swalInit
   mixins), so they're plain .btn-teal/.btn-danger/.btn-outline-teal
   and already match the rest of the app automatically.
   ========================================================================== */

.swal2-popup {
    border-radius: 18px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    padding: 1.75rem !important;
}

.swal2-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.swal2-html-container {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

.swal2-actions {
    gap: 0.6rem;
}

.swal2-actions .btn {
    min-width: 100px;
}

/* ==========================================================================
   UI Components & Screenshot Matching Styles
   ========================================================================== */

.card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    margin-bottom: 1.5rem;
    background-color: var(--card-bg);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* bg-teal isn't a real Bootstrap utility class - without this, a
   "bg-teal text-white" header had no background at all, making its
   white title text render white-on-white (invisible). */
.bg-teal {
    background-color: var(--primary-color) !important;
}

/* All modal headers are plain white/card-colored site-wide, regardless
   of any bg-success/bg-warning/bg-info/bg-teal/etc. class still present
   in a view's markup - overrides those utility backgrounds. */
.modal-header {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid var(--border-color);
}

/* Smaller, consistent modal title, and forced to the normal dark text
   color regardless of any text-white class left over from when some
   headers used to be colored. */
.modal-title {
    color: var(--text-main) !important;
    font-size: 1rem;
    font-weight: 700;
}

/* Close icon no longer needs the inverted/white variant now that every
   header is white - reset it regardless of a leftover btn-close-white
   class in the markup. */
.modal-header .btn-close {
    filter: none !important;
}

/* Alert Styling Customizations to match Screenshot 1 */
.alert-teal {
    background-color: #e6f8f5;
    color: #007a6a;
    border-color: transparent;
}
.alert-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
    border-color: transparent;
}
.alert-warning-light {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: transparent;
}
.alert-info-light {
    background-color: #e0f2fe;
    color: #0369a1;
    border-color: transparent;
}
.alert-danger-light {
    background-color: #ffe4e6;
    color: #9f1239;
    border-color: transparent;
}

/* Outline alerts */
.alert-outline-primary {
    border: 1px solid #00b49d;
    color: #00b49d;
    background-color: transparent;
}
.alert-outline-secondary {
    border: 1px solid #94a3b8;
    color: #64748b;
    background-color: transparent;
}
.alert-outline-warning {
    border: 1px solid #eab308;
    color: #ca8a04;
    background-color: transparent;
}
.alert-outline-info {
    border: 1px solid #3b82f6;
    color: #2563eb;
    background-color: transparent;
}
.alert-outline-danger {
    border: 1px solid #ef4444;
    color: #dc2626;
    background-color: transparent;
}

/* Solid Alerts */
.alert-solid-teal { background-color: #00b49d; color: #ffffff; border: none; }
.alert-solid-purple { background-color: #7c3aed; color: #ffffff; border: none; }
.alert-solid-success { background-color: #10b981; color: #ffffff; border: none; }
.alert-solid-warning { background-color: #f59e0b; color: #ffffff; border: none; }
.alert-solid-info { background-color: #2563eb; color: #ffffff; border: none; }
.alert-solid-danger { background-color: #dc2626; color: #ffffff; border: none; }

/* Left border alerts */
.alert-left-border {
    border: none;
    border-left: 4px solid var(--primary-color);
}
.alert-left-primary { border-left-color: #00b49d; background-color: #e6f8f5; color: #007a6a; }
.alert-left-purple { border-left-color: #7c3aed; background-color: #f3e8ff; color: #6b21a8; }
.alert-left-success { border-left-color: #10b981; background-color: #d1fae5; color: #065f46; }
.alert-left-warning { border-left-color: #f59e0b; background-color: #fef3c7; color: #92400e; }
.alert-left-info { border-left-color: #2563eb; background-color: #dbeafe; color: #1e40af; }
.alert-left-danger { border-left-color: #dc2626; background-color: #fee2e2; color: #991b1b; }

/* Dashboard Metric Card Icons */
.metric-card {
    padding: 1.25rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.metric-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.metric-icon-teal { background-color: #e6f8f5; color: #00b49d; }
.metric-icon-green { background-color: #d1fae5; color: #10b981; }
.metric-icon-yellow { background-color: #fef3c7; color: #f59e0b; }
.metric-icon-red { background-color: #fee2e2; color: #ef4444; }

/* System Requirements modal */
.sysreq-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.sysreq-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px dashed var(--border-color);
}

.sysreq-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.sysreq-item .metric-icon-box {
    flex-shrink: 0;
}

.sysreq-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.sysreq-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.sysreq-desc-list {
    list-style: disc;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.sysreq-desc-list li {
    margin-bottom: 0.2rem;
}

.sysreq-desc-list li:last-child {
    margin-bottom: 0;
}

/* Form controls customization */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 157, 0.15);
}

.input-group-text {
    background-color: #f8fafc;
    border-color: var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
}

.password-toggle-btn {
    cursor: pointer;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Tabbed cards
   ========================================================================== */

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding: 0.7rem 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    background: transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-tabs .nav-link i {
    font-size: 1rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
    isolation: isolate;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-color: var(--primary-color);
}

.tab-content > .tab-pane {
    padding-top: 1.5rem;
}

.btn-teal {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
}

.btn-teal:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

.btn-outline-teal {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
}

.btn-outline-teal:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-outline-danger {
    background-color: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
}

.btn-outline-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .sidebar-wrapper {
        transform: translateX(-100%);
    }

    .sidebar-wrapper.show {
        transform: translateX(0);
    }

    .main-content,
    .main-content.sidebar-collapsed {
        margin-left: 0 !important;
    }
}

body.sidebar-drawer-open {
    overflow: hidden;
}

/* ==========================================================================
   Infinite-scroll card lists (list pages)
   ========================================================================== */

.list-search-wrap {
    position: relative;
    max-width: 340px;
    width: 100%;
}

.list-search-wrap .form-control {
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border-radius: 30px;
    border-color: var(--border-color);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.list-search-wrap .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.list-search-wrap i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

@keyframes recordCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.record-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.35rem 1.4rem 1.15rem;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: recordCardIn 0.35s ease both;
}

.record-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.record-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -14px rgba(15, 23, 42, 0.18);
    border-color: rgba(0, 180, 157, 0.35);
}

.record-card-title {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-main);
    line-height: 1.3;
}

.record-card-title a {
    color: inherit;
    text-decoration: none;
}

.record-card-title a:hover {
    color: var(--primary-color);
}

.record-card-sub {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.record-card-sub a {
    color: var(--text-muted);
    text-decoration: none;
}

.record-card-sub a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.record-card .badge {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.38em 0.8em;
    border-radius: 999px;
    white-space: nowrap;
}

.record-card .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.record-card .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}

.record-card .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #b45309 !important;
}

.record-card .badge.bg-info {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
}

.record-card .badge.bg-primary {
    background-color: var(--primary-light) !important;
    color: var(--primary-hover) !important;
}

.record-card .badge.bg-secondary,
.record-card .badge.bg-dark {
    background-color: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}

.record-card-meta {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
}

.record-card-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.record-card-meta-item span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.85;
}

.record-card-meta-item strong {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-card-actions {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.record-card-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--body-bg);
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.record-card-actions a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.list-sentinel {
    height: 1px;
}

.list-loading {
    text-align: center;
    padding: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.list-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.list-empty i {
    font-size: 2.25rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.5rem;
}

.ri-spin {
    display: inline-block;
    animation: riSpin 0.8s linear infinite;
}

@keyframes riSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Modern Checkboxes & Switches
   ========================================================================== */

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0.15em;
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.form-check-input:hover {
    border-color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.form-check-input:active {
    transform: scale(0.9);
}

.form-switch .form-check-input {
    width: 2.3em;
    height: 1.25em;
    border-radius: 2em;
}

.form-switch .form-check-input:focus {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2300b49d'/%3e%3c/svg%3e");
}
