/* Admin Panel Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box h1 i {
    color: #667eea;
    margin-right: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group label i {
    color: #667eea;
    margin-right: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.admin-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo h2 {
    color: #667eea;
    font-size: 1.2rem;
}

.admin-nav ul {
    list-style: none;
    padding: 20px 0;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left: 4px solid #667eea;
}

.admin-nav i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    background: #f8f9fa;
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Content Area */
.admin-content main {
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    color: #333;
    font-weight: 600;
}

.content-header h1 i {
    color: #667eea;
    margin-right: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.thumbnail-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.no-thumbnail {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.actions {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms */
.product-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.form-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-section h3 i {
    color: #667eea;
    margin-right: 10px;
}

/* Image Upload */
.image-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-upload-item {
    text-align: center;
}

.image-upload-item label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
}

.image-upload-item input[type="file"] {
    display: none;
}

.image-upload-item .image-preview {
    width: 200px;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s;
    overflow: hidden;
}

.image-upload-item .image-preview:hover {
    border-color: #667eea;
}

.image-upload-item .image-preview i {
    font-size: 2rem;
    color: #999;
    margin-bottom: 10px;
}

.image-upload-item .image-preview span {
    color: #666;
    font-size: 0.9rem;
}

.image-upload-item .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Current Images */
.current-images {
    margin-bottom: 30px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-item {
    position: relative;
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.delete-checkbox {
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.delete-checkbox input {
    margin-right: 5px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.alert li {
    margin-bottom: 5px;
}

/* Responsive Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        position: static;
        height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-nav ul {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .admin-nav li {
        margin: 5px;
    }
    
    .admin-nav a {
        padding: 10px 15px;
        border-radius: 6px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .image-upload-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .admin-content main {
        padding: 20px 15px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}