/* Admin Dashboard specific styles */

/* Navigation link fix for admin pages */
.nav-links li a {
    white-space: nowrap;
}

body {
    overflow-x: hidden;
}

.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    overflow-x: hidden;
}

/* Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-light);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 20px 0;
}

.stat-actions {
    display: flex;
    gap: 12px;
}

/* Recent Submissions Section */
.recent-submissions {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.recent-submissions h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 24px 0;
}

.view-all-forms {
    text-align: center;
    margin-top: 24px;
}

/* Status labels */
.status-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-label.viewed {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.status-label.unread {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

.status-label.in-stock {
    background-color: #d4edda;
    color: #155724;
}

.status-label.low-stock {
    background-color: #fff3cd;
    color: #856404;
}

.status-label.out-of-stock {
    background-color: #f8d7da;
    color: #721c24;
}

.no-category {
    color: #6c757d;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stat-actions {
        flex-direction: column;
    }
    
    .button-primary, 
    .button-outline {
        width: 100%;
        text-align: center;
    }
}

/* Product List Styles */
.products-management {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.filter-form {
    display: flex;
    gap: 10px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.table {
    min-width: 100%;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table td, .table th {
    border-bottom: 0 !important;
}

.table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.product-image img {
    border-radius: 4px;
    object-fit: cover;
}

.editable {
    position: relative;
}

.edit-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: inherit;
}

.actions {
    display: flex;
    gap: 4px;
    min-height: 80px;
    align-items: center;
}

.button-outline {
    padding: 6px 12px;
    border: 1px solid #007bff;
    border-radius: 4px;
    color: #007bff;
    background: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.button-outline:hover {
    background-color: #007bff;
    color: white;
}

.button-primary {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.button-primary:hover {
    background-color: #0056b3;
}

.button-danger {
    padding: 6px 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    color: #dc3545;
    background: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.button-danger:hover {
    background-color: #dc3545;
    color: white;
}

/* Full width container */
.full-width {
    max-width: none !important;
    margin: 0 !important;
    padding: 20px !important;
}

/* Category tags */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 200px;
}

.category-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100px;
}

.category-tag:hover {
    background-color: #dee2e6;
}

td.categories {
    max-width: 200px;
}

/* Search Box Styles */
.search-box {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-button {
    padding: 10px 15px;
    min-width: 100px;
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-button {
        width: 100%;
    }
}

/* Icon Button Styles */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.icon-button:hover {
    background-color: #f8f9fa;
}

.icon-button.view {
    color: #007bff;
    border-color: #007bff;
}

.icon-button.view:hover {
    background-color: #007bff;
    color: white;
}

.icon-button.edit {
    color: #28a745;
    border-color: #28a745;
}

.icon-button.edit:hover {
    background-color: #28a745;
    color: white;
}

.icon-button.delete {
    color: #dc3545;
    border-color: #dc3545;
}

.icon-button.delete:hover {
    background-color: #dc3545;
    color: white;
}

.icon-button.analytics {
    color: #6610f2;
    border-color: #6610f2;
}

.icon-button.analytics:hover {
    background-color: #6610f2;
    color: white;
}

.icon-button.filter {
    color: #6610f2;
    border-color: #6610f2;
    width: auto;
    padding: 0 12px;
    font-weight: 400;
}

.icon-button.filter:hover {
    background-color: #6610f2;
    color: white;
}

.actions {
    display: flex;
    gap: 4px;
}