/* ========================================
   Admin Panel Styles
   ======================================== */

/* ========================================
   Base Admin Styles
   ======================================== */
body.login-page {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9148 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

/* ========================================
   Login Page
   ======================================== */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 3rem 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 4rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.input-with-icon .form-control {
    padding-left: 2.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.default-creds {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ========================================
   Admin Sidebar
   ======================================== */
.admin-sidebar {
    width: 260px;
    background: #212529;
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #343a40;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    color: #ff6b35;
    margin: 0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #adb5bd;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: #343a40;
    color: #fff;
}

.nav-item.active {
    background: #ff6b35;
    color: #fff;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: #343a40;
    margin: 1rem 0;
}

/* ========================================
   Admin Main Content
   ======================================== */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.admin-user i {
    font-size: 1.5rem;
    color: #ff6b35;
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

.admin-footer {
    background: #fff;
    padding: 1rem 2rem;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
}

/* ========================================
   Dashboard
   ======================================== */
.dashboard-grid {
    display: grid;
    gap: 2rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
}

.stat-icon.blue {
    background: #007bff;
}

.stat-icon.orange {
    background: #fd7e14;
}

.stat-icon.green {
    background: #ff6b35;
}

.stat-icon.purple {
    background: #6f42c1;
}

.stat-details h3 {
    font-size: 2rem;
    margin: 0;
    color: #333;
}

.stat-details p {
    margin: 0;
    color: #666;
}

.dashboard-section {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    margin: 0;
    color: #333;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-action-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-action-card:hover {
    border-color: #ff6b35;
    background: #fff;
    transform: translateY(-5px);
}

.quick-action-card i {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

.quick-action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.quick-action-card p {
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   Tables
   ======================================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active,
.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-pending,
.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-inactive,
.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* ========================================
   Forms
   ======================================== */
.form-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.admin-form .col-md-4 {
    grid-column: span 1;
}

.admin-form .col-md-6 {
    grid-column: span 1;
}

.admin-form .col-md-8 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* ========================================
   Order Details
   ======================================== */
.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.order-info-box,
.customer-info-box,
.order-items-box,
.order-status-box {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row .label {
    font-weight: 600;
    color: #666;
}

.info-row .value {
    color: #333;
}

/* ========================================
   Settings Page
   ======================================== */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.settings-section h3 {
    color: #ff6b35;
    margin-bottom: 1rem;
}

.help-text {
    color: #666;
    margin-bottom: 1rem;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 5px;
}

.info-box h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

.info-box ul {
    margin-left: 1.5rem;
}

.info-box code {
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    color: #dc3545;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    margin: 0;
    color: #333;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
