:root {
    --bg: #ffffff;
    --text: #151922;
    --muted: #667085;
    --line: #dde3ea;
    --tile-edge: #cfd8df;
    --brand: #156b55;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background: #f7f3eb;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: -28px;
    z-index: -2;
    background: url("../images/kuruyemis-bg.png?v=0.1.7") center center / cover no-repeat;
    filter: blur(5px);
    transform: scale(1.02);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.78);
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.main {
    min-height: 100vh;
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logout-link {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 5;
    padding: 9px 13px;
    border: 1px solid rgba(21, 25, 34, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.92);
}

.login-main {
    min-height: 100vh;
    width: min(100% - 28px, 520px);
    margin: 0 auto;
    padding: 28px 0;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
}

.login-logo {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 18px;
    background: linear-gradient(145deg, #1f9a79, #10644f);
    color: #fff;
    font-size: 25px;
    font-weight: 900;
}

.login-card h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
}

.login-card p {
    margin: 12px 0 26px;
    color: var(--muted);
}

.login-error {
    margin-bottom: 18px;
    padding: 12px 13px;
    border: 1px solid #f2b8b5;
    border-radius: 10px;
    background: #fff1f0;
    color: #a6352b;
    font-size: 14px;
    font-weight: 800;
}

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

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    border: 1px solid rgba(21, 25, 34, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    outline: none;
}

.login-form input:focus {
    border-color: #1f9a79;
}

.login-form button {
    height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(145deg, #1f9a79, #10644f);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.login-form button:hover {
    background: linear-gradient(145deg, #25aa86, #126f58);
}

.app-header {
    width: min(1180px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 34px;
    text-align: left;
}

.app-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 18px;
    background: linear-gradient(145deg, #1f9a79, #10644f);
    color: #fff;
    box-shadow: none;
    font-size: 26px;
    font-weight: 900;
}

.app-header h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.app-header p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.module-grid {
    width: min(1260px, 100%);
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    grid-auto-rows: 196px;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.module-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 10px;
    box-shadow: none;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 140ms ease, border-color 140ms ease, filter 140ms ease;
}

.module-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.04));
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(21, 25, 34, 0.14);
    box-shadow: 0 14px 28px rgba(31, 41, 55, 0.16);
}

.module-card:active {
    transform: translateY(0);
    border-color: rgba(21, 25, 34, 0.18);
    box-shadow: 0 6px 14px rgba(31, 41, 55, 0.12);
}

.module-card.disabled {
    filter: grayscale(0.75);
    opacity: 0.48;
    box-shadow: none;
    cursor: not-allowed;
}

.tile-wide {
    grid-column: span 2;
    align-items: center;
    gap: 24px;
}

.tile-square {
    grid-column: span 1;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.module-icon-wrap,
.module-copy {
    position: relative;
    z-index: 1;
}

.module-icon-wrap {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.module-icon {
    width: 122px;
    height: 122px;
    display: block;
    object-fit: contain;
    filter: none;
}

.tile-square .module-icon {
    width: 108px;
    height: 108px;
}

.module-copy {
    min-width: 0;
}

.module-title {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.06;
}

.tile-square .module-title {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.15;
}

.module-summary {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.25;
}

.tile-square .module-summary {
    display: none;
}

.placeholder {
    max-width: 860px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(24, 32, 48, 0.08);
}

.placeholder h1 {
    margin-top: 0;
}

@media (max-width: 1120px) {
    .main {
        justify-content: flex-start;
    }

    .module-grid {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        grid-auto-rows: 178px;
    }
}

@media (max-width: 760px) {
    .main {
        width: calc(100% - 28px);
        padding: 24px 0 30px;
    }

    .app-header {
        align-items: flex-start;
        justify-content: flex-start;
        margin-bottom: 24px;
    }

    .app-logo {
        width: 58px;
        height: 58px;
        border-radius: 14px;
        font-size: 21px;
    }

    .app-header p {
        font-size: 14px;
    }

    .module-grid {
        grid-template-columns: repeat(2, minmax(132px, 1fr));
        grid-auto-rows: 158px;
        gap: 13px;
    }

    .tile-wide,
    .tile-square {
        grid-column: span 1;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

    .module-icon,
    .tile-square .module-icon {
        width: 86px;
        height: 86px;
    }

    .module-title,
    .tile-square .module-title {
        margin-top: 8px;
        font-size: 15px;
    }

    .module-summary {
        display: none;
    }
}
