/* Make CMS - Main Stylesheet */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu-actions {
    display: flex;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-username {
    font-size: 0.85rem;
    opacity: 0.8;
}

.change-password-btn,
.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.change-password-btn:hover,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.main-footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

/* ===== FORMS ===== */
.login-form,
form {
    margin-top: 1.5rem;
}

.form-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-group {
    margin-bottom: 1.5rem;
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: #c53030;
}

.form-control.error:focus {
    border-color: #c53030;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 3rem;
    appearance: none;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-info {
    background-color: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e8ed;
}

.card-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.card-body {
    padding: 2rem;
}

.card-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.card-body li {
    margin-bottom: 0.5rem;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid #e1e8ed;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== DASHBOARD ===== */
.dashboard-page,
.webhooks-page,
.channels-page,
.change-password-page {
    padding: 1rem 0;
}

.dashboard-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.widget.full-width {
    grid-column: 1 / -1;
}

.widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* ===== STATUS GRID ===== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.status-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

.status-item h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .user-menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .user-menu-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .change-password-btn,
    .logout-btn {
        text-align: center;
        width: 100%;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .form-inline {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
