/* Admin Panel Styles */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff5722;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #9e9e9e;
    --white: #ffffff;
    --danger: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
    --info: #2196f3;
}

/* Login Page */
.admin-login-body {
    background-color: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.admin-login-container {
    width: 100%;
    max-width: 450px;
}

.admin-login-card {
    padding: 40px;
    text-align: center;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

.admin-login-logo {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.admin-login-logo img {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.admin-login-logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.admin-login-logo p {
    font-size: 16px;
    color: var(--dark-gray);
}

.admin-login-form {
    text-align: left;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
}

.admin-login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.admin-login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.admin-login-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px 0;
    margin-top: 10px;
    font-size: 16px;
}

.admin-login-footer {
    margin-top: 30px;
    font-size: 14px;
    color: var(--dark-gray);
}

.admin-login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Dashboard Layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--light-gray);
    font-family: 'Space Grotesk', sans-serif;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--white);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--medium-gray);
}

.sidebar-header img {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.sidebar-header p {
    font-size: 14px;
    color: var(--dark-gray);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 15px;
}

.nav-section-title {
    padding: 10px 25px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--dark-gray);
    font-weight: 600;
}

.nav-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(63, 81, 181, 0.05);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--medium-gray);
    font-size: 12px;
    color: var(--dark-gray);
    text-align: center;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
    transition: all 0.3s ease;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.admin-header h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.admin-user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.user-info:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-name {
    margin-right: 5px;
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.admin-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 18px;
    margin: 0;
    color: var(--primary-color);
}

.card-tools {
    display: flex;
    gap: 10px;
}

.btn-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background-color: var(--light-gray);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-tool:hover {
    background-color: var(--medium-gray);
}

/* Data Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.admin-table th {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.05);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: rgba(63, 81, 181, 0.02);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.btn-edit {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.btn-delete {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.btn-view:hover {
    background-color: var(--info);
    color: var(--white);
}

.btn-edit:hover {
    background-color: var(--warning);
    color: var(--white);
}

.btn-delete:hover {
    background-color: var(--danger);
    color: var(--white);
}

/* Forms */
.admin-form {
    max-width: 800px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-col {
    padding: 0 10px;
    margin-bottom: 20px;
}

.form-col-full {
    width: 100%;
}

.form-col-half {
    width: 50%;
}

@media (max-width: 768px) {
    .form-col-half {
        width: 100%;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
}

.stat-icon.primary {
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.stat-icon.danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--dark-gray);
}

/* Image Preview */
.image-preview {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
    background-color: var(--light-gray);
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--dark-gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #303f9f;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #e64a19;
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: #388e3c;
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-light {
    background-color: var(--light-gray);
    color: var(--text-color);
}

.btn-light:hover {
    background-color: var(--medium-gray);
}

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 240px;
    }
    
    .admin-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        width: 240px;
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-header {
        position: relative;
    }
    
    .sidebar-toggle {
        display: block;
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        font-size: 24px;
        color: var(--primary-color);
        cursor: pointer;
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.alert-info {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    margin: 0 5px;
    border-radius: 8px;
    background-color: var(--white);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-item:hover {
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
}

.pagination-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 100%;
    max-width: 600px;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    z-index: 1060;
    opacity: 0;
    transition: all 0.3s ease;
    display: none;
}

.modal-dialog.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* File Upload */
.file-upload {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.file-upload input[type="file"] {
    position: absolute;
    font-size: 100px;
    opacity: 0;
    right: 0;
    top: 0;
    cursor: pointer;
}

.file-upload-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--light-gray);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background-color: var(--medium-gray);
}

.file-upload-label i {
    margin-right: 8px;
}

.file-name {
    margin-top: 8px;
    font-size: 14px;
    color: var(--dark-gray);
}

/* New CSS styles for improved admin panel */

/* Table responsiveness */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

/* Search and filter container */
.search-filter-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.search-filter-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
}

.search-filter-form .form-col {
    flex: 1;
    padding: 5px;
    min-width: 200px;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    background-color: var(--danger);
    color: white;
}

/* File upload */
.file-upload {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-upload-label:hover {
    background-color: #303f9f;
}

.file-name {
    margin-left: 10px;
    font-size: 14px;
}

.text-muted {
    color: var(--dark-gray);
    font-size: 13px;
}

/* Checkbox styling */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Required field marker */
.required {
    color: var(--danger);
}

/* Datalist input styling */
datalist {
    display: none;
}

/* Sidebar collapsed state */
.sidebar-collapsed .admin-sidebar {
    width: 70px;
    overflow: visible;
}

.sidebar-collapsed .sidebar-header h2,
.sidebar-collapsed .sidebar-header p,
.sidebar-collapsed .nav-section-title,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .nav-footer {
    display: none;
}

.sidebar-collapsed .admin-content {
    margin-left: 70px;
}

.sidebar-collapsed .nav-link {
    padding: 12px;
    text-align: center;
}

.sidebar-collapsed .nav-link i {
    margin-right: 0;
    font-size: 18px;
}

/* Smooth transition for alerts */
.alert {
    transition: opacity 0.5s ease;
}

/* Animation for delete confirmation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    animation: fadeIn 0.3s;
}

/* Tooltip styles */
[title] {
    position: relative;
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mobile responsiveness improvements */
@media (max-width: 576px) {
    .admin-header h1 {
        font-size: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-tools {
        margin-top: 10px;
        width: 100%;
    }
    
    .card-tools .btn {
        width: 100%;
        text-align: center;
    }
    
    .admin-table th, 
    .admin-table td {
        padding: 8px;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
    }
    
    .action-buttons .btn {
        margin-bottom: 5px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
} 