:root {
    --page-start: #6474dd;
    --page-end: #7a5ac6;
    --header-bg: #354860;
    --body-bg: #fcfcfd;
    --card-bg: #f6f8fc;
    --card-shadow: 0 14px 34px rgba(42, 55, 78, 0.1);
    --white: #ffffff;
    --text: #3a4f66;
    --muted: #7c8ca1;
    --blue: #1877ff;
    --green: #24b04b;
    --green-accent: #2ac58f;
    --danger: #d73a3a;
    --console-bg: #364156;
    --console-text: #65afff;
    --border: #e9edf5;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--page-start), var(--page-end));
}

.login-page {
    display: grid;
    place-items: center;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(500px, 100%);
    padding: 44px 50px 48px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: 0 24px 60px rgba(37, 50, 77, 0.22);
}

.login-card h1 {
    margin: 0 0 34px;
    color: #26476e;
    font-size: clamp(2rem, 3vw, 2.4rem);
    text-align: center;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    color: #334b66;
    font-size: 0.95rem;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e3e9f1;
    border-radius: 16px;
    font-size: 1rem;
    color: #334b66;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(24, 119, 255, 0.12);
}

.login-button {
    margin-top: 12px;
    border: 0;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f7df0, #155fbc);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
}

.login-error {
    margin: 0 0 18px;
    color: var(--danger);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.page-wrap {
    min-height: 100vh;
    padding: 24px 18px 48px;
}

.topbar {
    display: flex;
    justify-content: flex-end;
    max-width: 1520px;
    margin: 0 auto 16px;
}

.logout-button {
    border: 0;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(47, 65, 86, 0.96);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-shell {
    max-width: 1520px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--body-bg);
    box-shadow: 0 24px 70px rgba(30, 42, 66, 0.22);
}

.dashboard-header {
    padding: 34px 30px 36px;
    background: var(--header-bg);
    text-align: center;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.header-icon {
    font-size: 3rem;
    line-height: 1;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.4rem, 4vw, 4.15rem);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.header-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    font-weight: 600;
}

.dashboard-body {
    padding: 50px;
    background: var(--body-bg);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.status-card {
    padding: 34px 22px 30px;
    border-radius: 20px;
    border-left: 5px solid var(--blue);
    background: var(--card-bg);
    text-align: center;
    box-shadow: var(--card-shadow);
}

.status-label {
    display: block;
    margin-bottom: 18px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.status-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
}

.status-value-small {
    font-size: 1rem;
}

.status-good {
    color: var(--green);
}

.status-info {
    color: var(--blue);
}

.status-error {
    color: var(--danger);
}

.action-row {
    padding: 48px 0 40px;
    text-align: center;
}

.run-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.run-button {
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 24px 54px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green), var(--green-accent));
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 30px rgba(42, 197, 143, 0.34);
}

.run-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.run-button:disabled {
    cursor: progress;
    opacity: 0.75;
}

.button-icon {
    font-size: 1.7rem;
    line-height: 1;
}

.execution-panel {
    padding: 30px 36px 36px;
    border-radius: 22px;
    background: #f2f4f8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.execution-heading {
    margin-bottom: 24px;
    text-align: center;
}

.execution-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
}

.console-box {
    padding: 28px 30px;
    border-radius: 16px;
    background: var(--console-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.console-line {
    margin: 0;
    padding: 0 0 12px;
    color: var(--console-text);
    font-family: Consolas, "Courier New", monospace;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-line + .console-line {
    margin-top: 12px;
}

.console-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.console-error {
    color: #ff9a9a;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.metric-card {
    padding: 34px 26px 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(55, 70, 95, 0.08);
    text-align: center;
}

.metric-card strong {
    display: block;
    margin-bottom: 16px;
    color: var(--blue);
    font-size: 2.5rem;
    font-weight: 700;
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 900px) {
    .status-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .login-card {
        padding: 34px 24px 30px;
        border-radius: 22px;
    }

    .login-card h1 {
        margin-bottom: 26px;
        font-size: 2rem;
    }

    .page-wrap {
        padding: 12px 10px 28px;
    }

    .topbar {
        margin-bottom: 12px;
    }

    .dashboard-header {
        padding: 24px 18px 26px;
    }

    .header-title-row {
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-header h1 {
        font-size: 2.35rem;
    }

    .dashboard-body {
        padding: 20px 16px 28px;
    }

    .action-row {
        padding: 28px 0 26px;
    }

    .run-button {
        width: 100%;
        justify-content: center;
        padding: 20px 22px;
    }

    .execution-panel {
        padding: 20px 18px 22px;
    }
}
