/* RDI theme untuk halaman auth (login / register / forgot-password).
   Login memakai gaya UI Webmail-RDI (dua kolom, latar terang, kartu putih, tombol biru solid).
   Aturan .login-card/.reg-card/.tg-btn tetap dipakai halaman register & forgot-password.
   Rollback: pulihkan dari /root/backup/panel-login-webmail-*. */

:root {
   --navy: #12274B !important;
   --blue: #2563EB !important;
   --sky: #2563EB !important;
   --cyan: #2563EB !important;
   --ink: #0F172A !important;
   --line: #DCE5F6 !important;
}

/* Reset dasar (halaman auth tidak memakai reset lain): tanpa ini padding menambah tinggi input */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body.sx-login h1, body.sx-login p { margin: 0; }

/* Latar bersih (hanya warna dasar, tanpa gradasi) */
body.sx-login {
   position: relative;
   overflow: hidden;
   background: #F4F7FC !important;
}

/* Dekorasi 1: pola sarang lebah (hexagon) samar di seluruh latar */
body.sx-login::before {
   content: "" !important;
   display: block !important;
   position: fixed;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='96' viewBox='0 0 112 96'%3E%3Cg fill='none' stroke='%232563EB' stroke-opacity='.16' stroke-width='1.4'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z'/%3E%3Cpath d='M84 0 L112 16 L112 48 L84 64 L56 48 L56 16 Z'/%3E%3Cpath d='M56 48 L84 64 L84 96 L56 112 L28 96 L28 64 Z'/%3E%3C/g%3E%3C/svg%3E");
   background-size: 112px 96px;
   -webkit-mask-image: radial-gradient(115% 95% at 50% 45%, transparent 30%, #000 82%);
   mask-image: radial-gradient(115% 95% at 50% 45%, transparent 30%, #000 82%);
}

/* Dekorasi 2: lingkaran konsentris besar di dua sudut */
body.sx-login::after {
   content: "" !important;
   display: block !important;
   position: fixed;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   background-image:
      radial-gradient(circle at 0% 0%, transparent 118px, rgba(37, 99, 235, .30) 119px, rgba(37, 99, 235, .30) 121px, transparent 122px),
      radial-gradient(circle at 0% 0%, transparent 176px, rgba(37, 99, 235, .22) 177px, rgba(37, 99, 235, .22) 179px, transparent 180px),
      radial-gradient(circle at 0% 0%, transparent 234px, rgba(37, 99, 235, .15) 235px, rgba(37, 99, 235, .15) 237px, transparent 238px),
      radial-gradient(circle at 100% 100%, transparent 150px, rgba(96, 165, 250, .34) 151px, rgba(96, 165, 250, .34) 153px, transparent 154px),
      radial-gradient(circle at 100% 100%, transparent 216px, rgba(96, 165, 250, .24) 217px, rgba(96, 165, 250, .24) 219px, transparent 220px),
      radial-gradient(circle at 100% 100%, transparent 282px, rgba(96, 165, 250, .16) 283px, rgba(96, 165, 250, .16) 285px, transparent 286px);
   background-repeat: no-repeat;
}

/* Konten di atas dekorasi */
body.sx-login .sx-main,
body.sx-login .sx-foot { position: relative; z-index: 1; }

/* ---------------- LOGIN (dua kolom, gaya webmail) ---------------- */
body.sx-login {
   display: flex !important;
   flex-direction: column !important;
   min-height: 100vh !important;
   height: auto !important;
   align-items: stretch !important;
   justify-content: flex-start !important;
   padding: 0 !important;
   overflow-x: hidden !important;
   color: #0F172A;
   font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
   font-size: 15px;
   line-height: 1.55;
   -webkit-font-smoothing: antialiased;
}

body.sx-login .sx-main {
   flex: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 24px 0;
}

body.sx-login .sx-grid {
   width: 100%;
   max-width: 480px;
   margin: 0 auto;
   padding: 0 20px;
   display: block;
}

body.sx-login .sx-card {
   order: 1;
   background: #fff;
   border: 1px solid #E3EAF6;
   border-radius: 20px;
   padding: 32px;
   box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 44px rgba(15, 23, 42, .12), 0 34px 80px rgba(15, 23, 42, .06);
}

body.sx-login .sx-intro { order: 2; }

body.sx-login .sx-eyebrow {
   display: block;
   font-size: clamp(26px, calc(5.65vw - 28px), 46px);
   line-height: 1.1;
   font-weight: 800;
   letter-spacing: 0;
   color: #2563EB;
   margin: 0 0 4px;
}

body.sx-login .sx-intro h1 {
   display: block;
   font-size: clamp(26px, calc(5.65vw - 28px), 46px);
   line-height: 1.1;
   font-weight: 800;
   letter-spacing: -.02em;
   color: #173B68;
   margin: 0;
}

/* Logo + teks brand di sisi kanan */
body.sx-login .sx-intro-brand {
   display: flex;
   align-items: center;
   gap: 16px;
}
body.sx-login .sx-intro-mark {
   display: block;
   width: 132px;
   height: auto;
   flex: 0 0 132px;
}
body.sx-login .sx-intro-text { line-height: 1.12; }
body.sx-login .sx-intro-text .t1 {
   display: block;
   font-weight: 800;
   font-size: 26px;
   letter-spacing: -.02em;
   color: #0F172A;
   white-space: nowrap;
}
body.sx-login .sx-intro-text .t2 {
   display: block;
   font-weight: 700;
   font-size: 17px;
   letter-spacing: 0;
   color: #173B68;
   margin-top: 4px;
   white-space: nowrap;
}

body.sx-login .sx-lead {
   margin: 34px 0 0;
   font-size: clamp(17px, calc(3.4vw - 17px), 28px);
   line-height: 1.25;
   font-weight: 700;
   letter-spacing: -.01em;
   color: #173B68;
}

/* Logo chip di dalam kartu — tampil di semua ukuran */
.auth-logo {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 12px;
   margin: 0 0 22px;
}
.auth-logo .rdi-logo-chip {
   flex: 0 0 auto;
   height: 54px;
   padding: 0;
   border-radius: 0;
   background: none;
   border: 0;
   display: flex; align-items: center; justify-content: center;
   box-shadow: none;
}
.auth-logo .rdi-logo-chip img { height: 38px; width: auto; display: block; }
.auth-logo .logo-text { display: inline-block; text-align: left; line-height: 1.15; }
.auth-logo .logo-text .t1 { display: block; white-space: nowrap; font-weight: 800; font-size: 20px; color: #12274B; letter-spacing: .2px; }
.auth-logo .logo-text .t2 { display: inline-block; white-space: nowrap; font-weight: 700; font-size: 12.5px; color: #5B6C83; letter-spacing: 0; text-transform: uppercase; margin-top: 3px; }

/* Grup input: ikon menempel di kiri, satu kesatuan */
body.sx-login .sx-group {
   display: flex;
   margin-bottom: 20px;
   border-radius: 8px;
}
body.sx-login .sx-ic {
   flex: 0 0 45px;
   height: 44px;
   display: grid;
   place-items: center;
   background: #F0F4FA;
   color: #5B6C83;
   border: 1px solid #CED4DA;
   border-right: 0;
   border-radius: 8px 0 0 8px;
}
body.sx-login .sx-group input {
   flex: 1;
   min-width: 0;
   height: 44px;
   border: 1px solid #CED4DA;
   border-radius: 0 8px 8px 0;
   padding: 6px 13px;
   font-family: inherit;
   font-size: 16px;
   font-weight: 400;
   color: #0F172A;
   background: #fff;
}
body.sx-login .sx-group input::placeholder { color: #A0AEC0; font-size: 14px; }
body.sx-login .sx-group:focus-within { box-shadow: 0 0 0 2.6px rgba(37, 99, 235, .25); }
body.sx-login .sx-group input:focus { outline: 0; border-color: #2563EB; }
body.sx-login .sx-group:focus-within .sx-ic { border-color: #2563EB; color: #2563EB; }

/* Kolom password: tombol mata menempel di dalam input */
body.sx-login .sx-pw { position: relative; }
body.sx-login .sx-pw input { padding-right: 48px; }
body.sx-login .sx-eye {
   position: absolute;
   right: 5px;
   top: 50%;
   transform: translateY(-50%);
   width: 34px;
   height: 34px;
   display: grid;
   place-items: center;
   border: 0;
   border-radius: 7px;
   background: transparent;
   color: #94A3B8;
   cursor: pointer;
   z-index: 2;
   transition: color .18s, background .18s;
}
body.sx-login .sx-eye:hover { color: #2563EB; background: #EEF4FF; }
body.sx-login .sx-eye[aria-pressed="true"] { color: #2563EB; }
.toggle-icon { display: block; }
.toggle-icon svg { display: block; }

/* Opsi: remember + badge TLS */
body.sx-login .form-options {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin: 4px 0 22px;
   flex-wrap: wrap;
   gap: 12px;
}
body.sx-login .remember-wrapper { display: inline-flex; align-items: center; cursor: pointer; }
body.sx-login .remember-wrapper input[type="checkbox"] { display: none; }
body.sx-login .checkbox-label {
   display: inline-flex; align-items: center; gap: 9px;
   color: #475569; font-size: 13.5px; font-weight: 500;
   cursor: pointer; user-select: none; transition: color .2s;
}
body.sx-login .checkbox-custom {
   width: 17px; height: 17px; flex-shrink: 0;
   border: 1.5px solid #CBD5E1; border-radius: 5px; background: #fff;
   display: flex; align-items: center; justify-content: center; transition: all .2s;
}
body.sx-login .remember-wrapper input[type="checkbox"]:checked + .checkbox-label .checkbox-custom {
   background: #2563EB; border-color: #2563EB;
}
body.sx-login .remember-wrapper input[type="checkbox"]:checked + .checkbox-label .checkbox-custom::after {
   content: ""; width: 4px; height: 8px;
   border: solid #fff; border-width: 0 2px 2px 0;
   transform: rotate(45deg) translate(-0.5px, -1px);
}
body.sx-login .remember-wrapper:hover .checkbox-label { color: #2563EB; }
body.sx-login .auth-badge {
   font-size: 11px; font-weight: 500; color: #64748B;
   display: inline-flex; align-items: center; gap: 4px;
   letter-spacing: .02em; text-transform: uppercase;
}

/* Tombol utama: biru solid, sama seperti webmail */
body.sx-login .sx-btn {
   position: relative;
   width: 100%;
   height: 46px;
   border: 1px solid #2563EB;
   border-radius: 10px;
   background: #2563EB;
   color: #fff;
   font-family: inherit;
   font-size: 15px;
   font-weight: 600;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   transition: background .18s, border-color .18s;
}
body.sx-login .sx-btn:hover,
body.sx-login .sx-btn:active { background: #1D4FD8; border-color: #1D4FD8; }
body.sx-login .btn-arrow { transition: transform .2s ease; }
body.sx-login .sx-btn:hover .btn-arrow { transform: translateX(3px); }
body.sx-login .btn-loader {
   position: absolute; top: 50%; left: 50%;
   width: 18px; height: 18px; opacity: 0;
   border: 2px solid rgba(255, 255, 255, .3);
   border-top-color: #fff; border-radius: 50%;
   transform: translate(-50%, -50%);
   animation: sxspin .8s linear infinite;
   transition: opacity .2s;
}
@keyframes sxspin {
   0% { transform: translate(-50%, -50%) rotate(0deg); }
   100% { transform: translate(-50%, -50%) rotate(360deg); }
}
body.sx-login .sx-btn.loading { pointer-events: none; }
body.sx-login .sx-btn.loading .btn-text,
body.sx-login .sx-btn.loading .btn-arrow { opacity: 0; }
body.sx-login .sx-btn.loading .btn-loader { opacity: 1; }

/* Tautan bawah kartu */
body.sx-login .card-sublinks {
   display: flex; align-items: center; justify-content: space-between;
   margin-top: 20px; padding-top: 16px;
   border-top: 1px solid #E8EEF6;
   font-size: 13px; font-weight: 500;
}
body.sx-login .card-sublinks a {
   color: #64748B; text-decoration: none;
   display: inline-flex; align-items: center; gap: 5px;
   transition: color .18s ease;
}
body.sx-login .card-sublinks a:hover { color: #2563EB; text-decoration: underline; }
body.sx-login .card-sublinks a.link-register { color: #2563EB; font-weight: 600; }
body.sx-login .card-sublinks a.link-forgot { color: #DC2626; }
body.sx-login .card-sublinks a.link-forgot:hover { color: #B91C1C; }
body.sx-login .card-sublinks .sublink-dot { width: 4px; height: 4px; border-radius: 50%; background: #CBD5E1; }

/* Pesan error */
body.sx-login .error-message {
   margin: 0 0 18px;
   padding: 11px 13px;
   background: #FEF2F2;
   border: 1px solid #FECACA;
   border-left: 4px solid #DC2626;
   border-radius: 8px;
   color: #DC2626;
   font-size: 13px;
   font-weight: 500;
   line-height: 1.5;
}
body.sx-login .has-error .sx-group input { border-color: #DC2626; background: #FFFBFB; }
body.sx-login .has-error .sx-group .sx-ic { border-color: #DC2626; color: #DC2626; }

/* Footer di bawah */
body.sx-login .sx-foot {
   height: auto;
   padding: 0 0 26px;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   font-size: 11px;
   color: #5B6C83;
   text-align: center;
}
body.sx-login .sx-dot { width: 4px; height: 4px; border-radius: 50%; background: #5B6C83; opacity: .6; }

@media (max-width: 900px) {
   body.sx-login .sx-grid { grid-template-columns: 1fr; gap: 28px; max-width: 480px; }
   body.sx-login .sx-card { order: 1; }
   body.sx-login .sx-intro { display: none; }
   /* Mobile: blok kanan hilang, logo + brand tetap di dalam kartu */
   body.sx-login .auth-logo { display: flex; }
}
@media (max-width: 480px) {
   body.sx-login .sx-card { padding: 24px 20px; }
}

/* ---------------- Halaman register & forgot-password (tetap seperti sebelumnya) ---------------- */
.login-card, .reg-card {
   border-radius: 26px !important;
   box-shadow: 0 24px 60px rgba(12, 20, 90, .16) !important;
   border: 1px solid #E8EEF6 !important;
}
.login-btn, .tg-btn {
   background: #2563EB !important;
   border: 1px solid #2563EB !important;
   box-shadow: 0 8px 20px rgba(37, 99, 235, .22) !important;
   border-radius: 12px !important;
}
.login-btn:hover, .tg-btn:hover { background: #1D4FD8 !important; border-color: #1D4FD8 !important; }
input:focus { border-color: #2563EB !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14) !important; }
a { color: #2563EB; }
/* latar terang: teks footer di bawah kartu dibuat gelap agar terbaca */
.foot { color: #5E7190 !important; }
.foot b { color: #12274B !important; }
