/* Parent Portal - Global CSS */
/* New design system with sidebar navigation */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --sidebar-width: 240px;
    --header-height: 60px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --text-dark: #1a1a1a;
    --text-body: #333333;
    --text-muted: #8c8c8c;
    --bg-white: #ffffff;
    --bg-light: #F7F7F7;
    --border-color: #d0d0d0;
    --header-bg: #222222;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f5f5f5;
    --sidebar-active: #ea7066;
    --sidebar-border: #e8e8e8;
    --sidebar-text: #333333;
    --sidebar-text-hover: #111111;
    --sidebar-icon-opacity: 0.8;
    --sidebar-scrollbar-thumb: #ccc;
    --sidebar-scrollbar-hover: #bbb;
}

/* Dark Theme */
[data-theme="dark"] {
    --text-dark: #e8e8e8;
    --text-body: #c0c0c0;
    --text-muted: #888888;
    --bg-white: #1e1e1e;
    --bg-light: #141414;
    --border-color: #333333;
    --header-bg: #1a1a1a;
    --sidebar-bg: #1a1a1a;
    --sidebar-hover: #2a2a2a;
    --sidebar-border: #333333;
    --sidebar-text: rgba(255, 255, 255, 0.85);
    --sidebar-text-hover: #ffffff;
    --sidebar-icon-opacity: 0.8;
    --sidebar-scrollbar-thumb: #444;
    --sidebar-scrollbar-hover: #555;
}

[data-theme="dark"] body {
    background-color: var(--bg-light);
}

[data-theme="dark"] p {
    color: var(--text-body);
}

[data-theme="dark"] .header {
    background: #1a1a1a;
}

[data-theme="dark"] .nav-card:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .alert-item {
    background: #1e1e1e;
}

[data-theme="dark"] .alert-item.alert-critical {
    background: #2d1515;
    border-color: #5c2020;
}

[data-theme="dark"] .alert-item.alert-critical .alert-item-title { color: #f87171; }
[data-theme="dark"] .alert-item.alert-critical .alert-item-subtitle { color: #ef9a9a; }
[data-theme="dark"] .alert-item.alert-critical .alert-item-icon { background: #3d1c1c; }
[data-theme="dark"] .alert-item.alert-critical:hover { background: #3a1a1a; border-color: #7f2d2d; }

[data-theme="dark"] .alert-item.alert-urgent {
    background: #2d2010;
    border-color: #5c4020;
}

[data-theme="dark"] .alert-item.alert-urgent .alert-item-title { color: #fb923c; }
[data-theme="dark"] .alert-item.alert-urgent .alert-item-subtitle { color: #fdba74; }
[data-theme="dark"] .alert-item.alert-urgent .alert-item-icon { background: #3d2a14; }
[data-theme="dark"] .alert-item.alert-urgent:hover { background: #3a2815; border-color: #7f5020; }

[data-theme="dark"] .alert-item.alert-info {
    background: #152030;
    border-color: #203d5c;
}

[data-theme="dark"] .alert-item.alert-info .alert-item-title { color: #60a5fa; }
[data-theme="dark"] .alert-item.alert-info .alert-item-subtitle { color: #93c5fd; }
[data-theme="dark"] .alert-item.alert-info .alert-item-icon { background: #1c2d3d; }
[data-theme="dark"] .alert-item.alert-info:hover { background: #1a2838; border-color: #2d5080; }

/* Bootstrap alert dark mode */
[data-theme="dark"] .alert-info { background-color: #152030; border-color: #203d5c; color: #93c5fd; }
[data-theme="dark"] .alert-success { background-color: #14261a; border-color: #1e4d2b; color: #86efac; }
[data-theme="dark"] .alert-danger { background-color: #2d1519; border-color: #5c2028; color: #fca5a5; }
[data-theme="dark"] .alert-warning { background-color: #2d2414; border-color: #5c4a1e; color: #fde68a; }

[data-theme="dark"] .alert-item-arrow {
    filter: invert(1);
}

[data-theme="dark"] .nav-card-arrow {
    filter: invert(1);
}

/* Dark mode: Form cards & inputs */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-white) !important;
}

[data-theme="dark"] .card-body.border {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .dragOut {
    background-color: var(--bg-white);
}

/* Dark mode: Checkboxes & radio buttons */
[data-theme="dark"] .form-check-input {
    background-color: var(--bg-light);
    border-color: #555;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: #84bed6;
    border-color: #84bed6;
}

[data-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(132, 190, 214, 0.25);
    border-color: #84bed6;
}

[data-theme="dark"] .form-check-label {
    color: var(--text-dark);
}

/* Memory cards - constrain width after dashboard migration */
.memory_container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Memory card dark mode */
[data-theme="dark"] .status {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .memory-info {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .memory-title-details {
    color: var(--text-muted);
}

[data-theme="dark"] .memory_container {
    box-shadow: rgba(0, 0, 0, 0.5) 0px 5px 5px;
}

[data-theme="dark"] .comment-textarea {
    background-color: #282828;
    border-color: var(--border-color);
    color: var(--text-body);
}

[data-theme="dark"] .comment-container {
    border-left-color: #84BED6;
}

[data-theme="dark"] .comment_counter {
    color: var(--text-muted);
}

[data-theme="dark"] .comment-text {
    color: var(--text-muted);
}

[data-theme="dark"] .status-create,
[data-theme="dark"] .status-create-no-round {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .options-ellipsis {
    color: var(--text-muted);
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-body);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-add-media-container:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

/* Podcast dark mode */
[data-theme="dark"] .category-card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .category-thumbnails {
    background: var(--bg-light);
}

[data-theme="dark"] .category-count {
    color: var(--text-muted);
}

[data-theme="dark"] .podcast-card {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-description {
    color: var(--text-muted);
}

[data-theme="dark"] #hero-section {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

[data-theme="dark"] #hero-description {
    color: var(--text-muted);
}

[data-theme="dark"] .filter-chip {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .category-icon {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

[data-theme="dark"] .tpp-page-item {
    color: var(--text-muted);
}

[data-theme="dark"] .tpp-page-item-active {
    color: #ea7066;
}

[data-theme="dark"] .tpp-form-text,
[data-theme="dark"] .tpp-form-textarea,
[data-theme="dark"] .tpp-form-select {
    background-color: #282828;
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-form-text:disabled,
[data-theme="dark"] .tpp-form-textarea:disabled,
[data-theme="dark"] .tpp-form-select:disabled {
    background-color: #1e1e1e;
    color: var(--text-muted);
    opacity: 0.7;
}

[data-theme="dark"] .tpp-form-label {
    color: var(--text-muted);
}

[data-theme="dark"] .page-navigation-middle {
    color: var(--text-muted);
}

[data-theme="dark"] .tpp-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tpp-container,
[data-theme="dark"] .tpp-container-no-flex {
    background-color: var(--bg-white);
    border-top-color: var(--border-color);
    border-right-color: var(--border-color);
    border-bottom-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-container:not(.left-red):not(.left-blue):not(.left-gray):not(.left-green) {
    border-left-color: var(--border-color);
}

[data-theme="dark"] .tpp-container-title {
    color: var(--text-dark);
}

[data-theme="dark"] .tpp-container-sub-title,
[data-theme="dark"] .tpp-container-sub-title-light {
    color: var(--text-muted);
}

a.tpp-container {
    transition: background-color 0.2s ease;
}

a.tpp-container:hover {
    background-color: var(--bg-light, #f5f5f5);
    text-decoration: none;
    color: inherit;
}

.tpp-container-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-right: 10px;
}

[data-theme="dark"] .tpp-container-icon {
    filter: invert(1);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-white);
    color: var(--text-dark);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-body {
    background-color: var(--bg-white);
}

/* Modal: fit on screen + close button */
.modal-dialog {
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    display: flex;
    flex-direction: column;
}

.modal-content {
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-header .close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    padding: 0;
    margin: 0;
}

.modal-header .close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

[data-theme="dark"] .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ========================================
   Header / Topbar
   ======================================== */
.header {
    background: var(--header-bg);
    color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    height: var(--header-height);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

.topbar-logo img {
    height: 32px;
    margin-right: 8px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-notifications {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s ease;
}

.topbar-notifications:hover {
    color: #ffffff;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--sidebar-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
}

.topbar-theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s ease;
}

.topbar-theme-toggle:hover {
    color: #ffffff;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    background: var(--bg-light);
}

/* ========================================
   Left Sidebar
   ======================================== */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid var(--sidebar-border);
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-hover);
}

.sidebar-menu {
    padding: 0 0 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-radius: 0;
    font-weight: 500;
}

.menu-item .menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: var(--sidebar-icon-opacity);
    flex-shrink: 0;
}

.menu-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    color: var(--sidebar-text);
}

.menu-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.menu-item:hover i {
    color: var(--sidebar-text-hover);
}

.menu-item:hover .menu-icon {
    opacity: 0.9;
}

.menu-item.active {
    background: rgba(234, 112, 102, 0.15);
    color: var(--sidebar-active);
    border-left-color: var(--sidebar-active);
    font-weight: 600;
    box-shadow: inset 4px 0 0 0 var(--sidebar-active);
}

.menu-item.active i {
    color: var(--sidebar-active);
}

.menu-item.active .menu-icon {
    opacity: 1;
}

.menu-badge {
    margin-left: auto;
    background: var(--sidebar-active);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: normal;
}

/* Mobile Menu Toggle (Desktop: Hidden) */
.mobile-menu-toggle {
    display: none;
    width: 100%;
    padding: 16px 24px;
    background: var(--sidebar-bg);
    border: none;
    border-bottom: 1px solid var(--sidebar-border);
    color: var(--sidebar-text-hover);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle:hover {
    background: var(--sidebar-hover);
}

.mobile-menu-toggle i {
    font-size: 18px;
    color: var(--sidebar-active);
}

/* ========================================
   Main Content Area
   ======================================== */
.dashboard-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.dashboard-header {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dashboard-header .dashboard-back-link {
    width: 100%;
}

.dashboard-header .btn,
.dashboard-header > a:not(.dashboard-back-link) {
    margin-left: auto;
}

.dashboard-header > a:not(.dashboard-back-link) ~ a,
.dashboard-header > a:not(.dashboard-back-link) ~ .btn,
.dashboard-header .btn ~ .btn {
    margin-left: 5px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
}

.dashboard-back-link:hover {
    color: var(--sidebar-active);
}

/* Section headings (replaces old .page-navigation-middle) */
.dashboard-content h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 30px 0 12px;
}

.dashboard-content h2:first-child {
    margin-top: 0;
}

/* Button containers */
.tpp-btn-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
}

.tpp-btn-left {
    margin-right: auto;
}

.tpp-btn-right {
    flex-grow: 1;
    text-align: right;
}

/* Fix for footer overlap */
footer {
    margin-left: var(--sidebar-width);
    width: auto;
}

footer.footer-full {
    margin-left: 0;
    width: 100%;
}

/* ========================================
   Navigation Cards (List Group Style)
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding-bottom: 0;
    margin-bottom: 40px;
}

.nav-card {
    background: transparent;
    border-radius: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: none;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.nav-card:last-child {
    border-bottom: none;
}

.nav-card:hover {
    background: var(--bg-light);
    transform: none;
    box-shadow: none;
}

.nav-card:hover .nav-card-arrow {
    opacity: 0.8;
}

.nav-card.nav-card-static {
    cursor: default;
}

.nav-card.nav-card-static:hover {
    background: transparent;
    border-color: var(--border-color);
}

.nav-card-icon-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-card-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-card-content {
    flex: 1;
}

.nav-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.nav-card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.nav-card-arrow {
    width: 24px;
    height: 24px;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

/* ========================================
   Alert Items (Notification List)
   ======================================== */
.dashboard-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 30px;
    isolation: isolate;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}

.alert-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.alert-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    margin-bottom: 0;
}

.alert-item:hover {
    z-index: 2;
}

.alert-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.alert-item-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.alert-item-content {
    flex: 1;
}

.alert-item-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 1px;
}

.alert-item-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

.alert-item-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    margin-left: 12px;
}

/* Alert: Critical (Red) */
.alert-item.alert-critical {
    background: #FEF2F2;
    border: 1px solid #FECACA;
}

.alert-item.alert-critical .alert-item-title { color: #991B1B; }
.alert-item.alert-critical .alert-item-subtitle { color: #B91C1C; }
.alert-item.alert-critical .alert-item-icon { background: #FEE2E2; }
.alert-item.alert-critical:hover { background: #fee2e2; border-color: #F87171; }

/* Alert: Urgent (Orange/Amber) */
.alert-item.alert-urgent {
    background: #FFF7ED;
    border: 1px solid #FED7AA;
}

.alert-item.alert-urgent .alert-item-title { color: #9A3412; }
.alert-item.alert-urgent .alert-item-subtitle { color: #C2410C; }
.alert-item.alert-urgent .alert-item-icon { background: #FFEDD5; }
.alert-item.alert-urgent:hover { background: #ffedd5; border-color: #FB923C; }

/* Alert: Info (Blue) */
.alert-item.alert-info {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
}

.alert-item.alert-info .alert-item-title { color: #1E40AF; }
.alert-item.alert-info .alert-item-subtitle { color: #1D4ED8; }
.alert-item.alert-info .alert-item-icon { background: #DBEAFE; }
.alert-item.alert-info:hover { background: #dbeafe; border-color: #60A5FA; }

/* ========================================
   Section Heading
   ======================================== */
.dashboard-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-heading:first-child {
    margin-top: 0;
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--bg-white);
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #52c41a 0%, #237804 100%); }
.stat-icon.yellow { background: linear-gradient(135deg, #faad14 0%, #d48806 100%); }
.stat-icon.red { background: linear-gradient(135deg, #f5222d 0%, #cf1322 100%); }

.stat-content { flex: 1; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========================================
   Section Cards
   ======================================== */
.dashboard-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.section-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-card.full-width {
    grid-column: 1 / -1;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes softPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    cursor: pointer;
}

/* Utility */
.hidden {
    display: none !important;
}

/* ========================================
   Pagination
   ======================================== */
.tpp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
}

.tpp-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.2s;
}

.tpp-pagination-link:hover {
    color: #ea7066;
    text-decoration: none;
}

.tpp-pagination-link.active {
    background-color: #ea7066;
    color: #fff;
    border-radius: 6px;
    padding: 12px 26px;
}

.tpp-pagination-link.active:hover {
    background-color: #e85045;
    color: #fff;
}

.tpp-pagination-nav {
    background-color: #ea7066;
    color: #fff;
    border-radius: 6px;
    padding: 12px 26px;
}

.tpp-pagination-nav:hover {
    background-color: #e85045;
    color: #fff;
}

/* ========================================
   Footer
   ======================================== */
.dashboard-footer {
    padding: 20px 24px;
    text-align: left;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.dashboard-footer p {
    margin: 0;
}

.dashboard-footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.dashboard-footer a:hover {
    color: var(--text-body);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: none;
    }

    .dashboard-content,
    footer {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        background: var(--sidebar-bg);
        border-bottom: none;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }

    .sidebar-menu.active {
        max-height: 1000px;
        padding: 20px 0;
        border-bottom: 1px solid var(--sidebar-border);
        transition: max-height 0.5s ease, padding 0.35s ease;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .menu-item {
        flex-direction: row;
        padding: 14px 24px;
        border-left: 3px solid transparent;
        border-bottom: none;
        white-space: normal;
    }

    .menu-item i {
        margin-right: 12px;
        margin-bottom: 0;
    }

    .menu-item.active {
        border-left-color: var(--sidebar-active);
        border-bottom-color: transparent;
    }

    .dashboard-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 576px) {
    .dashboard-content {
        padding: 12px;
    }

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

    .dashboard-header h1 {
        font-size: 24px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .dashboard-content,
    footer {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 12px 16px;
    }
}
