/* Main stylesheet for PrestaShop SEO Booster Dashboard */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #4caf50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    display: flex;
    height: calc(100vh - 60px);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    color: white;
    padding: 0 20px;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 18px;
    font-weight: 500;
}

.sidebar {
    width: 250px;
    background-color: #34495e;
    color: white;
    padding: 20px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Navigation */
.main-nav ul {
    list-style: none;
}

.main-nav a {
    display: block;
    padding: 10px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.2s;
}

.main-nav a:hover {
    background-color: #2c3e50;
    text-decoration: none;
}

.main-nav a.active {
    background-color: #4caf50;
    color: white;
}

.main-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    font-size: 12px;
    color: #bdc3c7;
    border-top: 1px solid #2c3e50;
    margin-top: 20px;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #43a047;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

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

.btn-danger:hover {
    background-color: #e53935;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 500;
}

/* Notification bell */
.notification-bell {
    position: relative;
    margin-left: 20px;
    cursor: pointer;
}

.notification-bell i {
    font-size: 18px;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: 30px;
    right: -10px;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.notification-header h3 {
    font-size: 16px;
    margin: 0;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f9f9f9;
}

.notification-item.unread {
    background-color: #e8f5e9;
}

.notification-item .notification-time {
    font-size: 12px;
    color: #757575;
}

.notification-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

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

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f5f7fa;
    font-weight: 500;
}

table tr:hover {
    background-color: #f9f9f9;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge.inactive {
    background-color: #eeeeee;
    color: #757575;
}

.status-badge.error {
    background-color: #ffebee;
    color: #c62828;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #757575;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-error {
    color: #e53935;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    min-width: 250px;
    max-width: 350px;
    animation: slideIn 0.3s, fadeOut 0.5s 2.5s forwards;
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

.toast-icon {
    margin-right: 10px;
}

.toast-message {
    flex: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Dashboard specific styles */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.stat-icon.total-shops {
    background-color: #e3f2fd;
    color: #1976d2;
}

.stat-icon.active-shops {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stat-icon.error-shops {
    background-color: #ffebee;
    color: #c62828;
}

.stat-icon.events {
    background-color: #fff8e1;
    color: #f57f17;
}

.stat-content h3 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #757575;
}

.stat-value {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .dashboard-sections {
        grid-template-columns: 2fr 1fr;
    }
}

.section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.events-list {
    max-height: 400px;
    overflow-y: auto;
}

.event-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.event-icon {
    margin-right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.event-content {
    flex: 1;
}

.event-description {
    margin: 0;
}

.event-time {
    font-size: 12px;
    color: #757575;
    margin: 0;
}

.note-card {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.note-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.note-card p {
    margin: 0 0 10px 0;
}

.note-card code {
    display: block;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-family: monospace;
    overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .main-nav a {
        padding: 8px 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .header-actions {
        margin-top: 10px;
    }
}
