/* WhatsApp Offers System - CSS Principal */

:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #86efac;
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-light: #666666;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.logo-section p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== FORMS ===== */
.login-form {
    display: block;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-color);
}

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

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

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

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* ===== SIDEBAR MENU ===== */
.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.card-body {
    padding: 15px 0;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-card .label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table thead {
    background-color: var(--border-color);
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(34, 197, 94, 0.05);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: var(--primary-dark);
}

.badge-warning {
    background-color: rgba(234, 179, 8, 0.2);
    color: #92400e;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background-color: rgba(234, 179, 8, 0.1);
    border-color: #eab308;
    color: #92400e;
}

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

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

.modal-content {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 15px;
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}
