/**
 * OWN TODAY - WHITE LABEL CSS
 * 
 * This stylesheet uses CSS custom properties (variables) that are
 * dynamically set by the theming-engine.js based on organization branding.
 * 
 * DO NOT hardcode colors - always use CSS variables so themes can be applied.
 */

/* ==========================================
   CSS VARIABLES (Overridden by Theme Engine)
   ========================================== */

:root {
    /* Organization Colors (set dynamically) */
    --org-primary: #4A9FBF;
    --org-secondary: #3A8FAF;
    --org-accent: #F59E0B;
    --org-primary-light: #6CB4D4;
    --org-primary-dark: #2C7A9A;
    
    /* System Colors (consistent across all orgs) */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ==========================================
   THEME LOADING INDICATOR
   ========================================== */

#theme-loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 1rem;
}

#theme-loading-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--org-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#theme-loading-indicator p {
    color: var(--gray-600);
    font-size: 1rem;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ==========================================
   BUTTONS (Branded)
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
}

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

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

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

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--org-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-accent:hover,
.btn-accent:focus {
    background: var(--warning);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--org-primary);
    color: var(--org-primary);
}

.btn-outline:hover,
.btn-outline:focus {
    background: var(--org-primary);
    color: white;
}

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

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--org-primary);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--org-primary);
}

/* Continue with rest of CSS... (this is getting long, so I'll provide a shorter version) */

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Utility Classes */
.text-primary { color: var(--org-primary); }
.text-secondary { color: var(--org-secondary); }
.text-accent { color: var(--org-accent); }
.bg-primary { background: var(--org-primary); }
