:root {
    --bg-dark: #121212;
    --sidebar-bg: #1e1e1e;
    --card-bg: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --accent: #25d366;
    /* WhatsApp Green */
    --accent-hover: #128c7e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid #333;
}

.status-paid {
    opacity: 0.6;
    background: rgba(46, 125, 50, 0.1);
}

.status-cancelled {
    opacity: 0.4;
    background: rgba(158, 158, 158, 0.1);
    text-decoration: line-through;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #2e7d32;
    color: white;
}

.badge-warning {
    background: #fbc02d;
    color: #333;
}

.badge-info {
    background: #0288d1;
    color: white;
}

.badge-danger {
    background: #d32f2f;
    color: white;
}

.badge-secondary {
    background: #757575;
    color: white;
}

.badge-orange {
    background: #ff9800;
    color: white;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.nav-btn:hover,
.nav-btn.active {
    background-color: rgba(37, 211, 102, 0.1);
    color: var(--accent);
}

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    margin-bottom: 32px;
}

header h2 {
    font-size: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.status-off {
    color: var(--danger);
}

.status-on {
    color: var(--accent);
}

.status-warning {
    color: #fbc02d;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-secondary {
    background-color: #444;
    color: white;
}

/* Tables */
.table-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #444;
}

th {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: 16px;
    width: 400px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 12px 0;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
}

.input-gsheet {
    padding: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    width: 300px;
    margin-right: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}