/* ===================================
   Admin Panel Styles
   =================================== */

:root {
    --admin-sidebar-width: 260px;
    --admin-header-height: 70px;
}

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

/* Sidebar */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.sidebar-logo-text h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.sidebar-logo-text p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    padding: 0 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    border-left: 4px solid var(--secondary-color);
}

.nav-item i {
    font-size: 1.2rem;
    width: 20px;
}

.nav-item span {
    flex: 1;
}

.nav-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    min-height: 100vh;
}

/* Admin Header */
.admin-header {
    height: var(--admin-header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    width: 250px;
    font-size: 0.9rem;
}

.header-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.header-notifications {
    position: relative;
    cursor: pointer;
}

.header-notifications i {
    font-size: 1.3rem;
    color: var(--text-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #F44336;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 25px;
    transition: var(--transition);
}

.header-user:hover {
    background: var(--light-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Admin Content */
.admin-content {
    padding: 30px;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.stat-icon.success {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
}

.stat-icon.info {
    background: linear-gradient(135deg, #2196F3, #42A5F5);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-change.positive {
    color: #4CAF50;
}

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

/* Data Table */
.data-table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

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

.table-header h2 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.table-actions {
    display: flex;
    gap: 10px;
}

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

.data-table thead {
    background: var(--light-color);
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

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

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.action-btn.edit {
    background: #2196F3;
    color: white;
}

.action-btn.delete {
    background: #F44336;
    color: white;
}

.action-btn.view {
    background: #4CAF50;
    color: white;
}

.action-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Status Badge */
.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #FFF3E0;
    color: #F57C00;
}

.status-badge.approved {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge.rejected {
    background: #FFEBEE;
    color: #C62828;
}

.status-badge.active {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge.inactive {
    background: #ECEFF1;
    color: #546E7A;
}

/* Forms */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

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

.file-upload {
    border: 2px dashed var(--border-color);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.file-upload i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-upload input[type="file"] {
    display: none;
}

/* Buttons */
.btn-admin {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-admin.primary {
    background: var(--primary-color);
    color: white;
}

.btn-admin.secondary {
    background: var(--secondary-color);
    color: var(--dark-color);
}

.btn-admin.success {
    background: #4CAF50;
    color: white;
}

.btn-admin.danger {
    background: #F44336;
    color: white;
}

.btn-admin.outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-admin:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.login-logo h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.login-logo p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password {
    color: var(--primary-color);
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.card-header h3 {
    color: var(--dark-color);
    font-size: 1.2rem;
}

.card-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.card-link:hover {
    text-decoration: underline;
}

/* Activity Feed */
.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.order {
    background: #E3F2FD;
    color: #1976D2;
}

.activity-icon.application {
    background: #FFF3E0;
    color: #F57C00;
}

.activity-icon.user {
    background: #E8F5E9;
    color: #388E3C;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Charts Placeholder */
.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border-radius: 8px;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

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

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 20px 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header-search {
        display: none;
    }
    
    .login-box {
        padding: 30px 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
