   :root {
    --primary: #1a5f7a;
    --primary-dark: #134a5e;
    --accent: #f4a261;
    --accent-dark: #e76f51;
    --success: #28a745;
    --error: #dc3545;
    --warning: #f59e0b;
    --text-dark: #2d3e50;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --bg-light: #f8f9fa;
    --gradient-start: #a8d8ea;
    --gradient-end: #d4f1f4;
}

/* Tambah di paling atas CSS, tepat setelah * { ... } */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
}

/* Disable animasi circles di mobile */
@media (max-width: 767px) {
    body::before,
    body::after {
        animation: none;
        opacity: 0.3; /* Tetap ada tapi static */
    }
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Circles - Responsive */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

.container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.auth-panel {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(26, 95, 122, 0.15);
    overflow: hidden;
    animation: slideUp 0.6s ease;
    width: 100%;
}

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

.auth-box {
    padding: clamp(25px, 5vw, 40px) clamp(20px, 4vw, 35px);
}

/* Modern Logo - Responsive */
.logo {
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 30px);
}

.logo-icon {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    background: var(--accent);
    border-radius: clamp(15px, 3vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, 2vw, 15px);
    box-shadow: 0 8px 20px rgba(26, 95, 122, 0.25);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.logo-icon svg {
    width: clamp(30px, 7vw, 40px);
    height: clamp(30px, 7vw, 40px);
    fill: white;
}

.logo-text {
    font-size: clamp(22px, 5vw, 28px);
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.logo-text .go {
    color: var(--accent);
}

.logo-img{
  width: clamp(30px, 7vw, 40px);
  height: clamp(30px, 7vw, 40px);
  object-fit: contain;
  display: block;
}


/* Modern Tab Switcher - Responsive */
.tab-switcher {
    display: flex;
    background: var(--bg-light);
    border-radius: clamp(10px, 2vw, 12px);
    padding: 4px;
    margin-bottom: clamp(20px, 4vw, 30px);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: clamp(10px, 2vw, 12px) clamp(15px, 3vw, 20px);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 600;
    border-radius: clamp(8px, 1.5vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn:hover:not(.active) {
    color: var(--primary);
}

/* Alert Box - Responsive */
.alert {
    padding: clamp(12px, 2vw, 14px) clamp(14px, 3vw, 18px);
    border-radius: clamp(10px, 2vw, 12px);
    margin-bottom: clamp(15px, 3vw, 20px);
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.4s ease;
    word-break: break-word;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.show {
    display: flex;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1 {
    font-size: clamp(20px, 4.5vw, 26px);
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: clamp(20px, 4vw, 25px);
    font-size: clamp(13px, 2.5vw, 15px);
    line-height: 1.4;
}

/* Form Styles - Responsive */
.form-group {
    margin-bottom: clamp(16px, 3vw, 20px);
}

label {
    display: block;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: clamp(6px, 1.5vw, 8px);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: clamp(12px, 2.5vw, 14px) clamp(14px, 3vw, 16px);
    border: 2px solid var(--border);
    border-radius: clamp(10px, 2vw, 12px);
    font-size: clamp(14px, 2.5vw, 15px);
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 95, 122, 0.1);
}

input.error {
    border-color: var(--error);
}

input.error:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    -webkit-tap-highlight-color: transparent;
}

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

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.error-message {
    color: var(--error);
    font-size: clamp(12px, 2vw, 13px);
    margin-top: 6px;
    display: none;
    line-height: 1.4;
}

.error-message.show {
    display: block;
}

/* Form Footer - Responsive */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(18px, 3.5vw, 24px);
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-wrapper label {
    margin: 0;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 500;
    cursor: pointer;
    color: var(--text-dark);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: clamp(13px, 2.5vw, 14px);
    font-weight: 600;
    transition: color 0.3s;
    white-space: nowrap;
}

.forgot-link:hover {
    color: var(--accent);
}

/* Primary Button - Responsive */
.btn-primary {
    width: 100%;
    padding: clamp(14px, 3vw, 16px);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: clamp(10px, 2vw, 12px);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 95, 122, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 122, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.spinner.show {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password Strength Meter - Responsive */
.password-strength {
    margin-top: 10px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: clamp(5px, 1vw, 6px);
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.4s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--error);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: clamp(12px, 2vw, 13px);
    font-weight: 500;
}

/* Back to Home - Responsive */
.back-to-home {
    margin-top: clamp(16px, 3vw, 20px);
    text-align: center;
}

.home-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: clamp(13px, 2.5vw, 14px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.home-link:hover {
    color: var(--primary);
    gap: 10px;
}

.home-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Terms Text - Responsive */
.terms-text {
    margin-top: clamp(16px, 3vw, 20px);
    font-size: clamp(12px, 2vw, 13px);
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

.terms-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.terms-text a:hover {
    color: var(--accent);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Small Mobile (< 360px) */
@media (max-width: 359px) {
    body {
        padding: 10px;
    }

    .auth-box {
        padding: 20px 15px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .logo-text {
        font-size: 20px;
    }

    h1 {
        font-size: 18px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 14px;
        padding: 11px 13px;
    }

    body::before,
    body::after {
        width: 250px;
        height: 250px;
    }
}

/* Mobile (360px - 767px) */
@media (min-width: 360px) and (max-width: 767px) {
    .container {
        max-width: 100%;
    }

    .auth-box {
        padding: 30px 25px;
    }

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .forgot-link {
        align-self: flex-end;
        margin-top: -8px;
    }

    body::before {
        width: 350px;
        height: 350px;
        top: -15%;
        right: -20%;
    }

    body::after {
        width: 300px;
        height: 300px;
        bottom: -10%;
        left: -15%;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 480px;
    }

    body {
        padding: 30px;
    }

    .auth-box {
        padding: 40px 35px;
    }

    body::before {
        width: 450px;
        height: 450px;
    }

    body::after {
        width: 380px;
        height: 380px;
    }
}

/* Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 480px;
    }

    body {
        padding: 40px;
    }

    body::before {
        width: 500px;
        height: 500px;
    }

    body::after {
        width: 400px;
        height: 400px;
    }
}

/* Large Desktop (≥ 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 500px;
    }

    body {
        padding: 50px;
    }

    .auth-box {
        padding: 45px 40px;
    }

    body::before {
        width: 600px;
        height: 600px;
    }

    body::after {
        width: 500px;
        height: 500px;
    }
}

/* Landscape Orientation Fix */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 20px 15px;
        align-items: flex-start;
    }

    .container {
        margin: 20px auto;
    }

    .auth-box {
        padding: 25px 30px;
    }

    .logo {
        margin-bottom: 15px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 20px;
    }

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

    body::before,
    body::after {
        display: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .auth-panel {
        box-shadow: 0 20px 60px rgba(26, 95, 122, 0.2);
    }

    .logo-icon {
        box-shadow: 0 10px 25px rgba(26, 95, 122, 0.3);
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment if you want dark mode support */
    /*
    body {
        background: linear-gradient(135deg, #1a2332 0%, #0f1419 100%);
    }
    
    .auth-panel {
        background: #1e293b;
    }
    
    h1 {
        color: #e2e8f0;
    }
    
    .subtitle, .terms-text {
        color: #94a3b8;
    }
    
    input {
        background: #0f172a;
        color: #e2e8f0;
        border-color: #334155;
    }
    */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .tab-btn {
        min-height: 44px;
    }

    .password-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .btn-primary {
        min-height: 48px;
    }

    input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
}

/* Print Styles */
@media print {
    body::before,
    body::after {
        display: none;
    }

    .auth-panel {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}