/* Custom styles */

/* Modern Admin Dashboard Styles */
.admin-dashboard-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Header Styles */
.admin-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: auto;
}

.admin-header .sidebar-toggle {
    color: #6c757d;
    border: none;
    font-size: 1.2rem;
    padding: 0.25rem;
}

.admin-header .sidebar-toggle:hover {
    color: #495057;
}

.welcome-section h5 {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.header-actions {
    gap: 0.75rem;
}

.search-box .form-control {
    border-radius: 20px 0 0 20px;
    border-right: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    width: 200px;
}

.search-box .btn {
    border-radius: 0 20px 20px 0;
    border-left: none;
    padding: 0.375rem 0.75rem;
}

.header-actions .btn-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.header-actions .btn-link:hover {
    color: #495057;
    background: #f8f9fa;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: calc(100vh - 76px);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: white;
    margin: 0;
    font-weight: 600;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link span {
    font-weight: 500;
}

/* Mobile Sidebar */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 57px; /* Adjusted for compact header */
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Main Content Styles */
.main-content {
    padding: 2rem 0;
}

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.page-title {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.date-display {
    color: #4a5568;
    font-weight: 500;
}

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.kpi-card.primary .kpi-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kpi-card.success .kpi-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.kpi-card.info .kpi-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.kpi-card.warning .kpi-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.kpi-label {
    color: #718096;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kpi-trend {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.kpi-trend i {
    margin-right: 0.25rem;
}

.kpi-trend.positive {
    color: #38a169;
}

.kpi-trend.negative {
    color: #e53e3e;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
    overflow: hidden;
}

.chart-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.chart-card .card-title {
    color: #2d3748;
    font-weight: 600;
}

.chart-card .card-body {
    padding: 1.5rem;
}

/* Activity Cards */
.activity-card, .quick-actions-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
    height: 100%;
}

.activity-card .card-header, .quick-actions-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.activity-card .card-title, .quick-actions-card .card-title {
    color: #2d3748;
    font-weight: 600;
}

.activity-card .card-body, .quick-actions-card .card-body {
    padding: 1.5rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-icon.success {
    background: #d4edda;
    color: #155724;
}

.activity-icon.info {
    background: #d1ecf1;
    color: #0c5460;
}

.activity-icon.warning {
    background: #fff3cd;
    color: #856404;
}

.activity-icon.primary {
    background: #cce5ff;
    color: #004085;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #718096;
    font-size: 0.875rem;
}

/* Quick Actions */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100px;
    text-align: center;
}

.action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-btn span {
    font-weight: 600;
    font-size: 0.875rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.action-btn.success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

.action-btn.info {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.action-btn.info:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.4);
}

.action-btn.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.action-btn.warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

/* Footer */
.admin-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    margin-left: 1rem;
}

.footer-links a:hover {
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kpi-card {
        margin-bottom: 1rem;
    }

    .page-header {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .header-actions {
        margin-top: 1rem;
    }

    .search-box {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Legacy styles for backward compatibility */
.admin-dashboard .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-dashboard .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.admin-dashboard .card-body h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.admin-dashboard .card-body h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

.admin-dashboard .quick-actions {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 20px;
    color: white;
}

.admin-dashboard .quick-actions .btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    margin-bottom: 10px;
}

.admin-dashboard .quick-actions .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-dashboard .quick-actions .btn-primary {
    background: #4facfe;
}

.admin-dashboard .quick-actions .btn-success {
    background: #43e97b;
}

.admin-dashboard .quick-actions .btn-info {
    background: #38f9d7;
}

.admin-dashboard .quick-actions .btn-warning {
    background: #fa709a;
}

/* Modern Table Styles */
.admin-table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-table tbody tr {
    transition: background-color 0.3s ease;
}

.admin-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.admin-table .btn {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.admin-table .btn:hover {
    transform: scale(1.1);
}

/* General Modern Touches */
.container {
    max-width: 1200px;
}

h2 {
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.btn-modern {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Search Dropdown Styles */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid #e9ecef;
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow: hidden;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.search-results-header .btn-close {
    font-size: 0.75rem;
    opacity: 0.6;
}

.search-results-header .btn-close:hover {
    opacity: 1;
}

.search-results-body {
    max-height: 350px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
    color: #212529;
    text-decoration: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}

.search-result-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-result-icon.success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.search-result-icon.info {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.search-result-icon.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Search box focus styles */
.search-box input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

/* Mobile search adjustments */
@media (max-width: 768px) {
    .search-results-dropdown {
        left: -1rem;
        right: -1rem;
        max-height: 300px;
    }

    .search-box {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Compact header mobile adjustments */
    .admin-header {
        padding: 0.5rem 0;
    }

    .welcome-section h5 {
        font-size: 0.9rem;
    }

    .search-box .form-control {
        width: 150px;
        font-size: 0.8rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .header-actions .btn-link {
        padding: 0.25rem;
        font-size: 0.9rem;
    }
}

/* Uniform Image Heights */
.uniform-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}