:root {
    --primary-color: #0B0A4A;
    --primary-light: #1a1a6e;
    --gold-dark: #C89B3C;
    --gold-medium: #E6C76A;
    --gold-light: #F4E08A;
    --gold-main: #D4A73F;
    --light-bg: #f5f7fb;
    --white: #FFFFFF;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--primary-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: 180px 180px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "⚖️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 280px;
    color: var(--gold-light);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    font-weight: normal;
    text-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.login-box {
    background: var(--white);
    padding: 2.7rem 2.3rem;
    border-radius: 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5), 0 0 0 1px rgba(212, 167, 63, 0.2) inset;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(1px);
    transition: all 0.3s;
    background-color: rgba(255,255,255,0.98);
}

.login-box:hover {
    box-shadow: 0 40px 70px -12px var(--primary-color);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.logo-gavel {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-main));
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: 0 12px 25px -5px var(--gold-dark);
    margin-bottom: 0.8rem;
    border: 2px solid var(--gold-light);
    color: var(--primary-color);
    line-height: 1;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 30%, var(--gold-main) 90%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.logo-sub {
    color: var(--gold-dark);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--light-bg);
    padding: 0.2rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--gold-light);
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin: 0.8rem 0 0.2rem;
    font-weight: 700;
    font-size: 2rem;
}

h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
    margin: 0.7rem auto 0.5rem;
    border-radius: 4px;
}

.sub-headline {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    background: rgba(212, 167, 63, 0.05);
    padding: 0.4rem;
    border-radius: 40px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.95rem;
    padding-right: 0.6rem;
    letter-spacing: 0.2px;
}

label i {
    color: var(--gold-main);
    margin-left: 8px;
    font-style: normal;
    font-weight: 700;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.4rem;
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    background-color: var(--light-bg);
    font-size: 1rem;
    transition: all 0.25s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.02);
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--gold-main);
    outline: none;
    background-color: var(--white);
    box-shadow: 0 8px 20px -8px var(--gold-dark);
}

input::placeholder {
    color: #a0b3c9;
    font-size: 0.9rem;
}

button {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(115deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    margin-top: 1rem;
    box-shadow: 0 16px 30px -10px var(--primary-color);
    border: 1px solid var(--gold-light);
    position: relative;
    overflow: hidden;
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(212, 167, 63, 0.4), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

button:hover::before {
    transform: translateX(100%);
}

button:hover {
    background: linear-gradient(115deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 20px 35px -8px var(--gold-dark);
    transform: scale(1.01);
}

/* error message with gold/red elegant touch */
.error-msg {
    background: #fff9f0;
    border-right: 8px solid var(--gold-dark);
    color: #974d0e;
    padding: 1.2rem 1.2rem;
    border-radius: 60px;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(212, 167, 63, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--gold-light);
    background-color: #fefcf5;
}

.error-msg::before {
    content: "⚖️⚠️";
    font-size: 1.3rem;
    letter-spacing: -4px;
    filter: drop-shadow(0 2px 2px #cc9f4b);
}

.footer-links {
    margin-top: 2.3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    border-top: 2px solid rgba(212, 167, 63, 0.25);
    padding-top: 1.5rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 167, 63, 0.05);
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
}

.footer-links a:hover {
    color: var(--gold-dark);
    background: rgba(212, 167, 63, 0.15);
    text-decoration: none;
    transform: translateY(-2px);
}

.footer-links a i {
    font-style: normal;
    background: var(--gold-light);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

input, button, .error-msg, .footer-links a {
    text-align: right;
}

@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
.login-box {
    animation: fadeSlide 0.5s ease-out;
}

/* Login Logo */
.login-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 16px;
}
