/* KOCI Home (welcome) — Modern Telegram / Wondr-inspired Mobile UI */

.welcome-page {
    --f7-navbar-height: 54px;
}

.welcome-page .page-content {
    overflow-x: hidden;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 110px;
}

/* Top Navbar */
.welcome-navbar,
.welcome-navbar::before {
    background: #001119 !important;
}

.welcome-navbar {
    height: calc(var(--f7-navbar-height) + var(--f7-safe-area-top)) !important;
    margin-bottom: 6px;
}

.welcome-navbar .navbar-inner {
    height: var(--f7-navbar-height) !important;
    min-height: var(--f7-navbar-height) !important;
    background: #001119;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    box-sizing: border-box;
}

.searchbar.searchbar-inline.welcome-searchbar {
    flex: 1;
    margin: 0 !important;
    min-width: 0;
    height: 36px !important;
}

.welcome-searchbar .searchbar-inner {
    height: 36px !important;
    padding: 0 !important;
}

.welcome-searchbar .searchbar-input-wrap {
    height: 36px !important;
}

.welcome-searchbar .searchbar-input-wrap input[type="search"] {
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    font-size: 13.5px;
    padding-left: 36px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.welcome-searchbar .searchbar-input-wrap input[type="search"]:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 59, 48, 0.55);
}

.welcome-nav-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
    height: 36px;
}

.welcome-navbar a.welcome-mode-pill,
.welcome-navbar a.welcome-member-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px !important;
    line-height: 1 !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-sizing: border-box;
}

.welcome-navbar a.welcome-mode-pill {
    background: rgba(255, 59, 48, 0.14);
    border: 1px solid rgba(255, 59, 48, 0.35);
}

.welcome-navbar a.welcome-mode-pill i {
    color: #ff3b30;
    font-size: 14px;
    line-height: 1;
}

.welcome-navbar a.welcome-member-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.15s ease, background 0.2s ease;
}

.welcome-navbar a.welcome-member-pill:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.14);
}

.welcome-navbar a.welcome-guest-btn {
    width: 36px !important;
    height: 36px !important;
    line-height: 1 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    box-sizing: border-box;
}

.welcome-navbar a.welcome-guest-btn i {
    font-size: 18px;
    line-height: 1;
}

/* Hero Carousel */
.welcome-hero-wrap {
    padding: 0 16px 2px;
}

.welcome-hero-swiper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-photo {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    object-fit: cover;
}

/* Running Text Info Banner */
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.running-text-banner {
    display: flex;
    align-items: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 14px;
    padding: 10px 14px;
    margin: 8px 16px 12px;
    gap: 10px;
    overflow: hidden;
}

.running-text-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ff453a;
    font-weight: 700;
    font-size: 11.5px;
    flex-shrink: 0;
    padding-right: 10px;
    border-right: 1px solid rgba(239, 68, 68, 0.28);
    letter-spacing: 0.5px;
}

.running-text-content {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
}

.running-text-scroll {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marqueeScroll 22s linear infinite;
    font-size: 13px;
    color: #f8fafc;
    font-weight: 500;
}

/* Section Headers */
.welcome-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0 16px;
    margin: 22px 0 12px;
}

.welcome-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.welcome-section-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
}

/* Program Grid (Wondr / Telegram Card Style) */
.welcome-programs-wrap {
    padding: 0 16px;
    margin-bottom: 72px;
}

.welcome-programs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.program-card-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 9px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: none;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.program-card-item:active {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.98);
}

.program-card-item:active .program-icon-box {
    transform: scale(0.95);
}

.program-card-item.disabled-program {
    opacity: 0.65;
}

.program-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    box-sizing: border-box;
}

.program-icon-box img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.program-card-meta {
    min-width: 0;
    flex: 1;
}

.program-card-title {
    font-weight: 600;
    font-size: 11px;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-card-desc {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-empty-state {
    display: none;
    text-align: center;
    padding: 28px 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

/* About KOCI Banner (Full-Width Red + Layered Faded Illustration) */
.welcome-about-card {
    position: relative;
    overflow: hidden;
    margin: 22px 0 0;
    border-radius: 0;
    padding: 18px 16px;
    background: #ff3b30;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
}

.welcome-about-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.welcome-about-body {
    flex: 1;
    min-width: 0;
    padding-right: 24%;
}

.welcome-about-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.welcome-about-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.25;
}

.welcome-about-text {
    color: rgba(255, 255, 255, 0.94);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.welcome-about-illustration {
    position: absolute;
    right: -6px;
    top: 6px;
    bottom: 0;
    width: 60%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.welcome-about-illustration img {
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: right bottom;
    display: block;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0.35) 65%, rgba(0, 0, 0, 0.04) 100%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0.35) 65%, rgba(0, 0, 0, 0.04) 100%);
}

.welcome-about-btn {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.15s ease;
}

.welcome-about-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.32);
}

/* Footer */
.welcome-footer {
    text-align: center;
    padding: 26px 16px 12px;
}

.welcome-footer p {
    font-size: 13px;
    color: var(--f7-list-item-footer-text-color, #8e8e93);
    margin: 0;
}

.welcome-footer strong {
    letter-spacing: 1px;
    color: #ff3b30;
}

/* Modal Force Change Password */
.force-password-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.force-password-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 10, 18, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.force-password-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: linear-gradient(165deg, rgba(16, 28, 44, 0.95) 0%, rgba(8, 16, 26, 0.98) 100%);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 24px;
    padding: 28px 22px 20px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(239, 68, 68, 0.2);
    animation: modalBounceIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
}

@keyframes modalBounceIn {
    from { opacity: 0; transform: scale(0.88) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.security-badge-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-shield-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.4) 100%);
    border: 1.5px solid rgba(239, 68, 68, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 32px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

.security-pulse-ring {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.5);
    animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: 1;
}

@keyframes pulseRing {
    0% { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.security-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.force-password-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.force-password-subtitle {
    margin: 0 0 18px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #94a3b8;
}

.force-password-subtitle strong {
    color: #f87171;
}

.input-modern-group {
    text-align: left;
}

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

.input-modern-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-modern {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 14px;
    color: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.input-modern:focus {
    border-color: #ef4444;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    outline: none;
}

.input-hint {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
}

.input-hint.error { color: #ef4444; }
.input-hint.success { color: #22c55e; }

.btn-submit-force {
    margin-top: 16px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transition: all 0.2s ease;
}

.btn-submit-force:hover {
    opacity: 0.95;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-submit-force:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.force-password-alert {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 14px;
    text-align: left;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.force-password-footer {
    margin-top: 14px;
}

.btn-dismiss-modal {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-dismiss-modal:hover {
    color: #cbd5e1;
}
