* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}
.loan-rule-section {
    width: 100%;
    max-width: 700px;
    margin: 30px auto;
    font-family: "Arial", sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 20px;
}

.rule-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.loan-rule-section table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.loan-rule-section thead th {
    background-color: #6a5af9; /* purple header */
    color: #fff;
    font-weight: bold;
    padding: 12px 0;
    font-size: 14px;
}

.loan-rule-section tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.loan-rule-section tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

.loan-rule-section tbody td {
    padding: 10px 0;
    font-size: 13px;
    color: #333;
}

.rule-note {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
    position: relative;
}

.menu-icon {
    margin-right: 10px;
    font-size: 18px;
}

.menu-text {
    flex: 1; /* take remaining space */
}

.menu-arrow {
    margin-left: auto;
}

.loan-rule-section {
    padding: 16px;
    background: #ffffff;
}

.rule-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.loan-rule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
}

.loan-rule-table thead th {
    background: #50698f;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.loan-rule-table tbody td {
    background: #d2e7ff;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e0ecff;
}

.loan-rule-table tbody tr:last-child td {
    border-bottom: none;
}

.rule-note {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
}


#notif-badge {
    display: inline-block;          /* inline with text */
    margin-right: 177px;               /* space from text */
    margin-top:4px;
    background-color: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 0 12px;
    border-radius: 11px;            /* pill shape */
    min-width: 14px;
    height: 16px;
    line-height: 15px;
    text-align: center;
    vertical-align: middle;
}

.profile-badge {
    position: absolute;
    top: -5px;      /* slightly above the icon */
    right: -5px;    /* slightly to the right */
    background-color: red;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 50%;  /* round badge */
    min-width: 16px;
    text-align: center;
    line-height: 16px;
    display: none;   /* initially hidden */
}


.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    background-color: #f5f5f5;
}

.page.active {
    display: block;
}

/*.page-header {
    background: linear-gradient(135deg, #9aacfb 0%, #885db5 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}*/
.page-header {
    background: linear-gradient(135deg, #9aacfb 0%, #885db5 100%);
    color: white;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    display: flex;
    align-items: center;
    justify-content: center; /* center the title */
    position: relative; /* for absolute positioning of logout link */
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
}

.page-content {
    padding: 15px;
    padding-bottom: 20px;
}

.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-card h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.welcome-card p {
    font-size: 14px;
    color: #666;
}

.feature-grid {
    display: grid;
    gap: 15px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.feature-card:active {
    transform: scale(0.98);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 13px;
    color: #999;
}

.slider-container {
    position: relative;
    width: 100%;
    margin-bottom: 5px;
    /*border-radius: 12px;*/
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-content {
    padding: 0;
}

.page-content > :not(.slider-container) {
    padding: 15px;
}

.slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.partners-section {
    margin-top: 5px;
}

.section-title {
    margin-top: 0;  
    text-align:center;
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}
.section-header {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

.section-title {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.section-subtitle {
    font-size: 12px;
    color: #999;        /* grey color */
    margin-top: 4px;
}
.page-content > .partners-section {
    padding: 3px;   /* No inner padding */
}

/*.partner-card {
    width: 380px;        
    height: auto;
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}*/
.partner-card {
    width: 380px;
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}
.partner-card-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1; 
}

.partner-logo {
    width: 160px;
    height: 100px;
    object-fit: contain;
}

.partner-slogan {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-top: 0;
    width: 100%;
    word-wrap: break-word;
}

.partner-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 30px;
}
/*.partner-deposit {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
    color: #e60000;
}*/

/*.logout-link {
    float: right;
    cursor: pointer;
    color: #f5dfdd;
    font-weight: bold;
    font-size: 16px;
}

.logout-link i {
    margin-right: 5px;
}

.logout-link:hover {
    color: #d32f2f;
}
*/

.logout-link {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #efdddd;
    font-weight: bold;
    font-size: 16px;
}

.logout-link i {
    margin-right: 5px;
}

.logout-link:hover {
    color: #e5d3d3;
}

.partner-deposit span {
    color: #e60000;
}
.loan-btn {
    background: #e0e8ff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.partners-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.partner-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.partner-logo {
    display: flex;
    align-items: center;
}

.partner-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.partner-info {
    font-size: 15px;
    text-align: center;
}

.partner-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.partner-deposit {
    font-size: 16px;
    color: #555;
    font-weight: 600;
    margin-top: 3px;
}


.partner-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.partner-desc {
    font-size: 13px;
    color: #999;
    margin-top: 10px;
    text-align: center;
}

/*.loan-btn {
    width: 40%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    margin-top: 10px; 
}*/

.loan-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.loan-form,
.merchant-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:active {
    opacity: 0.8;
}

.profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.back-arrow {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-size: 18px;
}
.back-arrow:hover {
    opacity: 0.8;
}

.profile-avatar {
    margin-bottom: 15px;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.profile-info h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.profile-info p {
    font-size: 14px;
    opacity: 0.9;
}

.menu-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background-color: #f8f8f8;
}

.menu-icon {
    font-size: 22px;
    margin-right: 15px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.menu-arrow {
    font-size: 20px;
    color: #ccc;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s;
    filter: grayscale(100%);
    opacity: 0.6;
}

.nav-label {
    font-size: 12px;
    color: #999;
    transition: color 0.3s;
}

.nav-item.active .nav-icon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.nav-item.active .nav-label {
    color: #667eea;
    font-weight: 600;
}

.nav-item:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .app-container {
        max-width: 414px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    }
}

