/* =====================================================
   SMS Go SaaS - Main Stylesheet
   ===================================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1e293b;
}

/* =====================================================
   Header & Navigation
   ===================================================== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Header metrics styling */
.header-metrics {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.metric-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.funds-box {
    /* Color will be set dynamically via style attribute */
}

.members-box {
    color: #ffffff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-metrics {
        order: 2;
        gap: 0.5rem;
    }
    
    .user-menu {
        order: 3;
    }
}

/* =====================================================
   Layout & Containers
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* =====================================================
   Forms
   ===================================================== */
.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* =====================================================
   Flash Messages
   ===================================================== */
.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.flash-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Dashboard Specific
   ===================================================== */
.welcome {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #64748b;
    margin-top: 0.5rem;
}

.actions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.actions h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1e293b;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* =====================================================
   Event Creation Specific
   ===================================================== */
.breadcrumb {
    margin-bottom: 1rem;
    color: #64748b;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-box h4 {
    margin: 0 0 0.5rem 0;
    color: #1e40af;
}

.info-box p {
    margin: 0;
    color: #1e40af;
    font-size: 0.9rem;
}

.threshold-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.threshold-number {
    font-size: 2rem;
    font-weight: bold;
}

.threshold-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.preview-section {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.message-preview {
    background: #1e293b;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-line;
}

.expandable {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.expandable-header {
    background: #f8fafc;
    padding: 1rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expandable-content {
    padding: 1rem;
    display: none;
}

.expandable.expanded .expandable-content {
    display: block;
}

.expandable.expanded .expandable-header {
    border-radius: 8px 8px 0 0;
}

/* =====================================================
   Authentication Pages
   ===================================================== */
.auth-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    margin: 0;
    color: #1e293b;
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .auth-form {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* =====================================================
   Utilities
   ===================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

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


/* Enhanced Quick Actions Styling - Add this to dashboard.html in a <style> tag or to main.css */

.actions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.actions h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.25rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: #4a5568;
    background: #f8fafc;
    border: 2px solid #22c55e;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    transition: left 0.3s ease;
    z-index: 1;
}

.action-btn:hover::before {
    left: 0;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
    color: white;
    border-color: #16a34a;
}

.action-icon,
.action-label {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.action-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 1rem 0.5rem;
        min-height: 80px;
    }
    
    .action-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .action-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 1rem;
        min-height: 60px;
        text-align: left;
    }
    
    .action-icon {
        font-size: 1.25rem;
        margin-bottom: 0;
        margin-right: 0.75rem;
    }
    
    .action-label {
        font-size: 0.875rem;
    }
}

/* Alternative: If you prefer larger screens to still use horizontal layout */
@media (min-width: 1200px) {
    .action-buttons {
        grid-template-columns: repeat(5, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }
}
