/* Admin login — primary blue aligned with LaraCMS */
:root {
    --mac-green: #7eb3ff;
    --mac-green-hover: #6ea4f4;
    --mac-green-deep: #5b9cff;
    --primary: var(--mac-green);
    --primary-hover: var(--mac-green-hover);
    --mac-text: #1f2937;
    --mac-muted: #4b5563;
    --mac-line: #e5e7eb;
    --mac-field: #f9fafb;
    --mac-font: "PingFang SC", "PingFang TC", "Microsoft YaHei", "Microsoft JhengHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.mac-login {
    margin: 0;
    font-family: var(--mac-font);
    color: var(--mac-text);
    min-height: 100vh;
    background-color: #f2f3f5;
    background-image: url("../images/admin/signin_bg.png");
    background-repeat: no-repeat;
    background-position: left 6% center;
    background-size: min(980px, 72vw) auto;
}

.mac-login-stage {
    min-height: 100vh;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 40px 0;
}

.mac-login-hero {
    flex: 1;
    min-width: 0;
    padding: 0 12px 80px;
    text-align: right;
}

.mac-login-hello {
    margin: 0;
    font-size: 40px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--mac-green);
    letter-spacing: .04em;
}

.mac-login-hello-sub {
    margin: 14px 0 0 auto;
    font-size: 16px;
    color: #6b7280;
    max-width: 480px;
    line-height: 1.6;
}

.mac-login-pitch {
    margin: 18px 0 0 auto;
    padding: 0;
    max-width: 480px;
    list-style: none;
    text-align: left;
}
.mac-login-pitch li {
    position: relative;
    margin: 0 0 10px;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
}
.mac-login-pitch li:last-child { margin-bottom: 0; }
.mac-login-pitch li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mac-green);
}

.mac-login-card {
    width: 460px;
    max-width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 43px rgba(51, 65, 52, .07);
    padding: 36px 40px 28px;
    flex-shrink: 0;
}

.mac-login-card h1 {
    margin: 0 0 28px;
    font-size: 20px;
    font-weight: 500;
    color: var(--mac-text);
    line-height: 28px;
}

.mac-field {
    margin-bottom: 22px;
}
.mac-field label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--mac-muted);
}

.mac-control {
    position: relative;
}
.mac-control i,
.mac-control .mac-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    color: #9ca3af;
    pointer-events: none;
}
.mac-control input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--mac-line);
    border-radius: 4px;
    background: #fff;
    color: var(--mac-text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.mac-control input:hover { border-color: #d1d5db; }
.mac-control input:focus {
    border-color: var(--mac-green);
    box-shadow: 0 0 0 3px rgba(64, 204, 146, .18);
}

.mac-captcha-cap cap-widget { display: block; width: 100%; margin-top: 4px; }
.mac-captcha {
    display: flex;
    gap: 10px;
    align-items: center;
}
.mac-captcha .mac-control { flex: 1; min-width: 0; }
.mac-captcha-q {
    flex: 0 0 160px;
    width: 160px;
    height: 40px;
    padding: 0;
    margin: 0;
    line-height: 0;
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--mac-line);
    border-radius: 4px;
    background: #171b24;
    color: var(--mac-green-deep);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .02em;
    appearance: none;
    -webkit-appearance: none;
}
.mac-captcha-q img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mac-captcha-q:hover img { opacity: .92; }

.mac-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
    font-size: 13px;
    color: var(--mac-muted);
    user-select: none;
}
.mac-remember input { accent-color: var(--mac-green); }

.mac-control.is-err input {
    border-color: #ef4444;
    background: #fef2f2;
}
.mac-error {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
}
.mac-error[hidden] { display: none !important; }
.mac-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    max-width: min(420px, calc(100% - 24px));
    padding: 10px 16px;
    border-radius: 6px;
    background: #dc3545;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.mac-submit {
    width: 100%;
    height: 40px;
    border: 1px solid #d2e3ff;
    border-radius: 6px;
    background: #f4f8ff;
    color: #5b9cff;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    box-shadow: none;
    transition: background .15s, transform .12s, box-shadow .12s;
}
.mac-submit:hover { background: #eaf1ff; }
.mac-submit:active { transform: translateY(1px); }
.mac-submit:disabled { opacity: .7; cursor: wait; }

.mac-copy {
    margin: 18px 0 16px;
    text-align: center;
    font-size: 12px;
    color: #c4c4c4;
}
.ui-switch-login {
    margin: 14px 0 0;
    text-align: center;
}
.ui-switch-login a { margin: 0 6px; color: #9ca3af; font-size: 13px; text-decoration: none; }
.ui-switch-login a.is-on { color: var(--mac-green); font-weight: 600; }
.lang-pick-login {
    margin: 14px 0 0;
    display: flex;
    justify-content: center;
}
.lang-pick { position: relative; display: inline-block; text-align: left; }
.lang-pick > summary {
    list-style: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 148px;
    padding: 7px 28px 7px 8px;
    border: 1px solid #b7e0c9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
}
.lang-pick > summary::-webkit-details-marker { display: none; }
.lang-pick > summary::after {
    content: '';
    position: absolute;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #9ca3af;
}
.lang-pick-tag {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 20px;
    padding: 0 4px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}
.lang-pick-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}
.lang-pick-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    text-decoration: none;
}
.lang-pick-menu a:hover { background: #f3f4f6; }
.lang-pick-menu a.is-on { background: #e8f8ef; color: #0f8a4b; font-weight: 600; }

.mac-declare strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--mac-text);
}
.mac-declare p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #6b7280;
}

@media (max-width: 980px) {
    body.mac-login {
        background-image: none;
        background-color: #f2f3f5;
    }
    .mac-login-stage {
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 16px 28px;
        gap: 22px;
    }
    .mac-login-card {
        order: -1;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        padding: 24px 18px 18px;
    }
    .mac-login-hero {
        order: 1;
        padding: 4px 4px 12px;
        text-align: center;
    }
    .mac-login-hello { font-size: 22px; }
    .mac-login-hello-sub {
        margin: 8px auto 0;
        font-size: 14px;
        max-width: 22em;
    }
    .mac-login-pitch {
        margin: 14px auto 0;
        max-width: 22em;
    }
}

@media (max-width: 420px) {
    .mac-login-card h1 { margin-bottom: 20px; font-size: 18px; }
    .mac-field { margin-bottom: 16px; }
    .mac-captcha-q { flex-basis: 160px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .mac-submit, .mac-control input { transition: none; }
}
