/* =============================================
   Scheduler Manage - portal.css
   Frontend customer portal styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;600;700&display=swap');

.swpm_portal_page {
    font-family: 'Lato', sans-serif;
    background: #f0f0f1;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

html:has(#swpm_portal_wrap),
html:has(#swpm_portal_wrap) body {
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

#swpm_portal_wrap {
    font-family: 'Lato', sans-serif;
}

/* ── LOGIN ── */
#swpm_portal_login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f0f0f1;
}

.swpm_portal_box {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 32px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.swpm_portal_logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 20px;
}

.swpm_portal_logo i {
    font-size: 24px;
    color: #F83600;
}

.swpm_portal_title {
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 6px;
}

.swpm_portal_sub {
    font-size: 13px;
    color: #8c8f94;
    margin: 0 0 22px;
}

.swpm_portal_field {
    margin-bottom: 14px;
}

.swpm_portal_field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #50575e;
    margin-bottom: 5px;
}

.swpm_portal_input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.swpm_portal_input:focus { border-color: #F83600; box-shadow: 0 0 0 2px rgba(248,54,0,0.12); }

.swpm_portal_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    text-decoration: none;
}

.swpm_portal_btn_primary {
    background: #F83600;
    color: #ffffff !important;
    border-color: #F83600;
    width: 100%;
    justify-content: center;
    text-decoration: none !important;
}
.swpm_portal_btn_primary:hover { background: #d62e00; border-color: #d62e00; }
.swpm_portal_btn_primary:visited { color: #ffffff !important; }

.swpm_portal_btn_outline {
    background: #ffffff;
    color: #50575e !important;
    border-color: #dcdcde;
    text-decoration: none !important;
}
.swpm_portal_btn_outline:hover {
    background: #f0f0f1;
    border-color: #c3c4c7;
    color: #1d2327 !important;
}
.swpm_portal_btn_outline:hover { background: #f0f0f1; }

.swpm_portal_btn_danger {
    background: #fce8e8;
    color: #d63638;
    border-color: #f5c2c3;
}
.swpm_portal_btn_danger:hover { background: #d63638; color: #fff; }

.swpm_portal_btn_sm { padding: 5px 10px; font-size: 12px; }

.swpm_portal_forgot {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: #8c8f94;
}

.swpm_portal_error {
    background: #fce8e8;
    border: 1px solid #f5c2c3;
    border-radius: 6px;
    color: #d63638;
    font-size: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

/* ── DASHBOARD ── */
.swpm_portal_topbar {
    background: #1d2327;
    color: #f0f0f1;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.swpm_portal_topbar_left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.swpm_portal_topbar_left i { font-size: 20px; color: #F83600; }

.swpm_portal_topbar_right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swpm_portal_content {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}
.swpm_portal_content_docs {
    max-width: none !important;
}

.swpm_portal_plan_card {
    background: linear-gradient(135deg, #F83600 0%, #135e96 100%);
    color: #fff;
    border-radius: 8px;
    padding: 22px 26px;
    margin-bottom: 20px;
}

.swpm_portal_plan_label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.swpm_portal_plan_name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.swpm_portal_plan_price {
    font-size: 30px;
    font-weight: 700;
}

.swpm_portal_plan_renews {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 6px;
}

.swpm_portal_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.swpm_portal_section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.swpm_portal_section_title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #1d2327;
    border-bottom: 1px solid #dcdcde;
    background: #f6f7f7;
}

.swpm_portal_section_title i { color: #F83600; }

.swpm_portal_version_row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
}

.swpm_portal_version_row:last-child { border-bottom: none; }

.swpm_portal_version_num {
    font-weight: 700;
    color: #F83600;
    min-width: 55px;
}

.swpm_portal_version_notes {
    flex: 1;
    color: #50575e;
    font-size: 12px;
}

.swpm_portal_detail_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.swpm_portal_detail_table td {
    padding: 9px 16px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}

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

.swpm_portal_detail_table td:first-child {
    color: #8c8f94;
    font-size: 12px;
    width: 120px;
    font-weight: 600;
}

.swpm_portal_notice {
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 13px;
    margin-top: 16px;
}

.swpm_portal_loading {
    padding: 20px;
    text-align: center;
    color: #8c8f94;
    font-size: 13px;
}

/* badges reused in portal */
.swpm_badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.swpm_badge_green  { background: #e6f4ea; color: #00692b; }
.swpm_badge_red    { background: #fce8e8; color: #d63638; }
.swpm_badge_yellow { background: #fdf6e3; color: #7a5000; }
.swpm_badge_blue   { background: #f0f6fc; color: #135e96; }
.swpm_badge_gray   { background: #f0f0f1; color: #50575e; }

@media (max-width: 640px) {
    .swpm_portal_grid { grid-template-columns: 1fr; }
    .swpm_portal_box { padding: 24px 20px; }
    .swpm_portal_content { padding: 16px; }
    .swpm_p_nav { display: none; }
    .swpm_p_content { padding: 16px; }
}

/* ── PORTAL NAV SIDEBAR ── */
.swpm_p_nav { width: 200px; background: #fff; border-right: 1px solid #dcdcde; flex-shrink: 0; padding: 12px 0; overflow-y: auto; }
.swpm_p_nav_section { padding: 12px 16px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #8c8f94; }
.swpm_p_nav_item { display: flex; align-items: center; gap: 9px; padding: 9px 16px; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 13px; color: #50575e; border-left: 3px solid transparent; transition: background 0.15s, color 0.15s; }
.swpm_p_nav_item:hover { background: #f6f7f7; color: #1d2327; }
.swpm_p_nav_item.active { background: #f0f6fc; color: #F83600; border-left-color: #F83600; }
.swpm_p_nav_item i { font-size: 16px; width: 18px; text-align: center; }
.swpm_p_content { flex: 1; padding: 24px; overflow-y: scroll; max-width: 860px; scrollbar-width: none; }
.swpm_p_content::-webkit-scrollbar { display: none; }
.swpm_p_section { width: 100%; box-sizing: border-box; }
.swpm_p_content_docs { max-width: none !important; padding: 0 !important; overflow: hidden !important; }

/* ── TICKET ROWS ── */
.swpm_p_ticket_row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #f0f0f1; cursor: pointer; transition: background 0.12s; }
.swpm_p_ticket_row:last-child { border-bottom: none; }
.swpm_p_ticket_row:hover { background: #f6f7f7; }
.swpm_p_ticket_subject { font-size: 13px; font-weight: 600; color: #1d2327; }
.swpm_p_ticket_meta { font-size: 11px; color: #8c8f94; margin-top: 3px; display: flex; align-items: center; gap: 6px; }

/* ── TICKET MESSAGES ── */
.swpm_p_msg { max-width: 85%; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.swpm_p_msg_you { align-self: flex-end; background: #F83600; color: #fff; border-bottom-right-radius: 2px; }
.swpm_p_msg_support { align-self: flex-start; background: #fff; color: #1d2327; border: 1px solid #dcdcde; border-bottom-left-radius: 2px; }
.swpm_p_msg_meta { font-size: 10px; margin-bottom: 4px; opacity: 0.7; }
.swpm_p_msg_body { word-break: break-word; }

/* ── SUGGESTION ROWS ── */
.swpm_p_sug_row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #f0f0f1; }
.swpm_p_sug_row:last-child { border-bottom: none; }
.swpm_p_vote_btn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: #f6f7f7; border: 1px solid #dcdcde; border-radius: 6px; padding: 8px 10px; cursor: pointer; font-family: 'Lato', sans-serif; font-size: 12px; font-weight: 700; color: #50575e; min-width: 44px; transition: all 0.15s; }
.swpm_p_vote_btn:hover { border-color: #F83600; color: #F83600; }
.swpm_p_vote_btn.voted { background: #F83600; border-color: #F83600; color: #fff; }
.swpm_p_vote_btn i { font-size: 16px; }
.swpm_p_sug_body { flex: 1; }
.swpm_p_sug_title { font-size: 13px; font-weight: 700; color: #1d2327; margin-bottom: 3px; }
.swpm_p_sug_desc { font-size: 12px; color: #50575e; margin-bottom: 5px; }
.swpm_p_sug_meta { font-size: 11px; color: #8c8f94; display: flex; align-items: center; gap: 6px; }

/* ── DOCS ── */
.swpm_p_doc_cat { border-bottom: 1px solid #f0f0f1; }
.swpm_p_doc_cat h3 { padding: 10px 16px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #8c8f94; margin: 0; }
.swpm_p_doc_item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f8f8f8; transition: background 0.12s; }
.swpm_p_doc_item:hover { background: #f6f7f7; }
.swpm_p_doc_title { font-size: 13px; font-weight: 600; color: #1d2327; display: flex; align-items: center; gap: 8px; }
.swpm_p_doc_title i { color: #F83600; }
.swpm_p_doc_body { padding: 16px; background: #fafafa; border-bottom: 1px solid #f0f0f1; }
.swpm_p_doc_text { font-size: 13px; color: #1d2327; line-height: 1.7; }
.swpm_p_doc_text p { margin: 0 0 10px; }
.swpm_p_doc_text ul, .swpm_p_doc_text ol { margin: 0 0 10px 18px; }
.swpm_p_doc_text code { background: #f0f0f1; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.swpm_p_doc_bugs { margin-top: 14px; padding: 12px 14px; background: #fce8e8; border: 1px solid #f5c2c3; border-radius: 6px; }
.swpm_p_doc_bugs_title { font-size: 12px; font-weight: 700; color: #d63638; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.swpm_p_bug_row { font-size: 12px; color: #50575e; padding: 4px 0; display: flex; align-items: center; gap: 8px; }

/* ── STATUS ── */
.swpm_p_status_all_good { text-align: center; padding: 40px 20px; }
.swpm_p_status_all_good i { font-size: 48px; color: #00a32a; display: block; margin-bottom: 10px; }
.swpm_p_status_all_good div { font-size: 18px; font-weight: 700; color: #00a32a; }
.swpm_p_status_all_good p { font-size: 13px; color: #8c8f94; margin-top: 6px; }
.swpm_p_status_count { padding: 10px 16px; font-size: 13px; color: #50575e; }
.swpm_p_status_bug { padding: 14px 16px; border-bottom: 1px solid #f0f0f1; }
.swpm_p_status_bug:last-child { border-bottom: none; }
.swpm_p_status_bug_header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.swpm_p_status_bug_title { font-size: 13px; font-weight: 600; color: #1d2327; flex: 1; }
.swpm_p_status_bug_section { font-size: 12px; color: #8c8f94; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.swpm_p_status_bug_desc { font-size: 12px; color: #50575e; }

/* ── TICKET MESSAGES IN ADMIN ── */
.swpm_ticket_msg { max-width: 85%; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.swpm_ticket_msg_admin { align-self: flex-end; background: #F83600; color: #fff; border-bottom-right-radius: 2px; }
.swpm_ticket_msg_user  { align-self: flex-start; background: #fff; color: #1d2327; border: 1px solid #dcdcde; border-bottom-left-radius: 2px; }
.swpm_ticket_msg_meta  { font-size: 10px; margin-bottom: 4px; opacity: 0.7; }

/* ── DOCS (sidebar layout matching public docs page) ── */
.swpm_p_docs_layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; height: calc(100vh - 48px); padding: 16px; box-sizing: border-box; }
.swpm_p_docs_nav { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 14px 0; overflow-y: auto; position: sticky; top: 0; }
.swpm_p_docs_nav_title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #8c8f94; padding: 0 14px 8px; }
.swpm_p_docs_nav_cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #8c8f94; padding: 10px 14px 4px; border-top: 1px solid #f0f0f1; margin-top: 4px; }
.swpm_p_docs_nav_cat:first-of-type { border-top: none; margin-top: 0; }
.swpm_p_docs_nav_link { display: block; padding: 4px 14px; font-size: 12px; color: #50575e; text-decoration: none; transition: background .1s, color .1s; line-height: 1.4; }
.swpm_p_docs_nav_link:hover { background: #f0f6fc; color: #F83600; }
.swpm_p_docs_nav_link.active { background: #f0f6fc; color: #F83600; font-weight: 600; border-left: 3px solid #F83600; }
.swpm_p_docs_main { overflow-y: auto; padding-right: 4px; scroll-behavior: smooth; }
.swpm_p_docs_search { position: relative; margin-bottom: 20px; }
.swpm_p_docs_search { position: sticky; top: 0; z-index: 10; background: #f0f0f1; padding: 0 0 16px; margin-bottom: 8px; }
.swpm_p_docs_search i { display: none; }
.swpm_p_docs_search input { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid #dcdcde; border-radius: 6px; font-size: 14px; outline: none; background: #fff; }
.swpm_p_docs_search input:focus { border-color: #F83600; }
.swpm_p_docs_catheading { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #8c8f94; margin: 28px 0 10px; padding-bottom: 8px; border-bottom: 2px solid #dcdcde; }
.swpm_p_docs_catheading:first-child { margin-top: 0; }
.swpm_p_docs_article { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; padding: 24px 28px; margin-bottom: 14px; scroll-margin-top: 20px; }
.swpm_p_docs_article_title { font-size: 17px; font-weight: 700; color: #1d2327; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f1; }
.swpm_p_docs_article_body { font-size: 14px; line-height: 1.7; color: #3c434a; }
.swpm_p_docs_article_body h4 { font-size: 13px; font-weight: 700; color: #1d2327; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .3px; }
.swpm_p_docs_article_body p { margin: 0 0 12px; }
.swpm_p_docs_article_body ul, .swpm_p_docs_article_body ol { margin: 0 0 12px; padding-left: 20px; }
.swpm_p_docs_article_body li { margin-bottom: 5px; }
.swpm_p_docs_article_body code { background: #f0f0f1; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-family: monospace; color: #c7254e; }
.swpm_p_docs_article_body strong { color: #1d2327; }
.swpm_p_docs_article.swpm_p_docs_hidden { display: none; }
.swpm_p_docs_catgroup.swpm_p_docs_hidden { display: none; }

/* Bug indicators in docs */
.swpm_p_docs_bug_dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #d63638;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}
.swpm_p_docs_bug_banner {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: #fcf0f1;
    border: 1px solid #d63638;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #8a1c1f;
}
.swpm_p_docs_bug_banner > i { font-size: 18px; color: #d63638; margin-top: 1px; }
.swpm_p_docs_bug_banner strong { display: block; margin-bottom: 4px; color: #d63638; }
.swpm_p_docs_bug_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}
.swpm_p_docs_bug_status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
}
.swpm_p_docs_bug_investigating { background: #fef9ed; color: #9a6700; }
.swpm_p_docs_bug_fixing { background: #f0f6fc; color: #F83600; }
.swpm_p_docs_bug_fixed { background: #edfaef; color: #00a32a; }

@media (max-width: 768px) {
    .swpm_p_docs_layout { grid-template-columns: 1fr; height: auto; }
    .swpm_p_docs_nav { height: auto; max-height: 200px; }
    .swpm_p_docs_main { overflow: visible; }
    .swpm_p_docs_article { padding: 16px; }
}

.swal2-input {
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: auto !important;
}
