/* ============================================
   APP.CSS — Style Global & Login
   ============================================ */

:root {
    /* Palette Warna Air (Water Theme) */
    --primary-dark: #004e92;
    --primary-light: #00a8cc;
    --primary-mid: #0277bd;
    --bg-gradient: linear-gradient(135deg, #004e92 0%, #000428 100%);
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-muted: #64748b;
    --input-bg: #f4f7f6;
    --border-radius: 16px;
    --transition: all 0.3s ease;

    /* Variabel Dashboard */
    --sidebar-bg: #00152e;
    --dashboard-bg: #f4f6f9;
}

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

/* --- GLOBAL BODY --- */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* --- LAYOUT UTAMA LOGIN --- */
.login-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    background: var(--surface-color);
    overflow: hidden;
    position: relative;
}

/* --- SISI KIRI (BRANDING) --- */
.brand-section {
    flex: 1.2;
    background: url('https://picsum.photos/seed/watertreatment/1200/1600') no-repeat center center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    color: white;
}

.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 78, 146, 0.7), rgba(0, 4, 40, 0.85));
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 450px;
    animation: fadeInUp 1s ease-out;
}

.app-logo {
    width: 140px;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 10%;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

.wave-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
}

.wave-decoration svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.wave-decoration .shape-fill {
    fill: #ffffff;
}

/* --- SISI KANAN (FORM LOGIN) --- */
.form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: var(--surface-color);
    position: relative;
}

.form-header {
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- COMPONENTS (Shared) --- */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid transparent;
    background-color: var(--input-bg);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    background-color: white;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(0, 168, 204, 0.1);
}

.input-group i.icon-left {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-dark);
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-group input:focus ~ .icon-left {
    color: var(--primary-light);
}

.toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    background: none;
    border: none;
}

.toggle-password:hover {
    color: var(--primary-dark);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 78, 146, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 78, 146, 0.4);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.forgot-pass {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* --- TOAST NOTIFICATION --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-color: #2ecc71; }
.toast.error   { border-color: #e74c3c; }
.toast i       { font-size: 1.2rem; }
.toast.success i { color: #2ecc71; }
.toast.error i   { color: #e74c3c; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE LOGIN --- */
@media (max-width: 900px) {
    .brand-section { display: none; }
    .form-section  { padding: 40px 20px; }
    body           { height: auto; align-items: flex-start; background: white; }
    .login-wrapper { height: 100vh; overflow-y: auto; }
}

/* --- HELPER CLASSES --- */
.bg-light-primary  { background-color: #e3f2fd; color: #0d47a1; }
.bg-light-warning  { background-color: #fff3e0; color: #ef6c00; }
.bg-light-success  { background-color: #e8f5e9; color: #1b5e20; }
.bg-light-danger   { background-color: #ffebee; color: #b71c1c; }
.bg-light-info     { background-color: #e1f5fe; color: #01579b; }

.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}
.badge-soft-success { color: #198754; background-color: #d1e7dd; }
.badge-soft-warning { color: #ffc107; background-color: #fff3cd; }
.badge-soft-danger  { color: #dc3545; background-color: #f8d7da; }

.ls-1 { letter-spacing: 1px; }
