/* Common styles shared across all pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-text {
    display: flex;
    flex-direction: column;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

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

.user-info {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Button styles */
.btn,
.user-management-btn,
.advanced-btn,
.change-password-btn,
.logout-btn,
.back-to-robots-btn {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.user-management-btn {
    background-color: #9b59b6;
    color: white;
}

.user-management-btn:hover {
    background-color: #8e44ad;
}

.advanced-btn {
    background-color: #e67e22;
    color: white;
}

.advanced-btn:hover {
    background-color: #d35400;
}

.change-password-btn {
    background-color: #3498db;
    color: white;
}

.change-password-btn:hover {
    background-color: #2980b9;
}

.back-to-robots-btn {
    background-color: #95a5a6;
    color: white;
}

.back-to-robots-btn:hover {
    background-color: #7f8c8d;
}

.logout-btn {
    background-color: #2c3e50;
    color: white;
}

.logout-btn:hover {
    background-color: #1a252f;
}

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

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-danger:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal-content p {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.modal-content p.warning {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Form styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    color: #34495e;
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input {
    padding: 12px 14px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #95a5a6;
}

/* Message styles */
.form-message {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
    margin: 10px 0;
}

.form-message.success,
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error,
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.empty-state h2 {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.empty-state p {
    color: #95a5a6;
    font-size: 1.1em;
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        text-align: center;
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}