* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-container { width: 100%; max-width: 420px; margin: 0 auto; }
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 56px 32px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.login-card:hover { transform: translateY(-4px); box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15), 0 16px 32px rgba(0, 0, 0, 0.1); }

.card-hero {
    background: linear-gradient(to bottom, #f6f7f7 0%, #d2d8e3 100%);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    margin: -56px -32px 16px -32px;
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    /* soft bottom shadow */
    box-shadow: 0 14px 22px -20px rgba(0,0,0,0.28);
}

.brand-banner {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* border: 1px solid rgba(255,255,255,0.25); */
    border-radius: 8px;
    /* box-shadow: 0 2px 6px rgba(0,0,0,0.08); */
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Ensure good contrast on gradient banner */
.brand-banner .brand-title { color: #ffffff; }
.brand-banner .brand-subtitle { color: #d1fae5; }

.brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Embossed look using gradient overlays only (no shadows) */
    background:
        linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 45%), /* top-left soft light */
        linear-gradient(325deg, rgba(0,0,0,0.10), rgba(0,0,0,0) 55%),            /* bottom-right soft depth */
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);                       /* base */
    color: #ffffff;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.28); /* gentle outer border */
    box-shadow: none;
    transition: none;
}
.brand-icon::before { content: none; }
.brand-icon::after {
    /* subtle glossy strip on top without shadow */
    content: "";
    position: absolute;
    top: 7px; left: 9px; right: 9px;
    height: 70%;
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
}
.brand-icon:hover { transform: none; }
.brand-icon i { font-size: 24px; color: #ffffff; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { margin: 0; font-size: 24px; font-weight: 800; color: #2a2f36; letter-spacing: -0.2px; }
/* Pressed (inset) style for both texts on gray hero */
.brand-banner .brand-title {
    color: rgba(42,47,54,0.92);
    /* text-shadow: */
    /* 1px 1px 0 rgba(112, 72, 72, 0.28),      /* shadow bottom-right */
    /* -1px -1px 0 rgba(255,255,255,0.42); /* highlight top-left */
}
.brand-subtitle { margin: 2px 0 0; font-size: 16px; font-weight: 700; color: #310261; letter-spacing: 0; }
.brand-banner .brand-subtitle {
    color: rgba(84, 27, 127, 0.922);
    /* text-shadow: */
    /* 1px 1px 0 rgba(0,0,0,0.22),
    -1px -1px 0 rgba(255,255,255,0.20); */
}

@media (max-width: 420px) {
  .brand-title { font-size: 20px; }
  .brand-subtitle { font-size: 14px; }
  .brand-icon { width: 48px; height: 48px; border-radius: 29px; }
}

.logo-section { text-align: center; margin-bottom: 32px; }
.logo-icon {
    width: 64px; height: 64px;
    /* background: linear-gradient(135deg,rgb(102, 234, 122) 0%,rgb(75, 162, 136) 100%); */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}
.logo-icon i { color: white; font-size: 28px; }
.app-title { font-size: 24px; font-weight: 700; color: #1a1a1a; margin: 0 0 8px 0; letter-spacing: -0.5px; }
.app-subtitle { font-size: 16px; color:rgb(2, 86, 29); font-weight: 600; margin: 0 0 4px 0; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, #e0e7ff, transparent); margin: 27px 0; }
.login-header { text-align: center; margin-top: 35px; margin-bottom: 25px; }
.login-title { font-size: 20px; font-weight: 600; color:rgb(155, 87, 87); margin: 0; letter-spacing: 0.5px; }
.form-group-modern { margin-bottom: 24px; position: relative; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    z-index: 2; color: #9CA3AF; font-size: 18px; transition: color 0.3s ease;
}
.form-control-modern {
    width: 100%; height: 52px; padding: 0 16px 0 48px;
    border: 2px solid #E5E7EB; border-radius: 12px;
    font-size: 16px; font-weight: 500; color: #374151;
    background: white; transition: all 0.3s ease;
}
.form-control-modern:focus {
    outline: none; border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); background: white;
}
.form-control-modern:focus + .input-icon { color: #667eea; }
.checkbox-wrapper { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.checkbox-modern {
    width: 20px; height: 20px;
    border: 2px solid #D1D5DB; border-radius: 4px;
    position: relative; cursor: pointer; transition: all 0.3s ease;
}
.checkbox-modern:hover { border-color: #667eea; }
.checkbox-modern.checked { background: #667eea; border-color: #667eea; }
.checkbox-modern.checked::after {
    content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: white; font-size: 12px; font-weight: bold;
}
.checkbox-label { font-size: 14px; color: #6B7280; font-weight: 500; cursor: pointer; user-select: none; }
.login-button {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, rgb(79, 184, 119) 0%, rgb(79, 184, 119) 100%);
    border-radius: 12px;                 
    border: 2px solid rgba(255, 255, 255, 0.85); 
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.20),        
        inset 1px 1px 0 rgba(255, 255, 255, 0.35), 
        inset -1px -1px 0 rgba(0, 0, 0, 0.18);     
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.25),
        inset 1px 1px 0 rgba(255, 255, 255, 0.38),
        inset -1px -1px 0 rgba(0, 0, 0, 0.18);
}

.login-button:active {
    transform: translateY(0);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.20),
        inset 1px 1px 0 rgba(0, 0, 0, 0.22),       
        inset -1px -1px 0 rgba(255, 255, 255, 0.25);
}
.login-button span {
    color: #ffffff;
    text-shadow:
        1px 1px 0 rgba(0, 0, 0, 0.28),
       -1px -1px 0 rgba(255, 255, 255, 0.20);
}
.alert-modern {
    padding: 16px 20px; border-radius: 12px; margin-bottom: 24px;
    font-size: 14px; font-weight: 500; position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 12px;
    opacity: 0; transform: translateY(-10px);
    animation: slideInAlert 0.5s ease forwards;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.alert-modern::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: currentColor; opacity: 0.7; }
.alert-modern::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%); animation: shimmer 2s infinite;
}
.alert-icon { font-size: 18px; flex-shrink: 0; animation: pulse 2s infinite; }
.alert-error .alert-icon { color: #DC2626; }
.alert-content { flex: 1; line-height: 1.4; }
/* Warna teks maroon khusus untuk pesan error dari $message */
.alert-error .alert-content { color: maroon; font-weight: 600; font-size: 11px; }
.alert-close {
    background: none; border: none; color: currentColor;
    font-size: 16px; cursor: pointer; opacity: 0.6; transition: opacity 0.3s ease;
    padding: 4px; border-radius: 4px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.alert-close:hover { opacity: 1; background: rgba(0,0,0,0.1); }
.alert-info { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); color: #1D4ED8; border: 1px solid #93C5FD; }
.alert-success { background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%); color: #16A34A; border: 1px solid #86EFAC; }
.alert-warning { background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%); color: #D97706; border: 1px solid #FCD34D; }
.alert-error { background: linear-gradient(135deg, #FEF2F2 0%, #FECACA 100%); color: #DC2626; border: 1px solid #F87171; }
@keyframes slideInAlert { 0% { opacity: 0; transform: translateY(-20px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes shimmer { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }
@keyframes pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.05);} }
.alert-modern.fade-out { animation: slideOutAlert 0.3s ease forwards; }
@keyframes slideOutAlert { 0% { opacity:1; transform:translateY(0) scale(1);} 100% { opacity:0; transform:translateY(-10px) scale(0.95); height:0; margin:0; padding:0;} }
.form-control-modern.error { border-color:#DC2626; box-shadow:0 0 0 3px rgba(220,38,38,0.1);}
.form-control-modern.error + .input-icon { color:#DC2626;}
.help-block { display:block; color:#DC2626; font-size:12px; margin-top:6px; margin-left:4px; opacity:0; transform:translateY(-5px); transition:all 0.3s ease; }
.help-block:not(:empty) { opacity:1; transform:translateY(0); }
.icheckbox_square-blue { display:none; }
/* Info message container alignment */
#infoMessage { text-align: center; }
/* Utility text color classes */
.text-success { color: #16A34A; }
/* Pastikan teks fallback callout success di #infoMessage berwarna hijau */
#infoMessage.callout.callout-success { color: #16A34A !important; }
/* Pastikan seluruh callout success berwarna hijau */
.callout.callout-success { color: #16A34A !important; }
/* Pastikan konten alert success berwarna hijau */
.alert-success .alert-content { color: #16A34A !important; }

/* Toggle password button styling */
.toggle-password-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 4px;
}
.toggle-password-btn:hover { color: #667eea; }