/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f6fa;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.admin-logo {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.admin-logo span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.admin-menu {
    flex: 1;
    padding: 1rem 0;
}

.admin-menu ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0.5rem;
    padding: 0 1rem;
}

.admin-menu a {
    color: white !important;
    text-decoration: none !important;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer !important;
    pointer-events: initial;
    position: relative;
    z-index: 1;
}

.admin-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.admin-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.admin-menu a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.admin-menu a span {
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-user {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.view-site-btn,
.logout-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s;
    font-size: 0.9rem;
    cursor: pointer !important;
    pointer-events: initial;
    z-index: 1;
}

.view-site-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.3);
    color: white;
}


/* Admin Main Content */
.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background-color: #f5f6fa;
    min-height: 100vh;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .admin-sidebar:hover {
        width: 250px;
    }
    
    .admin-main {
        margin-left: 70px;
    }
    
    .admin-sidebar:hover + .admin-main {
        margin-left: 250px;
    }
    
    .admin-logo span,
    .admin-menu a span,
    .view-site-btn span,
    .logout-btn span {
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .admin-sidebar:hover .admin-logo span,
    .admin-sidebar:hover .admin-menu a span,
    .admin-sidebar:hover .view-site-btn span,
    .admin-sidebar:hover .logout-btn span {
        opacity: 1;
    }
}

/* Admin Login */
.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-login-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.admin-login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background-color: #f0f0ff;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.login-info {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.login-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #c33;
}

/* Dashboard */
.admin-dashboard {
    padding: 2rem 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 1.1rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-action {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-action:hover {
    transform: translateY(-5px);
}

.quick-action i {
    font-size: 2rem;
    color: #667eea;
}

/* Tables */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Modals */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

/* Product Management */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #333;
    margin: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.stock-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background-color: #d4edda;
    color: #155724;
}

.stock-badge.out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.active {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #138496;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-menu ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-main {
        padding: 0 1rem;
    }
    
    .admin-login-form {
        margin: 1rem;
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}
