﻿/* ===========================
   Global Reset & Background
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Important for consistent sizing */
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: url('/NMTemp/images/dairy11.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   Header
=========================== */
.main-header {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    padding: 12px 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.25);
    color: #fff;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* responsive wrap */
    gap: 15px;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-logo {
    height: 70px;
    flex-shrink: 0;
}

.dept-text {
    line-height: 1.2;
}

.dept-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.dept-subtitle {
    font-size: 1rem;
    color: #f0f0f0;
}

.home-link {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

    .home-link:hover {
        color: #ffeb3b;
    }

/* ===========================
   Wrapper
=========================== */
.page-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

/* ===========================
   Login Container
=========================== */
.login-container {
    display: flex;
    width: 950px;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0px 8px 25px rgba(0,0,0,0.2);
    flex-wrap: wrap; /* Important for responsive */
}

/* Left Panel */
.login-left {
    flex: 1 1 350px;
    background: linear-gradient(135deg, #7b2ff7, #f107a3);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 25px;
    text-align: center;
}

    .login-left img {
        max-width: 70%;
        height: auto;
        margin-bottom: 15px;
    }

    .login-left .info-text {
        font-size: 14px;
        line-height: 1.6;
    }

/* Right Panel */
.login-right {
    flex: 1 1 350px;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome {
    background: #7b2ff7;
    color: white;
    padding: 8px 20px;
    display: inline-block;
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.title {
    font-size: 22px;
    color: #333;
    margin-bottom: 30px;
}

/* ===========================
   Inputs
=========================== */
.form-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 2px solid #ccc;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background-color: transparent;
}

    .form-control:focus {
        border-color: #7b2ff7;
    }

.toggle-password {
    position: absolute;
    right: 10px;
    top: 12px;
    cursor: pointer;
    color: #888;
}

/* ===========================
   Captcha
=========================== */
.captcha-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.captcha-img {
    height: 40px;
    width: 120px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.captcha-input {
    flex: 1 1 120px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn-refresh {
    border: none;
    background: #f107a3;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===========================
   Login button
=========================== */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #7b2ff7, #f107a3);
    border: none;
    padding: 12px;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-login:hover {
        opacity: 0.9;
    }

/* ===========================
   Links
=========================== */
.links {
    text-align: right;
    margin-top: 20px;
}

    .links a {
        font-size: 14px;
        color: #7b2ff7;
        text-decoration: none;
    }

        .links a:hover {
            text-decoration: underline;
        }

/* ===========================
   Instructions Box
=========================== */
.ins-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

    .ins-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    }

    .ins-box h2 {
        font-size: 18px;
        margin-bottom: 12px;
        color: #fff;
        border-bottom: 2px solid rgba(255,255,255,0.4);
        padding-bottom: 6px;
    }

    .ins-box .list {
        list-style: none;
        padding-left: 0;
        margin: 0;
    }

        .ins-box .list li {
            font-size: 14px;
            color: #f8f8f8;
            margin-bottom: 8px;
            padding-left: 28px;
            position: relative;
            line-height: 1.6;
        }

            .ins-box .list li::before {
                content: "\f00c";
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                position: absolute;
                left: 0;
                top: 2px;
                color: #ffeb3b;
                font-size: 14px;
            }

/* ===========================
   Footer
=========================== */
.login-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 12px;
    color: #ddd;
    opacity: 0.85;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
}

    .login-footer strong,
    .login-footer a {
        color: #ffeb3b;
        font-weight: 600;
        text-decoration: none;
    }

/* ===========================
   Dropdown
=========================== */
.form-group select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

/* ===========================
   Responsive Enhancements
=========================== */

/* Tablet */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        height: auto;
        width: 100%;
        max-width: 95%;
    }

    .login-left,
    .login-right {
        width: 100%;
        padding: 25px;
        text-align: center;
    }

        .login-left img {
            max-width: 60%;
        }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .login-container {
        width: 100%;
        margin: 20px auto;
        box-shadow: none;
        border-radius: 12px;
    }

    .welcome {
        font-size: 12px;
        padding: 6px 12px;
    }

    .title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .form-control {
        font-size: 13px;
        padding: 8px;
    }

    .btn-login {
        font-size: 14px;
        padding: 10px;
    }

    .captcha-row {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-img,
    .captcha-input,
    .btn-refresh {
        width: 100%;
    }

    .btn-refresh {
        margin-top: 8px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .header-logo {
        height: 50px;
    }

    .dept-title {
        font-size: 1.2rem;
    }

    .dept-subtitle {
        font-size: 0.85rem;
    }

    .home-link {
        font-size: 1.2rem;
    }

    .login-left img {
        max-width: 85%;
    }

    .title {
        font-size: 16px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .links a {
        font-size: 12px;
    }

    .login-footer {
        font-size: 11px;
        padding-top: 8px;
    }
}
