:root {
    --bg: #f4f6fb;
    --card-bg: #fff;
    --primary: #1f73b7;
    --text-soft: #6e7a94;
    --danger: #c62828;
}

* {
    box-sizing: border-box;
}

body.admin-index {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
         linear-gradient(rgba(244, 246, 251, 0.22), rgba(244, 246, 251, 0.22)),
        url("../background/tobacco.png") center center / cover no-repeat fixed;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: #1c2028;
    padding: 1.5rem;
}

.admin-index--redirect {
    text-align: center;
    font-weight: 700;
}

.card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem 1.8rem 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow:
        0 24px 70px rgba(16, 22, 38, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

h1 {
    margin: 0 0 0.2rem;
    font-size: 2rem;
    letter-spacing: -0.03em;
    line-height: 1;
}

p.sub {
    margin: 0 0 1.5rem;
    color: #5d6f92;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
}

label {
    display: block;
    font-weight: 800;
    font-size: 0.84rem;
    margin: 0.95rem 0 0.45rem;
    color: #233557;
    letter-spacing: 0.01em;
}

input {
    width: 100%;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    border: 1px solid #c9d7f0;
    outline: none;
    font-size: 1rem;
    background: rgba(238, 244, 255, 0.82);
    color: #1b2740;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus {
    border-color: rgba(31, 115, 183, 0.65);
    box-shadow: 0 0 0 4px rgba(31, 115, 183, 0.14);
    background: rgba(247, 250, 255, 0.98);
}

.actions {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #0d47a1);
    color: #fff;
    border: 0;
    padding: 0.92rem 1rem;
    font-weight: 900;
    font-size: 0.95rem;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(13, 71, 161, 0.2);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(13, 71, 161, 0.24);
    filter: saturate(1.04);
}

.error {
    background: #ffebee;
    color: var(--danger);
    border: 1px solid #ffcdd2;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    font-weight: 800;
    margin-top: 0.85rem;
}

.meta {
    margin-top: 1.15rem;
    font-size: 0.9rem;
    color: var(--text-soft);
    font-weight: 600;
    line-height: 1.45;
}

.card-credit {
    margin-top: 0.9rem;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
}

.meta a {
    color: var(--primary);
    text-decoration: none;
}

/* Password Toggle Styling for Admin Login */
.input-group {
    position: relative; /* Ensure the toggle button is positioned relative to this group */
    /* The base input-group might already exist, but ensure it's relative */
}

.input-group.has-toggle input {
    padding-right: 44px; /* Make space for the eye icon on the right */
}

.toggle-password {
    position: absolute;
    right: 10px; /* Position from the right edge of the input group */
    top: 50%; /* Vertically center */
    transform: translateY(-50%); /* Adjust for exact vertical centering */
    width: 32px; /* Size of the button */
    height: 32px; /* Size of the button */
    border: none; /* Remove default button border */
    background: transparent; /* Make background transparent */
    color: var(--primary); /* Use primary color for the icon */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* Ensure it's above the input field */
    padding: 0; /* Remove default padding */
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.toggle-password:hover,
.toggle-password:active,
.toggle-password:focus {
    transform: translateY(-50%);
    box-shadow: none;
    filter: none;
    background: transparent;
    outline: none;
}

.toggle-password svg {
    width: 20px; /* Size of the SVG icon */
    height: 20px; /* Size of the SVG icon */
    display: block; /* Ensure SVG takes up its space */
}

.meta a:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    body.admin-index {
        padding: 1rem;
    }

    .card {
        max-width: 100%;
        padding: 1.6rem 1.2rem 1.35rem;
        border-radius: 20px;
    }

    h1 {
        font-size: 1.7rem;
    }

    p.sub {
        font-size: 0.95rem;
    }
}
