* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image: url('../images/isu-background.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    background-color: #2563eb;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.card {
    width: 100%;
    max-width: 450px;
    background-color: rgba(212, 228, 212, 0.73);
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 20px;
    color: white;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.5rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    width: 100%;
}

.logo {
    height: 80px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.title-container {
    flex: 1;
}

.system-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: black;
}

.subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    color: black;
}

.card-title {
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
    font-size: 1.15rem;
    color: black;
}

.card-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: black;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    padding-left: 40px;
    font-size: 1rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    background-color: green;
    color: white;
}

.btn:active {
    transform: translateY(1px);
}

.btn:hover {
    background-color: darkgreen;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.mt-4 {
    margin-top: 1rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray {
    color: #64748b;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.alert-error {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #dc2626;
    background-color: #fee2e2;
}

.alert-success {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #166534;
    background-color: #dcfce7;
}

/* Input group with icons */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 2;
    font-size: 1.1rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 2;
    padding: 4px;
}

.password-toggle:hover {
    color: #22c55e;
}

/* Remember me and forgot password */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: green;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 0.9rem;
    color: black;
}

.forgot-password {
    color: green;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Auto-fill dropdown styles */
.autofill-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #22c55e;
    border-top: 1px solid #22c55e;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin-top: 2px;
}

.autofill-item {
    padding: 15px 40px 15px 40px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    background: white;
}

.autofill-item:hover {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding-left: 36px;
}

.autofill-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.autofill-email {
    font-weight: 500;
    font-size: 0.95rem;
    color: #111827;
    word-break: break-all;
}

.autofill-delete {
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    background: transparent;
    flex-shrink: 0;
}

.autofill-item:hover .autofill-delete {
    opacity: 1;
}

.autofill-delete:hover {
    background-color: #fee2e2;
    color: #991b1b;
    transform: scale(1.1);
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-out;
    padding: 15px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 25px 35px 25px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.popup-overlay.active .popup {
    transform: scale(1) translateY(0);
}

.popup-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
    animation: iconScale 0.6s ease-out 0.2s both;
    position: relative;
}

.popup-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.3);
    animation: checkPulse 1.5s ease-out 0.6s both;
}

@keyframes iconScale {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% { 
        transform: scale(1.1);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
    animation: fadeSlideUp 0.5s ease-out 0.3s both;
    letter-spacing: -0.025em;
}

.popup-message {
    color: #6b7280;
    margin-bottom: 28px;
    font-size: 1rem;
    line-height: 1.5;
    animation: fadeSlideUp 0.5s ease-out 0.4s both;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-container {
    width: 100%;
    height: 4px;
    background-color: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    animation: fadeSlideUp 0.5s ease-out 0.5s both;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 2px;
    animation: progressFill 2s ease-in-out 0.6s forwards;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: progressShine 1s ease-in-out 1.2s infinite;
}

@keyframes progressFill {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.status-text {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 16px;
    font-weight: 500;
    animation: fadeSlideUp 0.5s ease-out 0.6s both;
}

/* Professional loading dots */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotPulse {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Subtle background pattern */
.popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 30%);
    border-radius: 12px;
    pointer-events: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive Styles - Bootstrap-inspired breakpoints */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        padding: 5px;
        align-items: flex-start;
        padding-top: 8px;
    }
    
    .card {
        padding: 8px;
        border-radius: 6px;
        max-width: 95%;
        margin: 0 auto;
    }
    
    .card-header {
        padding: 0.5rem 0.5rem 0;
        flex-direction: column;
        text-align: center;
        margin-bottom: 0.5rem;
        gap: 0.3rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        height: 40px;
        margin: 0 auto 0.3rem;
    }
    
    .title-container {
        text-align: center;
    }
    
    .system-name {
        font-size: 0.8rem;
        line-height: 1.1;
    }
    
    .subtitle {
        font-size: 0.6rem;
        margin-top: 0.1rem;
    }
    
    .card-title {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.6rem;
    }
    
    .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        font-size: 14px;
        padding: 0.45rem 0.45rem 0.45rem 32px;
    }
    
    .input-icon {
        font-size: 0.85rem;
        left: 8px;
    }
    
    .password-toggle {
        font-size: 0.85rem;
        right: 8px;
        padding: 2px;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }
    
    .checkbox-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-label,
    .forgot-password {
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .autofill-item {
        padding: 8px 20px 8px 20px;
    }
    
    .autofill-item:hover {
        padding-left: 16px;
    }
    
    .autofill-email {
        font-size: 0.75rem;
    }
    
    .autofill-delete {
        font-size: 0.9rem;
    }
    
    .popup {
        padding: 20px 15px 18px 15px;
        margin: 0 5px;
    }
    
    .popup-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .popup-title {
        font-size: 1rem;
    }
    
    .popup-message {
        font-size: 0.8rem;
        margin-bottom: 18px;
    }
    
    .status-text {
        font-size: 0.7rem;
        margin-top: 12px;
    }
    
    .alert-error,
    .alert-success {
        padding: 0.6rem;
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        padding: 12px;
    }
    
    .card {
        max-width: 480px;
        padding: 18px;
    }
    
    .logo {
        height: 65px;
    }
    
    .system-name {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .card-title {
        font-size: 1.05rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    body {
        padding: 15px;
    }
    
    .card {
        max-width: 480px;
    }
    
    .logo {
        height: 75px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .card {
        margin: 10px auto;
        padding: 10px;
    }
    
    .logo {
        height: 40px;
    }
    
    .card-header {
        margin-bottom: 0.5rem;
        padding: 0.5rem 0.5rem 0;
    }
    
    .system-name {
        font-size: 0.9rem;
    }
    
    .subtitle {
        font-size: 0.65rem;
    }
    
    .card-title {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.6rem;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .form-control {
        padding: 0.5rem 0.5rem 0.5rem 34px;
    }
    
    .checkbox-group {
        margin: 0.75rem 0;
    }
    
    .btn {
        padding: 0.55rem;
        font-size: 0.85rem;
    }
    
    .popup-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .popup-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .popup-message {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }
    
    .popup {
        padding: 20px 15px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .form-control,
    .password-toggle,
    .autofill-item {
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .checkbox-container input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .popup-overlay,
    .autofill-dropdown {
        display: none !important;
    }
}