/* ==========================================================================
   KAMPOENG DIGITAL - ELEGANT WHITE HOTSPOT THEME
   Modern, Clean, Ultra-Fast & Responsive Hotspot Template
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    min-height: 100%;
    width: 100%;
}

body {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 100% 0%, rgba(43, 53, 175, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 50%, #ffffff 0px, #f1f5f9 100%);
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Wrapper */
.page-wrapper, .main, .ie-fixMinHeight {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Card Container */
.card-container, .wrap {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px -15px rgba(15, 23, 42, 0.06),
        0 0 1px 1px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.85);
    padding: 28px 24px;
    box-sizing: border-box;
    animation: fadeIn 0.35s ease-out;
}

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

/* Header & Logo */
.card-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-box {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.portal-title, h1 {
    font-size: 19px !important;
    font-weight: 600 !important;
    color: #2b35af !important;
    text-align: center;
    margin: 0 0 6px 0 !important;
    letter-spacing: -0.2px;
}

.portal-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    margin: 0;
    line-height: 1.45;
}

/* Alerts & Notifications */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: left;
}

.alert-danger, .info.alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #ef4444;
}

.alert-content {
    flex: 1;
}

.trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #1e40af;
}

.trial-btn {
    background: #2563eb;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 11.5px;
    padding: 5px 12px;
    border-radius: 7px;
    text-decoration: none;
    transition: background 0.2s;
}

.trial-btn:hover {
    background: #1d4ed8;
}

/* Tabs */
.login-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 18px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #ffffff;
    color: #2b35af;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Forms & Inputs */
.login-form {
    width: 100%;
}

.input-group {
    margin-bottom: 14px;
    text-align: left;
}

.input-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #2b35af;
}

.input-wrapper input, 
input[type="text"], 
input[type="password"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px 0 44px !important;
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px !important;
    font-size: 14.5px !important;
    color: #0f172a !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.input-wrapper input:hover,
input[type="text"]:hover,
input[type="password"]:hover {
    border-color: #94a3b8 !important;
}

.input-wrapper input:focus,
input[type="text"]:focus, 
input[type="password"]:focus {
    background: #ffffff !important;
    border: 2px solid #2b35af !important;
    box-shadow: 0 0 0 3.5px rgba(43, 53, 175, 0.15) !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #475569;
}

/* Primary Button - Orange Theme */
.btn-connect, 
input[type="submit"] {
    width: 100% !important;
    height: 46px !important;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 11px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
    transition: all 0.2s ease;
    margin-top: 6px;
    text-decoration: none;
    line-height: 46px;
}

.btn-connect:hover, 
input[type="submit"]:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.38);
    transform: translateY(-1px);
}

.btn-connect:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* Divider */
.action-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
}

.action-divider::before,
.action-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.action-divider span {
    padding: 0 10px;
    color: #94a3b8;
    font-size: 11.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Secondary Button - Buy Voucher */
.btn-buy-voucher, .btn-submit {
    width: 100%;
    height: 44px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    line-height: 44px;
}

.btn-buy-icon {
    display: flex;
    align-items: center;
    color: #f97316;
}

.btn-buy-voucher:hover, .btn-submit:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #2b35af;
}

.counter-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

.counter-notice svg {
    color: #3b82f6;
    flex-shrink: 0;
}

/* Customer Support Card */
.support-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin: 16px 0 14px 0;
    text-align: center;
}

.support-header {
    margin-bottom: 10px;
}

.support-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.support-actions {
    display: flex;
    gap: 8px;
}

.btn-support {
    flex: 1;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-wa {
    background: #25d366;
    color: #ffffff !important;
}

.btn-wa:hover {
    background: #20ba59;
}

.btn-phone {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155 !important;
}

.btn-phone:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.support-tel-landline {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 8px;
}

.support-tel-landline a {
    color: #2b35af;
    text-decoration: none;
    font-weight: 600;
}

/* Network Info Section */
.network-info {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 11.5px;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    margin-top: 2px;
}

.info-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
}

/* Table Style for Status / Logout Pages */
table, .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

table td, .table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

table tr:last-child td, .table tr:last-child td {
    border-bottom: none;
}

table td:first-child, .table td:first-child {
    font-weight: 600;
    color: #64748b;
    width: 45%;
}

table td:last-child, .table td:last-child {
    font-weight: 600;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Footer / Legal ISP Info */
.card-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.footer-link {
    display: block;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.footer-link strong {
    display: block;
    color: #1e293b;
    font-size: 12px;
    margin-bottom: 2px;
}

.footer-link .license {
    display: block;
    color: #94a3b8;
    font-size: 10.5px;
}

.footer-link:hover strong {
    color: #2b35af;
}

/* Legacy Dark / Lite Overrides for backward compatibility */
body.dark, body.lite {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

body.dark .wrap, body.lite .wrap {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
}

body.dark a, body.lite a {
    color: #2b35af;
}

body.dark h1, body.lite h1 {
    color: #2b35af !important;
}

body.dark .info, body.lite .info {
    color: #64748b;
}

body.dark input[type="text"], 
body.dark input[type="password"] {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #cbd5e1 !important;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .page-wrapper, .main {
        padding: 16px 12px;
    }
    
    .card-container, .wrap {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .portal-title, h1 {
        font-size: 17px !important;
    }
    
    .logo {
        max-width: 190px;
    }
}
