/* Header */
.header {
    background: var(--primary); color: white; padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 10px rgba(27,67,50,0.3);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; cursor: pointer; }
.logo span { color: var(--accent); }
.header-badge { background: rgba(255,255,255,0.12); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.user-badge { background: var(--accent); color: var(--primary); padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.btn-logout {
    background: rgba(255,255,255,0.12); border: none; color: white;
    padding: 6px 14px; border-radius: 8px; font-family: inherit;
    font-size: 13px; font-weight: 500; cursor: pointer;
}
.btn-logout:hover { background: rgba(255,255,255,0.22); }

/* Home view */
.home-view { max-width: 1200px; margin: 24px auto; padding: 0 20px; }
.home-title { text-align: center; margin-bottom: 20px; }
.home-title h1 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.home-title p { font-size: 13px; color: var(--text-light); }

.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1024px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .home-grid { grid-template-columns: 1fr; } }

.module-card {
    background: var(--surface); border-radius: 12px; padding: 18px 18px 16px;
    box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s;
    border: 2px solid transparent; position: relative;
    min-height: 110px;
}
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.module-card .mc-icon { font-size: 26px; margin-bottom: 4px; line-height: 1; }
.module-card h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 4px; line-height: 1.2; }
.module-card p { font-size: 12px; color: var(--text-light); line-height: 1.4; }
.module-card .mc-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 2px 9px; border-radius: 10px; font-size: 10.5px; font-weight: 600;
    background: var(--success-light); color: var(--success);
}

/* Module view */
.view { max-width: 1400px; margin: 0 auto; padding: 20px 20px 40px; }
.view-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.view-header h2 { font-size: 22px; font-weight: 700; color: var(--primary); }
.btn-back {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12); border: none; color: white;
    padding: 6px 14px; border-radius: 8px; font-family: inherit;
    font-size: 13px; font-weight: 500; cursor: pointer;
}
.btn-back:hover { background: rgba(255,255,255,0.22); }

/* Login page */
.login-container {
    max-width: 400px; margin: 80px auto; text-align: center;
    background: var(--surface); border-radius: 16px; padding: 40px;
    box-shadow: var(--shadow-lg);
}
.login-container h2 { font-size: 22px; color: var(--primary); margin-bottom: 6px; }
.login-container .subtitle { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }
.login-container input { width: 100%; margin-bottom: 12px; }
.login-container .btn { width: 100%; justify-content: center; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 20px; }
.login-logo { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.login-logo span { color: var(--accent); }
