/* EnviroKinetics App Portal Styles */

:root {
    --primary-color: #0078d4;
    --primary-hover: #106ebe;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

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

#user-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.logout-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-btn:hover {
    text-decoration: underline;
}

/* Main Content */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Apps Section */
.apps-section,
.mobile-section {
    margin-bottom: 3rem;
}

.apps-section h2,
.mobile-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* App Card */
.app-card {
    background: var(--card-background);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.app-card.app-coming-soon {
    opacity: 0.7;
}

.app-card.app-coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.app-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.app-version {
    display: inline-block;
    background: var(--background-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.app-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* App Actions */
.app-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

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

.btn-primary.highlight {
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-disabled {
    background-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Mobile Section */
.mobile-info {
    background: var(--card-background);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.mobile-info p {
    margin-bottom: 1rem;
}

.mobile-info ol {
    margin-left: 1.5rem;
}

.mobile-info li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .main {
        padding: 1rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .app-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Error State */
.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
