
.modal-close-common {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    background: none;
    font-size: 20px;
}

.modal-overlay-common {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

li::marker {
    content: "" !important;
}

.modal-content-common {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    min-height: 80vh;
    width: 60vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}




/* scroll area */
main.scrollable {
    overflow-y: auto;
}

/* Content outer layer */
.wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.listHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.listHeader .title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.button {
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.no-border {
  border: none !important;
}

.userListTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    background: #fff;
    font-size: 14px;
}

.userListTable thead th {
    background: #f2f5f9;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e2e5ea;
}

.userListTable tbody tr {
    border-bottom: 1px solid #eeeeee;
    transition: 0.2s;
}

.userListTable tbody tr:hover {
    background: #f9fbff;
}

.userListTable td {
    padding: 12px 10px;
    color: #444;
    vertical-align: middle;
}

.notfound td {
    text-align: center;
    color: #888;
    padding: 20px;
}

.deleteBtn button {
    background: #ff4d4f;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.deleteBtn button:hover {
    background: #d9363e;
}

.pagination {
    position: relative;
    width: 100%;
    margin-top: 10px;
}
.pagination ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.pagination .arrow_left,
.pagination .arrow_right {
    position: relative;
}
.pagination .arrow_left p.prev:before {
    position: absolute;
    content: "";
    top: 7.2px;
    left: 7.2px;
    width: 20px;
    height: 20px;
}
.pagination .arrow_right p.next:before {
    position: absolute;
    content: "";
    top: 7.2px;
    right: 7.2px;
    width: 20px;
    height: 20px;
}

.pagination p {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
}
.pagination p:hover {
    background: #888FA6;
    border: 1px solid #282F46;
    color: #476add;
}
.pagination p.selected,
.pagination p:active {
    background: #476add;
    color: #888FA6;
}

.pagination p.no-focus {
    border: 1px solid transparent;
    pointer-events: none;
}
.pagination p.no-focus:hover {
    background: inherit;
    border: 1px solid transparent;
    color: inherit;
    pointer-events: none;
}
/* ======= Mobile phone adaptation (width ≤ 768px) ======= */
@media (max-width: 768px) {

    /* Overall layout narrowed */
    .frame {
        margin: 10px;
        padding: 0 10px;
    }

    /* Pop-ups cover the entire screen */
    .modal-content-common {
        width: 90vw !important;
        max-height: 90vh !important;
        padding: 15px !important;
        border-radius: 10px;
    }

    /* title shrink */
    .listHeader .title {
        font-size: 18px;
    }

    /* button shrink */
    .button {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* The table allows horizontal scrolling (hand-picked by mobile phone) */
    .userListTable {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Cell and header narrowing */
    .userListTable thead th,
    .userListTable td {
        padding: 10px 8px;
        font-size: 12px;
    }

    /* Delete button is more compact */
    .deleteBtn button {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* wrapper shrink padding */
    .wrapper {
        padding: 15px;
    }
}

/* ====== Modal mobile phone adaptation ====== */
@media (max-width: 768px) {

    .modal-content-common {
        width: 90vw;            /* Make pop-ups suitable for mobile phones */
        max-height: 85vh;
        padding: 15px;
    }

    .modal-close-common {
        top: 8px;
        right: 10px;
        font-size: 22px;
    }
}

/* Slack-like mobile card list */
@media screen and (max-width: 768px) {

    .userListTable,
    .userListTable thead,
    .userListTable tbody,
    .userListTable th,
    .userListTable td,
    .userListTable tr {
        display: block;
        width: 100%;
    }

    /* hide table header */
    .userListTable thead {
        display: none;
    }

    /* Each row becomes a card style */
    .userListTable tr {
        margin: 12px 0;
        padding: 15px;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    /* Change cells to two rows */
    .userListTable td {
        padding: 6px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        font-size: 14px;
    }

    /* Use data-label to display field names (Slack style) */
    .userListTable td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
        flex: 1;
        max-width: 45%;
    }

    .userListTable td p,
    .userListTable td span {
        flex: 1;
        text-align: right;
        color: #333;
        word-break: break-word;
    }

    /* Delete button lower down (more Slack) */
    .deleteBtn {
        margin-top: 10px;
    }
}


/* ====== Table horizontal scrolling container ====== */
.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;   /* Scroll horizontally */
    overflow-y: hidden;
}

/* Mobile terminal allows text wrapping in tables to prevent UI explosion */
@media (max-width: 768px) {
    .userListTable td,
    .userListTable th {
        white-space: nowrap; /* No line breaks, better scrolling */
    }
}



.confirm-overlay-common {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.confirm-box-common {
    background: #fff;
    width: 90%;
    max-width: 360px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


@keyframes popup-common {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.confirm-title-common {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.confirm-message-common {
    font-size: 15px;
    color: #555;
    margin-bottom: 20px;
}

.confirm-buttons-common {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.confirm-btn {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    /* width: 100%; */
}

.confirm-btn.no {
    background: transparent;
    margin-right: 8px;
    color: var(--slack-accent);
    border: 1px solid var(--slack-accent) !important;
}

.confirm-btn.no:hover {
    background: #d5d5d5;
}

.confirm-btn.yes {
    background: var(--slack-accent, #4c51bf);
    color: var(--slack-accent-text, #ffffff);
}

.confirm-btn.yes:hover {
    background: var(--slack-accent-strong, #4c51bf);
}


/* ====== Exclusive to member login page -Slack style simplified version ====== */
.member-page {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    background-color: #f8f9fa;
}

.member-page .frame {
    max-width: 800px;
    margin: 16px auto;
    padding: 0 12px;
}

.member-page .wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 14px; /* Smaller component spacing */
}

/* Header */
.member-page .listHeader {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.member-page .listHeader .title {
    font-size: 20px;
    font-weight: 600;
}

.member-page .listHeader .subtitle {
    font-size: 13px;
    color: #6c6c6c;
}


/* form elements */
.member-page .inputBox {
    margin-bottom: 10px;
}

.member-page .inputBox label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}

.member-page .inputBox .flexBox {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ===== Input box: overall height becomes shorter ===== */
.member-page .inputBox input[type="Text"],
.member-page .inputBox input[type="Password"],
.member-page .inputBox select {
    flex: 1 1 10px;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    background-color: #fff;
}

.member-page .inputBox input:focus,
.member-page .inputBox select:focus {
    box-shadow: 0 0 0 2px rgba(0,122,90,0.15);
    outline: none;
}

/* ===== password icon ===== */
.member-page .passwordBox {
    position: relative;
}

.member-page .toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
}

/* ===== Pop-up window (the button also has no color or border) ===== */
.member-page .confirm-btn {
    background: none !important;
    border: none !important;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
}

/* ===== Mobile phone adaptation ===== */
@media (max-width: 768px) {
    .member-page .wrapper {
        padding: 14px;
        gap: 12px;
    }

    .member-page .inputBox .flexBox {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {

    /* ===== The input box on the mobile phone is further reduced in height ===== */
    .member-page .inputBox input[type="Text"],
    .member-page .inputBox input[type="Password"],
    .member-page .inputBox select {
        padding: 4px 8px;
        font-size: 13px;
    }

    .member-page .button {
        padding: 4px 6px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {

    .member-page .checkbox-group {
        gap: 10px;
        padding: 6px 0;
    }

    .member-page input[type="Checkbox"] {
        width: 20px;
        height: 20px;  /* Fingers are better */
    }

    .member-page .checkbox-group label {
        font-size: 15px;
        line-height: 1.3;
    }
}

/* Smaller phone (iPhone SE) */
@media (max-width: 480px) {

    .member-page .checkbox-group {
        padding: 4px 0;
    }

    .member-page input[type="Checkbox"] {
        width: 18px;
        height: 18px;
    }

    .member-page .checkbox-group label {
        font-size: 14px;
    }
}

/* =========================================================
   Slack style theme -only works within .theme
   Automatic beautification: input box /button /table /Toggle /title
   Support mobile phone adaptation
========================================================= */

.theme {
    --card-bg: #ffffff;
    --border: #dedbe6;
    --text: #1d1c1d;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    background: white;
    padding: 20px;
    color: var(--text);
}


.theme * {
    box-sizing: border-box;
}

/* ==========================================
   card packaging
========================================== */
.theme .wrapper {
    background: var(--card-bg);
    padding: 26px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ==========================================
   Title
========================================== */
.theme .listTitle .title {
    font-size: 24px;
    font-weight: 800;
    color: var(--slack-accent);
    margin-bottom: 4px;
}

.theme .listTitle .subtitle {
    color: #7d7d7d;
    font-size: 14px;
}

/* ==========================================
   input area
========================================== */
.theme .inputBox {
    margin-bottom: 18px;
}

.theme label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.theme input[type="Text"],
.theme input[type="Number"],
.theme input[type="Email"] {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: 0.2s;
}

.theme input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(97,31,105,0.25);
    border-color: var(--slack-accent);
}

/* disabled style is more refreshing */
.theme input[disabled] {
    background: #f2f0f3;
    color: #888;
}

/* ==========================================
   button
========================================== */
.theme .button,
.theme .btn-primary,
.theme .invoice-btn {
    background: var(--slack-accent);
    color: #fff !important;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}


.theme .button:hover,
.theme .btn-primary:hover,
.theme .invoice-btn:hover {
    background: var(--slack-accent-strong);
}

.theme .button.hidden {
    display: none !important;
}

/* ==========================================
   Slack Toggle (slider style) 🔥 Super nice
========================================== */
.theme .planToggleWrapper {
    display: inline-flex;
    background: #ebe6f0;
    border-radius: 20px;
    padding: 4px;
    margin-bottom: 10px;
    position: relative;
}

.theme .plan-toggle-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 14px;
    border-radius: 16px;
    cursor: pointer;
    z-index: 2;
    color: #555;
    transition: 0.15s;
}

.theme .plan-toggle-btn.active {
    color: #fff;
    background: var(--slack-accent);
}

/* slider */
.theme .planToggleWrapper::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    width: 50%;
    border-radius: 16px;
    z-index: 1;
    transition: 0.25s;
}

/* JS only needs to set data-active */
.theme .planToggleWrapper[data-active="Left"]::before {
    transform: translateX(0%);
}

.theme .planToggleWrapper[data-active="Right"]::before {
    transform: translateX(100%);
}

/* ==========================================
   Table (ratingTable)
========================================== */
.theme table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.theme table th {
    background: #f2eaf5;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.theme table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.theme .rateing-table {
    width: 80px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* ==========================================
   hide
========================================== */
.theme .hidden {
    display: none !important;
}


.unit-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.unit-label {
    white-space: nowrap;
    font-size: 14px;
    color: #555;
}

@media (max-width: 768px) {
    .theme {
        padding: 12px;
    }

    .theme .wrapper {
        padding: 18px;
    }

    .theme input {
        font-size: 16px;
    }

    .theme .button,
    .theme .btn-primary,
    .theme .invoice-btn {
        width: 100%;
        margin-top: 12px;
    }

    .theme .planToggleWrapper {
        width: 100%;
        justify-content: space-between;
    }

    .theme .plan-toggle-btn {
        flex: 1;
        padding: 8px 0;
        text-align: center;
    }
}
/* Make the form slideable horizontally on the mobile phone */
.theme .table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

/* The table maintains a minimum width to avoid being squeezed and deformed. */
.theme table {
    min-width: 700px; /* You can adjust it to ensure that all columns display properly */
    border-collapse: collapse;
}

/* Fixed header format */
.theme table th {
    white-space: nowrap;  /* Prevent line breaks from causing inconsistent column widths */
    font-weight: 600;
}

/* Cells are prevented from being squashed */
.theme table td {
    white-space: nowrap;
}

/* The input box maintains a fixed width in the cell and does not deform. */
.theme .rateing-table {
    width: 80px;
    min-width: 80px; /* Be consistent */
}

/* Unit labels also do not wrap */
.theme .unit-label {
    white-space: nowrap;
}

.modal-content-common {
    scrollbar-width: none;   /* Firefox */
    -ms-overflow-style: none; /* IE /Edge */
}

.modal-content-common::-webkit-scrollbar {
    display: none; /* Chrome /Safari */
}
.modal-content-common {
    overflow: hidden !important;
    touch-action: none;
    -ms-touch-action: none;
    overscroll-behavior: none;
}

.switch-toggle {
    margin-top: 15px;
}
#settingsAvatarErrorStamp {
    margin-top: 15px;
}

.switch-container {
  display: inline-block;
  position: relative;
  width: 90px;
  height: 35px;
  margin-top: 15PX;
}
.format-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
}
.format-selection-item {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #fff;
    cursor: pointer;
}
.format-selection-item:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.switch-container input {
  display: none;
}

.switch-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #bdc3c7; /* OFF */
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s;
}

.slider {
  position: absolute;
  left: 5px;
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}

/*  ON/OFF */
.text-on, .text-off {
  font-weight: bold;
  font-family: sans-serif;
  z-index: 1;
  font-size: 14px;
}
.format-selection-item.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 1px #3b82f6;
}


.format-selection-text {
    font-size: 15px;
    font-weight: 500;
    color: #334155;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.text-on { display: none; color: white; margin-right: 20px; }
.text-off { display: block; color: #333; margin-left: 20px; }

/* ---  ON  --- */
#statusOn:checked ~ .switch-body {
  background-color: #2ecc71;
}

#statusOn:checked ~ .switch-body .slider {
  transform: translateX(50px); 
}

#statusOn:checked ~ .switch-body .text-on { display: block; }
#statusOn:checked ~ .switch-body .text-off { display: none; }

/* --- show/hide file (Selector ) --- */
#statusOn:checked ~ #settingsAvatarErrorStamp,
#statusOn:checked ~ #settingsAvatarInputStamp {
  display: block !important;
}

#statusOff:checked ~ #settingsAvatarErrorStamp,
#statusOff:checked ~ #settingsAvatarInputStamp {
  display: none;
}

.settings-stamp-header {
    margin-top: 15px;
}