/* Color palette – exactly as original */
:root {
  --primary: #225902;
  --primary-dark: #0a3b0d;
  --primary-light: #4c8c4c;
  --gold: #C5A028;
  --gold-light: #e5d1a3;
  --white: #ffffff;
  --gray-light: #f8f9fa;
  --gray: #e9ecef;
  --text-light: #6c757d;
  --error: #dc3545;
  --error-bg: #fff5f5;
  --google-blue: #4285f4;
  --google-bg: #f1f3f4;
  --tab-hover: #e8f0e8;
}
 
/* ===== MOBILE VIEW ONLY - MAX WIDTH 768px ===== */
@media screen and (max-width: 768px) {

  /* Main Container - Full width */
  .ks-main {
    width: 100%;
    max-width: 100%;
    margin: 0px;
    border-radius: 15px;
    box-shadow: none;
    box-shadow: 0 16px 36px rgba(27, 94, 32, 0.25);
    margin-bottom:10px;
    margin-top:10px;
  }

  /* Split Layout - Right on top, Left at bottom */
  .ks-split {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
  }

  /* ===== RIGHT PANEL - TOP (FORMS, TABS) ===== */
  .ks-right {
    flex: 1 1 auto;
    width: 100%;
    padding: 20px 16px;
    order: 1;
    background: white;
    box-sizing: border-box;
  }

  /* Tabs - Full width fix */
  .ks-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin-bottom: 20px;
    width: 100%;
    background: var(--gray-light);
    border-radius: 40px;
    box-sizing: border-box;
  }

  .ks-tab {
    flex: 1;
    list-style: none;
    min-width: 0; /* Prevents overflow */
  }

  .ks-tab a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 30px;
    color: var(--text-light);
    transition: 0.2s;
    width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .ks-tab a i {
    font-size: 16px;
    color: var(--primary);
  }

  .ks-tab a.ks-active {
    background: var(--primary);
    color: white;
  }
  
  .ks-tab a.ks-active i {
    color: white;
  }

  /* Form Title */
  .ks-title {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-light);
    width: 100%;
  }

  /* Form Fields - Full width */
  .ks-field {
        width: 100%;
        margin-bottom: 10px;
        box-sizing: border-box;
        flex: 1 1 0px;
  }

  .ks-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .ks-label, .ks-label1 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: block;
  }

  /* Input Fields - Full width with proper spacing */
  .ks-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-light);
    border: 1.5px solid var(--gray);
    border-radius: 12px;
    padding: 0 12px;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
  }

  .ks-input1 {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-light);
    border: 1.5px solid var(--gray);
    border-radius: 12px;
    padding: 0 15px;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
  }

  .ks-input i, .ks-input1 i {
    color: var(--primary);
    font-size: 18px;
    min-width: 22px;
  }

  .ks-input input, .ks-input1 input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    height: 46px;
    width: 100%;
    min-width: 0; /* Prevents overflow */
  }

  .ks-input input::placeholder {
    font-size: 13px;
    color: #adb5bd;
  }

  /* Country code and DOB - Fixed width */
  .ks-country, .ks-dob {
    background: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 13px;
    border: 1px solid var(--gray);
    white-space: nowrap;
  }

  .ks-country-code {
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
    border: 1px solid var(--gray);
    white-space: nowrap;
  }

  /* Buttons - Full width */
  .ks-next {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
    transition: 0.2s;
    box-sizing: border-box;
  }

  .ks-signin-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
    box-sizing: border-box;
  }

  /* Google Button - Full width */
  .ks-google, .ks-google1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: #e0efc9;
    border: 1.5px solid #dadce0;
    border-radius: 40px;
    text-decoration: none;
    margin-bottom: 20px;
    box-sizing: border-box;
  }

  .ks-google span, .ks-google1 span {
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
  }

  .ks-google-icon svg, .ks-google1 svg {
    width: 22px;
    height: 22px;
  }

  /* Divider */
  .ks-divider, .ks-divider1 {
    text-align: center;
    position: relative;
    margin: 20px 0;
    width: 100%;
  }

  .ks-divider span, .ks-divider1 span {
    background: white;
    padding: 0 15px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
  }

  .ks-divider::before, .ks-divider::after,
  .ks-divider1::before, .ks-divider1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 45px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }

  /* Links */
  .ks-signin {
    text-align: center;
    margin: 12px 0;
    font-size: 14px;
    color: var(--text-light);
  }
  
  .ks-signin a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
  }

  .ks-forgot {
    text-align: right;
    margin-top: 8px;
    margin-bottom:8px;
  }
  
  .ks-forgot a {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
  }

  .ks-signup-link {
    text-align: center;
    margin-top: 25px;
    width: 100%;
  }
  
  .ks-signup-link p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
  }
  
  .ks-signup-link a {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 3px;
  }

  /* Footer */
  .ks-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 15px;
    width: 100%;
  }
  
  .ks-footer p:first-child {
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
  }

  /* ===== LEFT PANEL - BOTTOM ===== */
  .ks-left {
    flex: 1 1 auto;
    width: 100%;
    min-height: auto;
    padding: 20px 16px;
    order: 2;
    border-radius: 24px 24px 0 0;
    box-sizing: border-box;
  }

  /* Left Panel Content */
  .ks-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
  }

  .ks-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }

  .ks-logo-icon {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    border: 3px solid var(--gold);
    padding: 10px;
    z-index: 15;
    position: relative;
  }

  .ks-logo-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
  }

  .ks-logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    line-height: 1.2;
    margin-top: 5px;
    text-align: center;
  }
  
  .ks-logo-text h1 span {
    color: var(--gold);
    font-size: 24px;
  }

  /* Footer content in left panel */
  .ks-footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .ks-tagline {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
    border-radius: 12px;
    border-left: 4px solid var(--gold);
    width: 100%;
    box-sizing: border-box;
  }
  
  .ks-tagline p {
    font-size: 13px;
    font-weight: 300;
    color: white;
    line-height: 1.4;
  }

  .ks-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .ks-feature-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(197,160,40,0.2);
    width: 100%;
    box-sizing: border-box;
  }

  .ks-quote {
    padding: 10px 12px;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .ks-quote p {
    color: white;
    font-size: 12px;
    line-height: 1.3;
    font-style: italic;
  }

  /* Error Messages */
  .ks-error, .ks-error1 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: 10px;
    padding: 12px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
  }

  .ks-error-item1 {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    color: var(--error);
    font-size: 13px;
  }
  
  .ks-error-item1.green {
    color: var(--primary);
  }
}

/* ===== EXTRA SMALL DEVICES - 480px and below ===== */
@media screen and (max-width: 480px) {
  
  .ks-right {
    padding: 16px 12px;
  }
  
  .ks-left {
    padding: 16px 12px;
  }
  
  .ks-tab a {
    font-size: 13px;
    padding: 8px 2px;
  }
  
  .ks-tab i {
    font-size: 14px;
  }
  
  .ks-input, .ks-input1 {
    height: 44px;
  }
  
  .ks-input input, .ks-input1 input {
    font-size: 14px;
    height: 42px;
  }
  
  .ks-ring-container {
    width: 100px;
    height: 100px;
  }
  
  .ks-logo-icon {
    width: 85px;
    height: 85px;
  }
  
  .ks-logo-icon img {
    width: 65px;
    height: 65px;
  }
  
  .ks-logo-text h1 {
    font-size: 20px;
  }
  
  .ks-logo-text h1 span {
    font-size: 22px;
  }
  
  .ks-feature-card {
    padding: 6px 10px;
  }
  
  .ks-google span, .ks-google1 span {
    font-size: 13px;
  }
}

/* ===== FIX FOR VERY SMALL DEVICES - 360px and below ===== */
@media screen and (max-width: 360px) {
  
  .ks-tab a {
    font-size: 12px;
    white-space: normal;
    line-height: 1.2;
  }
  
  .ks-tab i {
    display: none; /* Hide icons on very small screens */
  }
  
  .ks-ring-container {
    width: 90px;
    height: 90px;
  }
  
  .ks-logo-icon {
    width: 75px;
    height: 75px;
  }
  
  .ks-logo-icon img {
    width: 60px;
    height: 60px;
  }
  
  .ks-logo-text h1 {
    font-size: 18px;
  }
  
  .ks-logo-text h1 span {
    font-size: 20px;
  }
  
  .ks-input i, .ks-input1 i {
    min-width: 18px;
    font-size: 16px;
  }
  
  .ks-country, .ks-dob {
    font-size: 11px;
    padding: 4px 6px;
  }
}

/* ========== TABLET VIEW (portrait & landscape) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    .error-compact1 {
        max-width: 480px;      /* sedikit lebih lebar untuk tablet */
        padding: 12px 18px;
        border-radius: 10px;
    }

    .error-header {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .warning-icon {
        font-size: 22px;
    }

    .error-title {
        font-size: 0.85rem;    /* lebih besar agar nyaman di tablet */
    }

    .error-list {
        gap: 8px;
    }

    .point-item {
        font-size: 0.85rem;
        gap: 8px;
        line-height: 1.45;
    }

    .arrow-icon {
        font-size: 16px;
    }
}

/* ========== MOBILE VIEW (all phones, up to 767px) ========== */
@media (max-width: 767px) {
    .error-compact1 {
        padding: 8px 12px;
        max-width: 92%;
        border-radius: 10px;
    }

    .error-header {
        gap: 6px;
        margin-bottom: 8px;
        padding-bottom: 5px;
    }

    .warning-icon {
        font-size: 18px;
    }

    .error-title {
        font-size: 0.7rem;
        letter-spacing: -0.1px;
    }

    .error-list {
        gap: 6px;
    }

    .point-item {
        font-size: 0.75rem;
        gap: 6px;
        line-height: 1.45;
    }

    .arrow-icon {
        font-size: 13px;
        margin-top: 1px;
    }
}

/* Extra small phones (≤380px) */
@media (max-width: 380px) {
    .error-compact1 {
        padding: 6px 10px;
    }

    .error-title {
        font-size: 0.68rem;
    }

    .point-item {
        font-size: 0.7rem;
        gap: 5px;
    }

    .arrow-icon {
        font-size: 12px;
    }
}

/* Touch-friendly for all mobile/tablet devices */
@media (hover: none) and (pointer: coarse) {
    .point-item {
        padding: 2px 0;
    }
}