:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #EC4899;
    --accent: #8B5CF6;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --background: #F3F4F6;
    --surface: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Space for bottom nav */
}

.app-container {
    max-width: 480px; /* Simulate mobile width */
    margin: 0 auto;
    background-color: var(--background);
    min-height: 100vh;
    position: relative;
}

/* Header */
.header {
    background: var(--surface);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Typography & Utils */
h1, h2, h3 {
    color: var(--text-main);
    font-weight: 700;
}

h2 { font-size: 1.25rem; margin-bottom: 16px; }
h3 { font-size: 1rem; margin-bottom: 8px; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 600; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

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

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
}

.input, .textarea, .select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    background: var(--surface);
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--primary);
    ring: 2px solid rgba(99, 102, 241, 0.1);
}

/* Platform Toggles */
.platform-select {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.platform-option {
    flex: 1;
    position: relative;
}

.platform-option input {
    position: absolute;
    opacity: 0;
}

.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
    height: 80px;
}

.platform-option input:checked + .platform-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.platform-icon {
    width: 24px;
    height: 24px;
    background-color: currentColor;
    margin-bottom: 8px;
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
}

.icon-whatsapp { background-color: #25D366; }
.icon-facebook { background-color: #1877F2; }
.icon-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* Lists */
.list-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.list-item {
    background: var(--surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-content {
    flex: 1;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-sent { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-scheduled { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0; /* Reset left to 0 for fixed positioning relative to viewport */
    right: 0; /* Reset right to 0 */
    width: 100%; /* Ensure full width */
    max-width: 480px; /* Match app container */
    margin: 0 auto; /* Center it if viewport > 480px */
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 1000;
    /* To handle the centering correctly when parent is centered */
    left: 50%;
    transform: translateX(-50%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    gap: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    background-color: #E5E7EB; /* Placeholder color */
    border-radius: 4px;
}

.nav-item.active .nav-icon {
    background-color: var(--primary);
}

/* Placeholders */
.placeholder-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: currentColor;
    opacity: 0.5;
    border-radius: 2px;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #E0E7FF;
    color: var(--primary-dark);
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    text-decoration: none;
    font-size: 24px;
    z-index: 900;
    /* Fix for centering wrapper */
    margin-left: calc(480px - 76px); 
}
@media (max-width: 480px) {
    .fab {
        margin-left: auto;
        right: 20px;
        left: auto;
    }
}

/* Calendar Styles */
.calendar-strip {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 0 16px 0;
    margin-bottom: 16px;
}

.date-card {
    min-width: 60px;
    height: 70px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-card.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.day-name {
    font-size: 0.75rem;
    opacity: 0.8;
}

.day-num {
    font-size: 1.1rem;
    font-weight: 700;
}

.time-slot {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.time-col {
    width: 50px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 16px;
}

.content-col {
    flex: 1;
}

.schedule-card {
    background: var(--surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}
