body {
    margin: 0;
    min-height: 100vh;
    background: #171b2a;
    color: white;
    font-family: Arial, sans-serif;
}

.logout-button {
    position: fixed;
    top: 20px;
    right: 24px;
    background: #ff0000;
    color: white;
    padding: 10px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
}

.login-button {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff0000;
    color: white;
    padding: 18px 34px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
}

.dashboard {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding-top: 90px;
}

.overview-card {
    background: #252a3f;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

.overview-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.small-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 3px solid #5865f2;
}

.overview-header span {
    color: #b8c7e0;
    font-size: 16px;
    font-weight: 700;
}

.overview-header h1 {
    margin: 6px 0 0;
    font-size: 30px;
}

.overview-stat {
    margin-top: 22px;
    background: #1b2033;
    border-radius: 16px;
    padding: 18px;
}

.overview-stat small {
    display: block;
    color: #b8c7e0;
    font-size: 15px;
    margin-bottom: 6px;
}

.overview-stat strong {
    font-size: 30px;
}

.modules-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.module-card {
    min-height: 150px;
    background: #252a3f;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
    text-decoration: none;
    color: white;
    transition: transform 0.15s ease, background 0.15s ease;
}

.module-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.module-card p {
    margin: 0;
    color: #b8c7e0;
    font-size: 16px;
    line-height: 1.4;
}

.clickable {
    cursor: pointer;
}

.clickable:hover {
    transform: translateY(-4px);
    background: #303654;
}

.locked {
    opacity: 0.55;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: #b8c7e0;
    text-decoration: none;
    font-weight: 700;
}

.back-link:hover {
    color: white;
}

.stats-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.stat-card {
    background: #252a3f;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

.stat-card small {
    display: block;
    color: #b8c7e0;
    font-size: 16px;
    margin-bottom: 12px;
}

.stat-card strong {
    font-size: 36px;
}

.stats-tabs {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.tab {
    background: #252a3f;
    color: #b8c7e0;
    padding: 13px 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
}

.tab.active {
    background: #5138ff;
    color: white;
}

.tab.disabled {
    opacity: 0.45;
}

.range-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.range-picker a {
    background: #1b2033;
    color: #b8c7e0;
    padding: 11px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.range-picker a.active-range {
    background: #ff0000;
    color: white;
}

.error-box {
    margin-top: 28px;
    background: #3a2230;
    color: #ffd5df;
    padding: 24px;
    border-radius: 18px;
}

.stat-change {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.stat-change span {
    display: block;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
}

.stat-change small {
    display: block;
    color: #b8c7e0;
    font-size: 14px;
    line-height: 1.4;
}

.stat-change.positive span {
    color: #4ade80;
}

.stat-change.negative span {
    color: #fb7185;
}

.milestone-form-card,
.milestone-card,
.empty-box {
    margin-top: 28px;
    background: #252a3f;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

.milestone-form-card h2 {
    margin: 0 0 20px;
}

.milestone-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
}

.milestone-form select,
.milestone-form input {
    background: #1b2033;
    color: white;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
}

.milestone-form button,
.delete-button {
    border: 0;
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 800;
    cursor: pointer;
}

.milestone-form button {
    background: #5138ff;
    color: white;
}

.delete-button {
    background: #ff0000;
    color: white;
}

.milestone-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
}

.milestone-top small {
    color: #b8c7e0;
    font-size: 15px;
}

.milestone-top h2 {
    margin: 8px 0 0;
    font-size: 32px;
}

.progress-bar {
    margin-top: 22px;
    width: 100%;
    height: 18px;
    background: #1b2033;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar div {
    height: 100%;
    background: linear-gradient(135deg, #5f5cff, #ff3d9a);
    border-radius: 999px;
}

.milestone-info {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
    color: #b8c7e0;
    font-weight: 700;
}

.empty-box {
    color: #b8c7e0;
}
