/* TEC Admin - Clean, Simple, Harsher Design System */

:root {
    --tec-primary: #2c3e50;
    --tec-secondary: #34495e;
    --tec-accent: #3498db;
    --tec-success: #27ae60;
    --tec-warning: #f39c12;
    --tec-danger: #c0392b;
    --tec-dark: #1a252f;
    --tec-light: #ecf0f1;
    --tec-border: #bdc3c7;
    --tec-text: #2c3e50;
    --tec-text-muted: #7f8c8d;
    --tec-bg: #ffffff;
    --tec-bg-alt: #f8f9fa;
}

/* Override Gentelella bubbly design with harsher, cleaner lines */
:root {
    --radius: 2px;
    --radius-sm: 1px;
    --radius-lg: 3px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.1);
    --primary: #2c3e50;
    --primary-lt: rgba(44,62,80,0.05);
    --primary-dk: #1a252f;
    --body-bg: #f5f5f5;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f8f9fa;
    --border-color: #dcdcdc;
    --border-color-light: #e8e8e8;
    --border-translucent: rgba(0,0,0,0.1);
    --text: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-muted: #7f8c8d;
    --text-disabled: #bdc3c7;
}

/* Body and Layout */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--body-bg);
    color: var(--text);
    line-height: 1.5;
}

/* Admin page loading states — content hidden initially, shown after loading */
body[data-shell="admin"] .main {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show content immediately when shell is loaded (JS successful) */
body[data-shell="admin"].shell-loaded .main {
    opacity: 1;
    visibility: visible;
}

/* Fallback: show content after timeout if JS fails */
body[data-shell="admin"].loading-fallback .main {
    opacity: 1;
    visibility: visible;
}

/* Loading indicator */
.admin-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.admin-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Hide loading indicator when shell is loaded */
body[data-shell="admin"].shell-loaded .admin-loading {
    opacity: 0;
    pointer-events: none;
}

/* Hide loading indicator on fallback */
body[data-shell="admin"].loading-fallback .admin-loading {
    opacity: 0;
    pointer-events: none;
}

.admin-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disable transitions when animations are disabled */
body[data-animations="false"] .main,
body[data-animations="false"] .admin-loading {
    transition: none !important;
}

/* Disable spinner animation when animations are disabled */
body[data-animations="false"] .admin-loading-spinner {
    animation: none !important;
}

/* Remove rounded corners and soft shadows */
.card {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-card) !important;
    border: 1px solid var(--border-color) !important;
}

.card-header {
    border-bottom: 1px solid var(--border-color) !important;
    background-color: var(--bg-surface-secondary) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 12px 16px !important;
}

.card-body {
    padding: 16px !important;
}

/* Sharper buttons */
.btn {
    border-radius: var(--radius) !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border: 1px solid transparent !important;
    transition: none !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--primary-dk) !important;
    border-color: var(--primary-dk) !important;
}

.btn-outline {
    background-color: transparent !important;
    border-color: var(--border-color) !important;
    color: var(--text) !important;
}

.btn-outline:hover {
    background-color: var(--bg-surface-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Cleaner form inputs */
.form-control {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border-color) !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    background-color: var(--bg-surface) !important;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px var(--primary) !important;
    outline: none !important;
}

.form-group {
    margin-bottom: 16px !important;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sharper table design */
.table {
    border-radius: var(--radius) !important;
    overflow: hidden !important;
}

.table thead th {
    background-color: var(--bg-surface-secondary) !important;
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 12px 16px !important;
}

.table tbody td {
    border-bottom: 1px solid var(--border-color-light) !important;
    padding: 12px 16px !important;
    vertical-align: middle !important;
}

.table tbody tr:hover {
    background-color: var(--bg-surface-secondary) !important;
}

/* Cleaner status badges */
.status {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
}

.status-green {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-blue {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Row layout system */
.row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.row.col-3 > .card {
    flex: 1;
}

.row.col-4 > .card {
    flex: 1;
}

.row.col-8-4 > .card:first-child {
    flex: 2;
}

.row.col-8-4 > .card:last-child {
    flex: 1;
}

/* Stat items for card body */
.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-surface-secondary);
    border-radius: var(--radius);
}

/* Notification badge */
.notification-badge {
    position: fixed;
    top: 16px;
    right: 16px;
    background-color: var(--tec-danger);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
}

.status-yellow {
    background-color: #fffde7;
    color: #f57f17;
    border: 1px solid #fff9c4;
}

.status-red {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Sharper page header */
.page-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    margin-bottom: 24px;
}

.page-pretitle {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* Cleaner authentication page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--body-bg);
    padding: 20px;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
}

.auth-brand {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border-radius: var(--radius);
    margin-right: 12px;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Input groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-group .form-control {
    padding-left: 36px !important;
}

/* Cleaner sidebar override */
.sidebar {
    background-color: var(--tec-dark) !important;
    border-right: 1px solid var(--border-color) !important;
}

.sidebar-link {
    border-radius: var(--radius-sm) !important;
    margin: 2px 8px !important;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(255,255,255,0.1) !important;
}

/* Utility */
.badge {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px !important;
}

.badge-danger {
    background-color: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2 !important;
}

.badge-warning {
    background-color: #fffde7 !important;
    color: #f57f17 !important;
    border: 1px solid #fff9c4 !important;
}

.badge-info {
    background-color: #e3f2fd !important;
    color: #1565c0 !important;
    border: 1px solid #bbdefb !important;
}

/* User table styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--bg-surface-secondary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.user-id {
    font-size: 12px;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 4px;
}

.status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.btn-icon {
    border-radius: var(--radius-sm) !important;
    padding: 6px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    transition: none !important;
}

.btn-icon:hover {
    background: var(--bg-surface-secondary) !important;
    color: var(--text) !important;
}

/* Alerts */
.alert {
    border-radius: var(--radius) !important;
    border: 1px solid !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
}

.alert-danger {
    background-color: #ffebee !important;
    border-color: #ffcdd2 !important;
    color: #c62828 !important;
}

.alert-success {
    background-color: #e8f5e9 !important;
    border-color: #c8e6c9 !important;
    color: #2e7d32 !important;
}

/* Form checkboxes */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* Toggle switches */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle {
    width: 40px;
    height: 20px;
    background-color: var(--border-color);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle.on {
    background-color: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle.on::after {
    transform: translateX(20px);
}

/* Card options */
.card-options {
    display: flex;
    gap: 4px;
}

.card-opt-btn {
    border: none;
    background: transparent;
    padding: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
}

.card-opt-btn:hover {
    background-color: var(--bg-surface-secondary);
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 12px 16px;
    }
    
    .page-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .page-actions .btn {
        width: 100%;
    }
    
    .auth-card {
        padding: 24px;
    }
}

/* Calendar Styles */
#calendar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius);
    background-color: var(--bg-surface);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--primary-lt);
    border-radius: var(--radius);
}

.event-day {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.event-month {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.event-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.event-category {
    color: var(--primary);
}

.event-author {
    color: var(--text-muted);
}

.status-scheduled {
    color: #1565c0;
    border: 1px solid #bbdefb;
    background-color: #e3f2fd;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.status-pending {
    color: #f57f17;
    border: 1px solid #fff9c4;
    background-color: #fffde7;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

/* Analytics Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.stat-icon-blue {
    background-color: #e3f2fd;
    color: #1565c0;
}

.stat-icon-green {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stat-icon-purple {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.stat-icon-orange {
    background-color: #fff3e0;
    color: #e65100;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.stat-change-positive {
    color: #2e7d32;
}

.stat-change-negative {
    color: #c62828;
}

.stat-change-label {
    color: var(--text-muted);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.category-views {
    font-size: 12px;
    color: var(--text-muted);
}

.category-bar {
    height: 8px;
    background-color: var(--bg-surface-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

/* Media Library Styles */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.media-grid.media-list-view {
    grid-template-columns: 1fr;
}

.media-item {
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--bg-surface);
    transition: box-shadow 0.2s;
}

.media-item:hover {
    box-shadow: var(--shadow-card);
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-preview-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background-color: var(--bg-surface-secondary);
    overflow: hidden;
}

.media-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-file {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.media-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    font-size: 16px;
}

.media-action-btn:hover {
    background-color: var(--bg-surface-secondary);
    transform: translateY(-2px);
}

.media-action-btn-danger:hover {
    background-color: #ffebee;
    color: #c62828;
}

/* Filter Dropdown Styles */
.filter-dropdown {
    position: relative;
}

.filter-dropdown.open .filter-menu {
    display: block;
}

.filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    z-index: 100;
    padding: 16px;
}

.filter-section {
    margin-bottom: 16px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-option span {
    flex: 1;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color-light);
}

.filter-actions .btn {
    flex: 1;
}

/* Filter button styling */
#filterBtn {
    display: flex;
    align-items: center;
    gap: 8px;
}

#filterBtn .bi-chevron-down {
    font-size: 12px;
    transition: transform 0.2s;
}

.btn-secondary {
    background-color: var(--bg-surface-secondary);
    color: var(--text);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    border-color: var(--border-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Button icon styling */
.btn i {
    margin-right: 6px;
}

.btn i:last-child {
    margin-right: 0;
}

.media-info {
    padding: 12px;
}

.media-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 4px;
}

.media-item-upload {
    border: 2px dashed var(--border-color);
    background-color: var(--bg-surface-secondary);
}

.media-upload-area {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 24px;
}

.media-upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.media-upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.media-upload-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.media-upload-area.drag-over {
    background-color: var(--primary-lt);
    border-color: var(--primary);
}

.copy-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.storage-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.storage-bar {
    height: 8px;
    background-color: var(--bg-surface-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
}

.storage-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.storage-used {
    font-weight: 500;
    color: var(--text);
}

/* Profile Styles */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color-light);
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--bg-surface-secondary);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

.avatar-badge svg {
    width: 12px;
    height: 12px;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.profile-role {
    display: inline-block;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.stat-icon-blue {
    background-color: #e3f2fd;
    color: #1565c0;
}

.stat-icon-green {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stat-icon-purple {
    background-color: #f3e5f5;
    color: #7b1fa2;
}



.stat-icon-gray {
    background-color: #f5f5f5;
    color: #616161;
}

.stat-icon-red {
    background-color: #ffebee;
    color: #c62828;
}

.stat-icon-teal {
    background-color: #e0f2f1;
    color: #00695c;
}

.stats-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.stats-container::-webkit-scrollbar {
    width: 6px;
}

.stats-container::-webkit-scrollbar-track {
    background: var(--bg-surface-secondary);
    border-radius: 3px;
}

.stats-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.stats-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

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

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius);
}

.activity-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.activity-icon-blue {
    background-color: #e3f2fd;
    color: #1565c0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.action-row:last-child {
    border-bottom: none;
}

.action-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.action-title-danger {
    color: #c62828;
}

.action-description {
    font-size: 12px;
    color: var(--text-muted);
}

.label-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 14px;
}
.alert-success {
    border-color: #1e7e34;
    background: #edf7ef;
    color: #145523;
}
.alert-danger {
    border-color: #a71d2a;
    background: #fdeeee;
    color: #721c24;
}
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}
.action-buttons .btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.action-buttons .btn i {
    font-size: 15px;
    line-height: 1;
}
.btn .bi {
    font-size: 15px;
    margin-right: 6px;
}
.btn.btn-sm .bi {
    margin-right: 0;
}
.admin-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
}
.admin-empty i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}
.form-label .req {
    color: #a71d2a;
}
.help-section h2 {
    font-size: 16px;
    margin: 24px 0 8px;
}
.help-section p, .help-section li {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.notification-item.unread {
    background: var(--bg-surface-secondary);
    font-weight: 600;
}
.inbox-item-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color-light);
}
body.compact-mode .page-wrapper {
    max-width: 100%;
}
body.no-animations * {
    animation: none !important;
    transition: none !important;
}

