/* Import Fonts */
@import url('../fonts/fonts.css');

/* Cyber Invest - Admin Panel Stylesheet */

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.admin-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar .logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.25rem;
    font-weight: 700;
}

.admin-sidebar .nav-menu {
    padding: 1rem 0;
}

.admin-sidebar .nav-item {
    margin: 0.25rem 0;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #3b82f6;
}

.admin-sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-header .user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header .notification-bell {
    position: relative;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.admin-header .notification-bell:hover {
    background: #f3f4f6;
}

.admin-header .notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: #ef4444;
    color: white;
    border-radius: 9999px;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 1.25rem;
    text-align: center;
}

.admin-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-card .icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .icon.blue { background: #dbeafe; color: #1e40af; }
.stat-card .icon.green { background: #dcfce7; color: #166534; }
.stat-card .icon.yellow { background: #fef3c7; color: #92400e; }
.stat-card .icon.red { background: #fee2e2; color: #991b1b; }
.stat-card .icon.purple { background: #ede9fe; color: #7c3aed; }

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

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-card .label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.stat-card .change {
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-card .change.positive { color: #10b981; }
.stat-card .change.negative { color: #ef4444; }

/* Data Tables */
.data-table {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.data-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.data-table-header .title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.data-table-header .actions {
    display: flex;
    gap: 0.75rem;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

.admin-table .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table .status-badge.pending { background: #fef3c7; color: #92400e; }
.admin-table .status-badge.approved { background: #dcfce7; color: #166534; }
.admin-table .status-badge.rejected { background: #fee2e2; color: #991b1b; }
.admin-table .status-badge.completed { background: #dbeafe; color: #1e40af; }
.admin-table .status-badge.active { background: #dcfce7; color: #166534; }
.admin-table .status-badge.suspended { background: #fee2e2; color: #991b1b; }
.admin-table .status-badge.open { background: #dbeafe; color: #1e40af; }
.admin-table .status-badge.answered { background: #fef3c7; color: #92400e; }
.admin-table .status-badge.closed { background: #f3f4f6; color: #374151; }

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.action-btn i {
    margin-right: 0.375rem;
}

.action-btn.primary {
    background: #3b82f6;
    color: white;
}

.action-btn.primary:hover {
    background: #2563eb;
}

.action-btn.success {
    background: #10b981;
    color: white;
}

.action-btn.success:hover {
    background: #059669;
}

.action-btn.danger {
    background: #ef4444;
    color: white;
}

.action-btn.danger:hover {
    background: #dc2626;
}

.action-btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.action-btn.secondary:hover {
    background: #e5e7eb;
}

/* Forms */
.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-form .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-form .section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form .form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.admin-form .form-input,
.admin-form .form-select,
.admin-form .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.admin-form .form-input:focus,
.admin-form .form-select:focus,
.admin-form .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-form .form-textarea {
    resize: vertical;
    min-height: 100px;
}

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

.admin-modal.show {
    display: flex;
}

.admin-modal .modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-modal .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal .modal-body {
    padding: 1.5rem;
}

.admin-modal .modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Charts */
.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.chart-container .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-container .chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

/* Bulk Actions */
.bulk-actions {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: none;
}

.bulk-actions.show {
    display: block;
}

/* Search and Filters */
.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.search-filters .filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.search-filters .filter-group {
    flex: 1;
    min-width: 200px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    background: white;
    color: #374151;
    text-decoration: none;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
}

.pagination .page-link:hover,
.pagination .page-link.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }

    .admin-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

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

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .search-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .admin-layout {
        background: #111827;
    }

    .admin-sidebar {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .stat-card,
    .data-table,
    .admin-form,
    .chart-container,
    .search-filters {
        background: #1f2937;
        color: #f9fafb;
    }

    .admin-table th {
        background: #374151;
        color: #f9fafb;
    }

    .admin-table tbody tr:hover {
        background: #374151;
    }

    .admin-header {
        background: #1f2937;
        border-color: #374151;
    }
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .action-btn,
    .pagination {
        display: none !important;
    }

    .admin-content {
        margin-left: 0;
    }

    .stat-card,
    .data-table,
    .admin-form {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}