/* ============================================
   EDITAL LEME - Estilos do Portal Principal
   ============================================ */

:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --accent: #3498db;
    --bg: #f0f2f5;
    --white: #ffffff;
    --text: #2c3e50;
    --text-muted: #6c757d;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ========== LOGIN ========== */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 48px;
    color: #fdbb2d;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.login-header h2 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.btn-login:hover { background: #2980b9; }
.btn-login:disabled { background: #95a5a6; cursor: wait; }

/* ========== TOPBAR ========== */

.topbar {
    background: var(--primary);
    color: white;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon {
    font-size: 28px;
    color: #fdbb2d;
}

.topbar-left h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.topbar-left span {
    font-size: 0.8rem;
    opacity: 0.7;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right span {
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-logout {
    padding: 8px 18px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: background 0.2s;
}

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

/* ========== GRID DE APLICATIVOS ========== */

.apps-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.apps-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.app-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid #ccc;
}

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

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 14px;
    color: white;
}

.app-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.app-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.no-apps {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========== RESPONSIVO ========== */

@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        padding: 16px;
        gap: 12px;
    }
    .topbar { padding: 12px 16px; }
    .topbar-left h1 { font-size: 1rem; }
    .topbar-left span { display: none; }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .login-card { padding: 24px; }
}
