/* Admin Dashboard - Dark Green Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0A2F2A;
    --bg-secondary: #0D3834;
    --bg-card: #0F4841;
    --bg-hover: #14564D;
    --text-primary: #FFFFFF;
    --text-secondary: #A0B3B0;
    --accent-green: #26A69A;
    --accent-success: #4CAF50;
    --accent-danger: #FF5252;
    --accent-warning: #FFC107;
    --border-color: #1A5046;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #0A2F2A 0%, #14564D 100%);
    --gradient-card: linear-gradient(135deg, #0D3834 0%, #0F4841 100%);
    --gradient-accent: linear-gradient(135deg, #26A69A 0%, #1E8A7F 100%);
    --gradient-success: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.logo-section {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-section img {
    width: 140px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    border-radius: 0;
}

.logo-section h2 {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-left: 3px solid var(--accent-green);
}

.nav-item.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-left: 3px solid var(--accent-green);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: clamp(15px, 3vw, 30px);
    background: transparent;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 3vw, 30px);
    padding: clamp(15px, 2vw, 20px);
    background: var(--gradient-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    flex-wrap: wrap;
    gap: 15px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #1a1a1a;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0 10px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 12px;
    flex: 1;
    max-width: 90px;
    text-align: center;
    position: relative;
}

.bottom-nav-item i {
    font-size: 24px;
    display: block;
    transition: transform 0.2s ease;
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2px;
    display: block;
    margin-top: 2px;
}

.bottom-nav-item.active {
    color: var(--accent-green);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item:not(.active):active {
    color: #9ca3af;
    transform: scale(0.95);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: clamp(10px, 1.5vw, 12px) clamp(15px, 2vw, 20px);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-box i {
    color: var(--text-secondary);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 30px);
    flex-wrap: wrap;
}

.notification {
    position: relative;
    cursor: pointer;
}

.notification i {
    font-size: 20px;
    color: var(--text-secondary);
}

.notification .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
}

.user-profile .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile .role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-edit-widgets {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-edit-widgets:hover {
    background: var(--bg-hover);
    border-color: var(--accent-green);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(15px, 2vw, 20px);
    margin-bottom: clamp(20px, 3vw, 30px);
}

.stat-card {
    background: var(--gradient-card);
    padding: clamp(20px, 3vw, 25px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(38, 166, 154, 0.2);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.stat-filter {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
}

.period {
    font-size: 11px;
    color: var(--text-secondary);
}

.stat-value {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.stat-value .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
}

.badge.danger {
    background: rgba(255, 82, 82, 0.2);
    color: var(--accent-danger);
}

.stat-chart-mini {
    height: 60px;
    background: var(--bg-card);
    border-radius: 8px;
}

/* Chart Section */
.chart-section {
    background: var(--gradient-card);
    padding: clamp(20px, 3vw, 30px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: clamp(20px, 3vw, 30px);
    box-shadow: 0 4px 12px var(--shadow);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.chart-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.chart-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.chart-content {
    display: flex;
    gap: 30px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.chart-info {
    min-width: 200px;
    flex-shrink: 0;
}

.chart-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.change.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
}

.estimated {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 15px;
    margin-bottom: 5px;
}

.roi {
    font-size: 16px;
    font-weight: 700;
}

.roi.success {
    color: var(--accent-success);
}

canvas {
    flex: 1;
    max-height: 250px;
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
}

/* Table Section */
.table-section {
    background: var(--gradient-card);
    padding: clamp(20px, 3vw, 30px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: clamp(20px, 3vw, 30px);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.table-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.table-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-export {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: clamp(8px, 1.2vw, 10px) clamp(16px, 2vw, 20px);
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(12px, 1.2vw, 13px);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.3);
}

.btn-export:hover {
    background: var(--gradient-success);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(38, 166, 154, 0.4);
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: 15px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: var(--bg-card);
}

.data-table tbody td {
    padding: 18px 15px;
    font-size: 14px;
    color: var(--text-primary);
}

.data-table tbody td i.fa-chevron-right {
    color: var(--text-secondary);
    margin-right: 8px;
    font-size: 12px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.paid {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
}

.status-badge.ongoing {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-warning);
}

.status-badge.overdue {
    background: rgba(255, 82, 82, 0.2);
    color: var(--accent-danger);
}

.btn-icon {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 5px;
}

.btn-icon:hover {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.data-table a {
    color: var(--accent-green);
    font-size: 18px;
    transition: all 0.3s;
}

.data-table a:hover {
    color: var(--accent-success);
}

/* Additional Components */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-card-small {
    background: var(--gradient-card);
    padding: clamp(15px, 2.5vw, 20px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: clamp(10px, 2vw, 15px);
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card-small:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(38, 166, 154, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: clamp(10px, 1.5vw, 12px) clamp(20px, 2.5vw, 24px);
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(12px, 1.2vw, 13px);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-success);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(38, 166, 154, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-green);
}

.span-2 {
    grid-column: span 2;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    gap: 5px;
}

.page-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

/* Product Management */
.category-badge {
    background: rgba(38, 166, 154, 0.15);
    color: var(--accent-green);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
}

.stock-badge.low-stock {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-warning);
}

.stock-badge.out-stock {
    background: rgba(255, 82, 82, 0.2);
    color: var(--accent-danger);
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background: var(--bg-card);
    transition: all 0.3s;
}

.image-upload-area:hover {
    border-color: var(--accent-green);
    background: var(--bg-hover);
}

.upload-placeholder {
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
}

.upload-placeholder i {
    font-size: 48px;
    color: var(--accent-green);
    margin-bottom: 15px;
}

.upload-placeholder p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-placeholder span {
    font-size: 12px;
    color: var(--text-secondary);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent-danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-preview-item:hover .remove-image {
    opacity: 1;
}

/* Image Registry Styles */
.image-category-section {
    margin-bottom: 30px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.category-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.image-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.image-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.image-preview {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-info {
    padding: 15px;
}

.image-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.image-path {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.usage-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.usage-badge.used {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success);
}

.usage-badge.unused {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-warning);
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content-image {
    position: relative;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    z-index: 1;
}

.modal-content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.image-details {
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
}

/* Image URL Input */
.image-url-input {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.image-url-input input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: #E5F4E7;
    font-size: 14px;
    transition: all 0.3s ease;
}

.image-url-input input[type="text"]:focus {
    outline: none;
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.image-url-input input[type="text"]::placeholder {
    color: #A0B3B0;
}

.image-url-input .btn-primary {
    padding: 12px 20px;
    white-space: nowrap;
}

/* Image Selector */
.image-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.selectable-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.selectable-image:hover {
    border-color: var(--accent-green);
    transform: scale(1.05);
}

.selectable-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--accent-green);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.selectable-image:hover .image-check {
    display: flex;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .chart-info {
        width: 100%;
        text-align: center;
    }
    
    canvas {
        max-height: 220px;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    
    .mobile-bottom-nav {
        display: block !important;
    }

    .main-content {
        margin-left: 0;
        padding: 15px 15px 90px 15px;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 15px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
        flex-basis: 100%;
        min-width: 100%;
    }

    .user-info {
        gap: 12px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .user-profile div {
        display: none;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 800px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .btn-edit-widgets {
        width: 100%;
        justify-content: center;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .chart-filters {
        width: 100%;
        overflow-x: auto;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .table-header {
        gap: 12px;
    }
    
    .table-tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .btn-export {
        width: 100%;
        justify-content: center;
    }
    
    .filter-controls {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .main-content {
        margin-left: 0;
        padding: 10px 10px 85px 10px;
    }
    
    .mobile-bottom-nav {
        padding: 8px 0 6px 0;
    }
    
    .top-bar {
        padding: 12px;
    }
    
    .notification {
        padding: 8px;
    }
    
    .notification i {
        font-size: 18px;
    }
    
    .user-profile img {
        width: 35px;
        height: 35px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value .amount {
        font-size: 22px;
    }
    
    .stat-header h3 {
        font-size: 12px;
    }
    
    .stat-card-small {
        padding: 12px;
    }
    
    .chart-info h3 {
        font-size: 24px;
    }
    
    .chart-header h2,
    .table-header h2 {
        font-size: 16px;
    }
    
    .filter-btn,
    .tab-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px auto;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-primary,
    .btn-export {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .bottom-nav-item {
        padding: 4px 6px;
        max-width: 70px;
    }
    
    .bottom-nav-item i {
        font-size: 20px;
    }
    
    .bottom-nav-item span {
        font-size: 9px;
    }
}

@media (max-width: 400px) {
    .main-content {
        padding: 8px 8px 80px 8px;
    }
    
    .mobile-bottom-nav {
        padding: 6px 0;
    }
    
    .top-bar {
        padding: 10px;
    }
    
    .page-header h1,
    .dashboard-header h1 {
        font-size: 18px;
    }
    
    .stat-number,
    .stat-value .amount {
        font-size: 20px;
    }
    
    .chart-header h2,
    .table-header h2 {
        font-size: 15px;
    }
    
    .filter-btn,
    .tab-btn {
        padding: 5px 8px;
        font-size: 9px;
    }
    
    .notification i {
        font-size: 16px;
    }
    
    .user-profile img {
        width: 30px;
        height: 30px;
    }
}
/* Thumbnail images */
.thumb {
  width: 80px;
  height: auto;
  border: 2px solid #2e7d32;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
}