:root {
    --primary-color: #E10000;
    --primary-hover: #cc0000;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --background-color: #f8f9fa;
    --error-color: #dc3545;
    --success-color: #28a745;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Logo */
.logo-header {
    text-align: left;
    padding: 20px;
    background: white;
    box-shadow: var(--box-shadow);
}

.logolink {
    display: inline-block;
    width: 203px;
    height: 51px;
    background: url(../images/ipcrlogo2.png) no-repeat center;
    background-size: contain;
    text-indent: -5000px;
    transition: opacity 0.2s;
}

.logolink:hover {
    opacity: 0.9;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.login-mainarea {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
    width: 100%;
    padding: 20px;
}

/* Form Styling */
.graybox-wrapper {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    max-width: 100%;
}

.graybox-signintxt {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.sf-lbl {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.sf-txtbox,
.sf-pwdbox {
    width: 100%;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    font-size: 16px;
    transition: all 0.2s;
}

.sf-txtbox:focus,
.sf-pwdbox:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(225, 0, 0, 0.1);
}

.sf-btnarea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

#SubmitB {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 120px;
}

#SubmitB:hover {
    background: var(--primary-hover);
}

.forgot-password {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer Styling */
.footer-info {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

footer {
    background: white;
    padding: 40px 20px;
    margin-top: auto;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer_ePCR {
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 30px;
}

.footer-legalnote-container {
    max-width: 1400px;
    margin: 0 auto;
}

.legalese {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legalese a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.legalese a:hover {
    color: var(--primary-color);
}

/* Error Messages */
.error-show {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

.error-hide {
    display: none;
}

.hideFromScreen {
    position: absolute;
    left: -9999px;
    text-indent: -9999px;
}

/* Responsive Design - Mobile First */
@media screen and (min-width: 768px) {
    .login-mainarea {
        grid-template-columns: minmax(400px, 600px) 1fr;
        gap: 60px;
        padding: 40px;
    }

    .graybox-wrapper {
        padding: 50px;
    }
}

@media screen and (min-width: 1200px) {
    .logo-header {
        padding: 20px 40px;
    }

    .login-mainarea {
        padding: 60px;
        gap: 80px;
    }
}

/* Small screens and mobile */
@media screen and (max-width: 767px) {
    .login-mainarea {
        padding: 0;
    }

    .graybox-wrapper {
        padding: 30px;
    }

    .sf-btnarea {
        flex-direction: column;
        gap: 20px;
    }

    #SubmitB {
        width: 100%;
    }

    .forgot-password {
        text-align: center;
    }

    .footer-info {
        padding: 20px;
        margin: 20px 0;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .sf-txtbox,
    .sf-pwdbox,
    #SubmitB {
        border: 2px solid currentColor;
    }
}
