:root {
    --purple: #7413dc;
    --purple-dark: #4f0c9e;
    --purple-light: #f4edff;
    --card-soft: #fcfaff;
    --white: #ffffff;
    --text: #222222;
    --muted: #666666;
    --border: #e5d8f7;
    --background: #f7f3fc;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

.top-header {
    background: var(--purple);
    color: var(--white);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-size: 21px;
    font-weight: bold;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 2px;
}

.user-bar {
    font-size: 14px;
}

.user-bar a {
    color: var(--white);
    margin-left: 14px;
    font-weight: bold;
    text-decoration: none;
}

.user-bar a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 24px;
}

.welcome {
    text-align: center;
    margin: 18px auto 34px;
}

.welcome h1 {
    color: var(--purple);
    font-size: 44px;
    line-height: 1.1;
    margin: 0 0 10px;
}

.welcome p {
    color: var(--muted);
    font-size: 18px;
    margin: 0;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: var(--card-soft);
    border-radius: 18px;
    padding: 30px 26px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 216, 247, 0.8);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    cursor: pointer;
    text-align: center;
}

.app-card:hover,
.app-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(116, 19, 220, 0.18);
    border-color: var(--purple);
    background: var(--white);
    outline: none;
}

.app-icon {
    width: 94px;
    height: 94px;
    border-radius: 22px;
    object-fit: contain;
    display: block;
    margin: 0 0 22px;
}

.app-title {
    color: var(--purple-dark);
    font-size: 24px;
    font-weight: bold;
    line-height: 1.15;
    margin-bottom: 9px;
}

.app-description {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.35;
}

.app-launch {
    display: none;
}

.card {
    background: var(--white);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.notice {
    background: var(--purple-light);
    border-left: 4px solid var(--purple);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.error {
    background: #ffecec;
    border-left: 4px solid #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

button,
.button {
    display: inline-block;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 9px;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--purple-dark);
}

input {
    width: 100%;
    max-width: 420px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

input:focus {
    outline: 2px solid var(--purple-light);
    border-color: var(--purple);
}

.login-card {
    max-width: 720px;
    margin: 48px auto;
    padding: 44px;
    text-align: center;
}

.login-title {
    color: var(--purple);
    font-size: 46px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 10px 0 28px 0;
}

.login-divider-line {
    height: 2px;
    background: var(--border);
    width: 180px;
}

.login-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
}

.login-form {
    text-align: left;
    max-width: 520px;
    margin: 0 auto;
}

.login-form label {
    color: var(--purple-dark);
    font-weight: bold;
    font-size: 20px;
}

.login-form input {
    max-width: 100%;
    margin-top: 6px;
    margin-bottom: 18px;
    font-size: 18px;
    padding: 14px;
}

.login-form button {
    width: 100%;
    font-size: 18px;
    padding: 14px;
    margin-top: 8px;
}

.footer {
    padding: 20px 24px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 800px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 14px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand-logo img {
        width: 40px;
        height: 40px;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 13px;
    }

    .user-bar {
        width: 100%;
        line-height: 1.4;
    }

    .container {
        padding: 14px 12px;
    }

    .welcome {
        margin: 4px auto 14px;
    }

    .welcome h1 {
        font-size: 24px;
        line-height: 1.15;
        text-align: left;
    }

    .app-grid {
        gap: 12px;
        margin-top: 12px;
    }

    .app-card {
        min-height: 154px;
        padding: 15px 18px;
        border-radius: 16px;
    }

    .app-icon {
        width: 64px;
        height: 64px;
        border-radius: 15px;
        margin-bottom: 10px;
    }

    .app-title {
        font-size: 19px;
        margin-bottom: 4px;
    }

    .app-description {
        font-size: 13px;
        line-height: 1.2;
    }

    .login-card {
        margin: 20px auto;
        padding: 24px;
    }

    .login-title {
        font-size: 32px;
    }

    .login-divider-line {
        width: 90px;
    }

    .login-logo {
        width: 46px;
        height: 46px;
    }
}