/* Tailwind CSS CDN will be loaded in HTML */
/* Custom Mobile App Styles */

:root {
    /* Logo/Brand Colors - Primary Palette */
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #3385FF;
    --primary-bg: rgba(0, 102, 255, 0.1);
    
    /* Logo/Brand Colors - Secondary Palette */
    --secondary: #00C896;
    --secondary-dark: #00A67A;
    --secondary-light: #33D3AA;
    --secondary-bg: rgba(0, 200, 150, 0.1);
    
    /* Accent Colors */
    --accent: #FF6B35;
    --accent-light: #FF8C66;
    --accent-bg: rgba(255, 107, 53, 0.1);
    
    /* Status Colors */
    --success: #00C896;
    --danger: #FF4444;
    --warning: #FFB020;
    --info: #0066FF;
    
    /* Text Colors */
    --text-dark: #1A1F36;
    --text-medium: #4A5568;
    --text-light: #718096;
    --text-lighter: #A0AEC0;
    
    /* Background Colors - Light Mode (Default) */
    --bg-light: #FFFFFF;
    --bg-card-light: #F7F9FC;
    --bg-hover-light: #EDF2F7;
    --border-light: #E2E8F0;
    --border-light-strong: #CBD5E0;
    
    /* Background Colors - Dark Mode */
    --bg-dark: #0F1419;
    --bg-card-dark: #1A202C;
    --bg-hover-dark: #2D3748;
    --border-dark: rgba(255, 255, 255, 0.1);
    --border-dark-strong: rgba(255, 255, 255, 0.2);
}

/* Default Light Mode */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    /* Subtle gradient background using logo colors */
    background: linear-gradient(135deg, var(--bg-light) 0%, #F0F4FF 100%);
}

/* Dark Mode Overrides */
body.dark-mode {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.9);
}

.bg-card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 102, 255, 0.05);
}

body.dark-mode .bg-card {
    background: var(--bg-card-dark);
    border-color: var(--border-dark);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--text-light);
}

/* Link Colors using Logo Colors */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

body.dark-mode a {
    color: var(--primary-light);
}

body.dark-mode a:hover {
    color: var(--primary);
}

/* Mobile App Container */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom navigation */
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: none;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.15);
}

.app-header h1,
.app-header a {
    color: white !important;
}

body.dark-mode .app-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003D99 100%);
    border-bottom: none;
}

/* Logo Styling */
.app-header img {
    max-height: 32px;
    height: auto;
    width: auto;
    object-fit: contain;
}

.app-header a[href*="logo"] {
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003D99 100%);
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--primary-bg);
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: var(--border-dark);
}

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

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

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

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

.btn-full {
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

body.dark-mode .form-label {
    color: rgba(255, 255, 255, 0.9);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.2s;
}

body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-color: var(--border-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: white;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--border-light);
    padding: 0.5rem 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 102, 255, 0.08);
}

body.dark-mode .bottom-nav {
    background: var(--bg-card-dark);
    border-top-color: var(--border-dark);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

body.dark-mode .nav-item {
    color: rgba(255, 255, 255, 0.5);
}

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

.nav-item.active i {
    color: var(--primary);
    transform: scale(1.1);
}

.nav-item i {
    font-size: 1.25rem;
}

/* Service Cards */
.service-card {
    background: var(--bg-card-light);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

body.dark-mode .service-card {
    background: var(--bg-card-dark);
    border-color: var(--border-dark);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

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

.badge-info {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.badge-success {
    background: var(--secondary-bg);
    color: var(--secondary);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

body.dark-mode .empty-state {
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

body.dark-mode .spinner {
    border-color: rgba(255, 255, 255, 0.1);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.show,
.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
}

.modal-content {
    background: var(--bg-card-light);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 90%;
    width: 100%;
    max-width: 500px;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

body.dark-mode .modal-content {
    background: var(--bg-card-dark);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .modal-close {
    color: rgba(255, 255, 255, 0.7);
}

/* Checkbox Fix */
input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px;
    margin: 0;
    margin-right: 0.5rem;
    flex-shrink: 0 !important;
    cursor: pointer;
    accent-color: var(--primary);
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 640px) {
    .app-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Light Mode Text Colors - Ensure proper contrast */
.text-gray-400 {
    color: var(--text-light) !important;
}

.text-gray-500 {
    color: var(--text-medium) !important;
}

.text-gray-300 {
    color: var(--text-lighter) !important;
}

body.dark-mode .text-gray-400 {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-mode .text-gray-500 {
    color: rgba(255, 255, 255, 0.4) !important;
}

body.dark-mode .text-gray-300 {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 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; }

.w-full { width: 100%; }
.hidden { display: none; }
