/*
 * Phase 1 shared SaaS presentation layer.
 * Existing DOM, IDs, classes, routes, and behavior hooks remain unchanged.
 */

@font-face {
    font-family: "Lato";
    src: url("../fonts/lato/lato-regular.woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    src: url("../fonts/lato/lato-bold.woff") format("woff");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    /* Primitive palette */
    --blue-600: #0064e6;
    --blue-600: oklch(0.52 0.22 255);
    --blue-700: #0053bd;
    --blue-700: oklch(0.46 0.19 255);
    --blue-50: #eef5ff;
    --blue-50: oklch(0.97 0.018 255);
    --slate-900: #17233b;
    --slate-900: oklch(0.25 0.04 255);
    --slate-700: #40506a;
    --slate-700: oklch(0.43 0.035 255);
    --slate-600: #5c6b82;
    --slate-600: oklch(0.52 0.025 255);
    --slate-300: #cbd5e3;
    --slate-300: oklch(0.85 0.02 255);
    --slate-200: #dfe6ef;
    --slate-200: oklch(0.91 0.014 255);
    --slate-100: #edf2f8;
    --slate-100: oklch(0.95 0.01 255);
    --slate-50: #f6f8fc;
    --slate-50: oklch(0.98 0.006 255);
    --white: #fcfdff;
    --white: oklch(0.995 0.003 255);
    --green-700: #197047;
    --green-700: oklch(0.48 0.11 155);
    --green-50: #edf9f2;
    --green-50: oklch(0.97 0.025 155);
    --red-700: #a62b2b;
    --red-700: oklch(0.48 0.15 25);
    --red-50: #fff3f2;
    --red-50: oklch(0.97 0.018 25);
    --amber-800: #79500a;
    --amber-800: oklch(0.47 0.09 75);
    --amber-50: #fff8e8;
    --amber-50: oklch(0.97 0.035 85);

    /* Semantic palette */
    --page-bg: var(--slate-50);
    --surface: var(--white);
    --surface-muted: var(--slate-50);
    --surface-accent: var(--blue-50);
    --text: var(--slate-900);
    --text-muted: var(--slate-600);
    --navy: var(--slate-900);
    --navy-dark: var(--slate-900);
    --blue: var(--blue-600);
    --teal: var(--blue-600);
    --teal-dark: var(--blue-700);
    --border: var(--slate-200);
    --focus: var(--blue-600);
    --danger: var(--red-700);
    --success: var(--green-700);

    /* Component tokens */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-xs: 0 1px 2px rgba(23, 35, 59, 0.04);
    --shadow: 0 8px 24px rgba(23, 35, 59, 0.055);
    --control-height: 42px;
    --content-width: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--page-bg);
}

body {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Lato", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body,
input,
select,
textarea,
button {
    font-family: "Lato", sans-serif;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--blue-700);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out;
}

a:hover {
    color: var(--blue-600);
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--blue-600);
    outline-offset: 3px;
}

::selection {
    background: var(--blue-50);
    color: var(--slate-900);
}

/* Bright application header */
#main-header {
    position: relative;
    z-index: 20;
    width: 100%;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

#flx-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 24px;
    width: min(var(--content-width), calc(100% - 48px));
    max-width: var(--content-width);
    min-height: 88px;
    margin: 0 auto;
    padding: 16px 0;
}

#flx-wrap > .clear {
    display: none;
}

#logoarea,
#my-account,
#accountpanel,
#signuparea {
    float: none;
}

#logoarea {
    min-width: 0;
    margin: 0;
}

.logo {
    min-width: 0;
}

.logo a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--slate-900);
    font-family: "Lato", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
}

.logo a:hover {
    color: var(--blue-600);
    text-decoration: none;
}

#my-account {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#my-account .the-id,
#my-account .the-level,
#my-account .the-earnings {
    position: relative;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--slate-600) !important;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.5;
    text-shadow: none;
}

#my-account .my-stat,
#my-account .writers_level_title {
    margin: 0;
    color: var(--slate-900);
    font-size: 13px;
    font-weight: 700;
}

#accountpanel {
    min-width: 0;
    margin: 0;
}

#signuparea {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--slate-600);
    text-shadow: none;
}

#signuparea > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

#signuparea .welcome_u {
    max-width: 240px;
    color: var(--slate-600);
    font-size: 13px;
    overflow-wrap: anywhere;
}

#signuparea .welcome_u a,
#signuparea a {
    color: var(--slate-700) !important;
    font-size: 13px;
    font-weight: 700;
}

#signuparea a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}

#signuparea a:hover {
    border-color: var(--border);
    background: var(--surface-muted);
    color: var(--blue-700) !important;
    text-decoration: none;
}

#signuparea .icon_stock_m {
    padding-left: 36px;
    border-color: var(--blue-600);
    background-color: var(--blue-600);
    background-position: 11px center;
    background-size: 16px 16px;
    color: var(--white) !important;
}

#signuparea .icon_stock_m:hover {
    border-color: var(--blue-700);
    background-color: var(--blue-700);
    color: var(--white) !important;
}

#signuparea .icon_exit {
    padding-left: 36px;
    border-color: var(--border);
    background-color: var(--surface);
    background-position: 11px center;
    background-size: 16px 16px;
}

#signuparea .welcome_u a.m_account {
    display: inline;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#main_nav ul {
    float: none;
    border: 0;
    background: transparent;
    color: var(--text);
}

#main_nav #login-trigger,
#main_nav #signup a {
    height: auto;
    min-height: 42px;
    color: var(--slate-700) !important;
    line-height: 1.4;
}

#main_nav #login-content {
    top: calc(100% + 8px);
    width: min(300px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* Main surfaces and type hierarchy */
#main_content_i {
    width: min(var(--content-width), calc(100% - 32px));
    max-width: var(--content-width);
    min-width: 0;
    margin: 0 auto;
}

#main-content,
#sub_section,
#sub_section_bottom {
    width: min(var(--content-width), calc(100% - 32px));
    max-width: var(--content-width);
    min-width: 0;
    margin-right: auto;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

#main-content {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 24px;
}

#sub_section,
#sub_section_bottom {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 20px;
}

#main-content h1,
#main-content h2,
#main-content h3,
#sub_section h1,
#sub_section h2,
#sub_section h3,
#sub_section_bottom h1,
#sub_section_bottom h2,
#sub_section_bottom h3 {
    color: var(--slate-900);
    font-family: "Lato", sans-serif;
    line-height: 1.3;
}

.titlehdr,
.admin-dashboard {
    margin: 0 0 20px;
    color: var(--slate-900);
    font-family: "Lato", sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.35px;
    text-align: left;
}

h3.titlehdr {
    margin: 4px 0 16px;
    font-size: 22px;
}

.admin-dashboard {
    margin: 0;
    text-align: center;
}

/* Forms and buttons */
fieldset {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

legend {
    color: var(--slate-900);
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"],
input[type="file"],
select,
textarea {
    max-width: 100%;
    min-height: var(--control-height);
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 9px 12px;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue-600);
}

input[type="file"] {
    padding: 7px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue-600);
    outline: 0;
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 100, 230, 0.13);
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly],
textarea[readonly] {
    background: var(--slate-100);
    color: var(--slate-600);
    cursor: not-allowed;
}

input.error,
textarea.error,
select.error {
    border-color: var(--red-700);
    background: var(--red-50);
}

label.error {
    color: var(--red-700);
    font-size: 13px;
}

input[type="submit"],
input[type="button"],
input[type="reset"],
button,
.button,
.submit_arrow,
.new_bt,
.mails- a {
    min-height: var(--control-height);
    padding: 10px 16px;
    border: 1px solid var(--blue-600);
    border-radius: var(--radius-sm);
    background: var(--blue-600);
    color: var(--white);
    box-shadow: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-shadow: none;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
button:hover,
.button:hover,
.submit_arrow:hover,
.new_bt:hover,
.mails- a:hover {
    border-color: var(--blue-700);
    background: var(--blue-700);
    color: var(--white);
    box-shadow: none;
    text-decoration: none;
}

input[type="submit"]:active,
button:active,
.button:active {
    padding: 10px 16px;
    transform: translateY(1px);
}

input[type="submit"]:disabled,
button:disabled,
.button.disabled {
    border-color: var(--slate-300);
    background: var(--slate-300);
    cursor: not-allowed;
}

#msg-body input[type="submit"],
.blue_button input[type="submit"],
.compose_button input[type="submit"] {
    border-color: var(--blue-600);
    border-radius: var(--radius-sm);
    background: var(--blue-600);
    box-shadow: none;
}

.forms,
.forms_acccount,
.forms_acccount_p,
.myaccount,
.loginformindex {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: var(--text);
    font-family: "Lato", sans-serif;
    font-size: 14px;
}

/* Writer navigation */
#main-content > table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

#main-content > table > tbody > tr > td {
    min-width: 0;
    vertical-align: top;
}

#main-content > table > tbody > tr > td:first-child {
    width: 218px;
    padding-right: 20px;
}

#main-content > table > tbody > tr > td[width="89%"] {
    width: auto;
    padding: 0 0 0 4px !important;
}

#myaccount_links {
    width: 100%;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
    box-shadow: none;
    color: var(--text);
    font-family: "Lato", sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

#myaccount_links #getfacts > div:not(.seps_l) {
    margin: 4px 7px 8px;
    color: var(--slate-600);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

#myaccount_links a {
    display: block;
    min-width: 0;
    min-height: 42px;
    margin: 2px 0;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--slate-700);
    line-height: 1.35;
    text-decoration: none;
}

#myaccount_links a:hover {
    border-color: var(--slate-200);
    background: var(--surface);
    color: var(--blue-700);
}

#myaccount_links a:focus-visible {
    background: var(--surface);
}

#myaccount_links span {
    display: block;
    min-height: 26px;
    padding: 3px 0 3px 30px;
    background-position: left center;
    background-size: 18px 18px;
    overflow-wrap: anywhere;
}

#myaccount_links .seps_l {
    display: none;
}

#myaccount_links .tallies,
.tallies {
    color: var(--blue-700);
    font-weight: 700;
}

/* Inline SVG icons: no raster icon requests and no new markup. */
.icon_news,
.icon_available,
.icon_bids,
.icon_assigned,
.icon_current,
.icon_dispute,
.icon_revision,
.icon_editing,
.icon_done,
.icon_approved,
.icon_reject,
.icon_paid,
.icon_financial,
.icon_account,
.icon_exit,
.icon_msg_unread,
.icon_help,
.icon_help_small,
.icon_info,
.icon_exclamation,
.icon_stock_m,
.icon_pending,
.icon_available_db,
.icon_bids_db,
.icon_assigned_db,
.icon_assigned_unconfirmed_db,
.icon_editing_db,
.icon_revision_db,
.icon_done_db,
.icon_approved_db,
.icon_reject_db,
.icon_paid_db,
.icon_dispute_db,
.icon_orders_all,
.icon_users_all,
.icon_users_online_all,
.icon_users,
.icon_writers {
    background-repeat: no-repeat;
    background-position: left center;
}

.icon_news { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h14v15H5a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1Z'/%3E%3Cpath d='M18 8h2a1 1 0 0 1 1 1v9a2 2 0 0 1-2 2h-1M7 9h7M7 13h7M7 17h4'/%3E%3C/svg%3E"); }
.icon_available, .icon_available_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h8l4 4v16H6z'/%3E%3Cpath d='M14 2v5h5M9 13h6M12 10v6'/%3E%3C/svg%3E"); }
.icon_bids, .icon_bids_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 3-7 18-3-8-8-3Z'/%3E%3Cpath d='m11 13 5-5'/%3E%3C/svg%3E"); }
.icon_assigned, .icon_assigned_db, .icon_assigned_unconfirmed_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M2 22v-3a7 7 0 0 1 12-4.9M16 19l2 2 4-5'/%3E%3C/svg%3E"); }
.icon_current, .icon_pending { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.icon_dispute, .icon_dispute_db, .icon_exclamation { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 21h20Z'/%3E%3Cpath d='M12 9v5M12 18h.01'/%3E%3C/svg%3E"); }
.icon_revision, .icon_revision_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5M4 17v-5h5'/%3E%3Cpath d='M6.1 8a7 7 0 0 1 11.8-1L20 12M4 12l2.1 5a7 7 0 0 0 11.8-1'/%3E%3C/svg%3E"); }
.icon_editing, .icon_editing_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14 4 6 6M4 20l4-1 12-12a2 2 0 0 0-3-3L5 16Z'/%3E%3C/svg%3E"); }
.icon_done, .icon_done_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.icon_approved, .icon_approved_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 3 2 4 .5.5 4 2 3-2 3-.5 4-4 .5-3 2-3-2-4-.5-.5-4-2-3 2-3 .5-4 4-.5Z'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.icon_reject, .icon_reject_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E"); }
.icon_paid, .icon_paid_db { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h16a2 2 0 0 1 2 2v11H5a2 2 0 0 1-2-2Z'/%3E%3Cpath d='M3 6V5a2 2 0 0 1 2-2h12M15 11h6v5h-6a2.5 2.5 0 0 1 0-5Z'/%3E%3C/svg%3E"); }
.icon_financial, .icon_orders_all { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.icon_account { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 22a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.icon_exit { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230053bd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H4v16h6M14 8l4 4-4 4M8 12h10'/%3E%3C/svg%3E"); }
.icon_msg_unread { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
.icon_help, .icon_help_small { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 4 2c-1 .7-1.5 1-1.5 2M12 17h.01'/%3E%3C/svg%3E"); }
.icon_info { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E"); }
.icon_stock_m { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.icon_users, .icon_writers, .icon_users_all, .icon_users_online_all { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21a7 7 0 0 1 14 0M16 4a4 4 0 0 1 0 8M17 15a6 6 0 0 1 5 6'/%3E%3C/svg%3E"); }

.icon_stock_m {
    padding-left: 34px;
    background-position: 10px center;
    background-size: 16px 16px;
}

.icon_exit {
    padding-left: 34px;
    background-position: 10px center;
    background-size: 16px 16px;
}

.icon_help {
    padding: 8px 8px 8px 30px;
    background-size: 18px 18px;
}

.icon_help_small {
    width: 18px;
    height: 18px;
    padding: 0;
    background-size: 16px 16px;
    vertical-align: middle;
}

.icon_info {
    padding: 4px 0 4px 36px;
    background-size: 22px 22px;
}

.icon_exclamation {
    padding: 4px 0 4px 34px;
    background-size: 22px 22px;
}

/* Additional legacy navigation and action hooks use the same SVG set. */
.icon_bug,
.icon_to_confirm,
.icon_assigned_unconfirmed,
.icon_rate,
.icon_msg,
.icon_attachment,
.icon_attachment_small,
.icon_orders,
.icon_more_orders,
.icon_request,
.icon_settings,
.icon_news_list,
.icon_clock,
.icon_edit_order,
.icon_add_files,
.icon_fav_admin,
.icon_fav_client {
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 18px 18px;
}

.icon_bug { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='7' y='6' width='10' height='14' rx='5'/%3E%3Cpath d='M9 6V4h6v2M3 10h4M17 10h4M3 16h4M17 16h4M9 2 7 0M15 2l2-2'/%3E%3C/svg%3E"); }
.icon_to_confirm, .icon_assigned_unconfirmed { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M2 22v-3a7 7 0 0 1 12-4.9M17 16v6M14 19h6'/%3E%3C/svg%3E"); }
.icon_rate, .icon_fav_admin, .icon_fav_client { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2-5.6-3-5.6 3 1.1-6.2L3 9.6l6.2-.9Z'/%3E%3C/svg%3E"); }
.icon_msg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4Z'/%3E%3C/svg%3E"); }
.icon_attachment, .icon_attachment_small { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m21 11-9 9a6 6 0 0 1-8-8l10-10a4 4 0 0 1 6 6L10 18a2 2 0 0 1-3-3l9-9'/%3E%3C/svg%3E"); }
.icon_orders, .icon_more_orders { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 2h12v20H6zM9 7h6M9 11h6M9 15h4'/%3E%3C/svg%3E"); }
.icon_request { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M20 7v5h-5M4 17v-5h5M6.1 8a7 7 0 0 1 11.8-1L20 12M4 12l2.1 5a7 7 0 0 0 11.8-1'/%3E%3C/svg%3E"); }
.icon_settings { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19 13.5v-3l-2-.7-.7-1.7.9-1.9-2.1-2.1-1.9.9-1.7-.7-.7-2h-3l-.7 2-1.7.7-1.9-.9-2.1 2.1.9 1.9-.7 1.7-2 .7v3l2 .7.7 1.7-.9 1.9 2.1 2.1 1.9-.9 1.7.7.7 2h3l.7-2 1.7-.7 1.9.9 2.1-2.1-.9-1.9.7-1.7Z'/%3E%3C/svg%3E"); }
.icon_news_list { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 5h16v15H4zM8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.icon_clock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.icon_edit_order { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m14 4 6 6M4 20l4-1L20 7a2 2 0 0 0-3-3L5 16Z'/%3E%3C/svg%3E"); }
.icon_add_files { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064e6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 2h8l4 4v16H6zM14 2v5h5M12 10v7M8.5 13.5h7'/%3E%3C/svg%3E"); }

.loading-spinner,
.validation-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--slate-300);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    vertical-align: middle;
    animation: modern-spin 700ms linear infinite;
}

.validation-status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23197047' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

@keyframes modern-spin {
    to { transform: rotate(360deg); }
}

/* Notifications */
.msg,
.error,
.ord_msg,
.ord_error,
.notify_suc,
.loginerrors,
.green_msg,
.siteMsg,
.confirm_msg,
.notifier,
.get_help_info,
.update_p_details {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 12px 0;
    padding: 13px 16px;
    border: 1px solid #b9ddc9;
    border-radius: var(--radius);
    background: var(--green-50);
    color: var(--green-700);
    box-shadow: none;
    font-family: "Lato", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    text-align: left;
    text-shadow: none;
}

.error,
.ord_error,
.loginerrors,
.notify-red {
    border-color: #efc5c2;
    background: var(--red-50);
    color: var(--red-700);
}

.confirm_msg,
.notify-yellow {
    border-color: #ead6a5;
    background: var(--amber-50);
    color: var(--amber-800);
}

.confirm_msg a,
.confirm_msg a:hover {
    background: transparent;
    color: var(--amber-800);
    text-decoration: none;
}

.notifier {
    border-color: #cbdcf5;
    background: var(--blue-50);
    color: var(--slate-900);
}

.get_help_info {
    height: auto;
    overflow: visible;
    border-color: #cbdcf5;
    background: var(--blue-50);
    color: var(--slate-700);
}

.get_help_info li {
    margin-bottom: 8px;
    font-size: 14px;
}

.close_this a {
    color: var(--blue-700);
}

/* Login and recovery */
#sign_in {
    width: 100%;
    max-width: 450px;
    min-height: 0;
    margin: 48px auto;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

#sign_in .login_today {
    width: 100%;
    margin-bottom: 22px;
    padding: 0;
}

#sign_in .welcome_login {
    margin-bottom: 3px;
    color: var(--slate-600);
    font-size: 16px;
}

#sign_in .logn_p {
    margin: 0;
    color: var(--slate-900);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

#sign_in .login_pane,
.login_pane {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-collapse: collapse;
    background: transparent;
}

#sign_in .login_pane td {
    display: block;
    width: 100%;
    padding: 7px 0;
    color: var(--slate-700);
    font-size: 14px;
}

#sign_in input[type="text"],
#sign_in input[type="password"],
#sign_in input[type="email"] {
    width: 100% !important;
    min-height: 46px;
    margin: 6px 0 0;
    padding: 11px 13px;
    border: 1px solid var(--slate-300);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
    font-size: 16px;
    font-weight: 400;
}

#actForm #doLogin3 {
    border: 1px solid var(--blue-600);
    border-radius: var(--radius-sm);
    background: var(--blue-600);
    box-shadow: none;
}

#actForm #doLogin3:hover,
#actForm #doLogin3:focus,
#actForm #doLogin3:active {
    border-color: var(--blue-700);
    background: var(--blue-700);
    box-shadow: none;
}

#sign_in input[type="submit"],
#sign_in .order_submit {
    width: 100% !important;
    min-height: 46px;
    margin: 10px 0 0;
    padding: 12px 16px;
    background: var(--blue-600);
    color: var(--white);
    font-size: 16px;
}

#sign_in input[type="submit"]:hover,
#sign_in .order_submit:hover {
    padding: 12px 16px;
    background: var(--blue-700);
}

#sign_in .login_ft {
    float: none;
    width: 100%;
    text-align: center;
}

#sign_in .login_ft span {
    float: none !important;
}

#sign_in .login_ft a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
}

#sign_in .login_label {
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

#sign_in h1.titlehdr {
    margin-bottom: 12px;
    font-size: 28px;
    text-align: center;
}

#sign_in p {
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.6;
}

#user_email {
    width: 100% !important;
    margin: 8px 0 !important;
    text-align: left !important;
}

/* Account settings: flat sections with clear row hierarchy. */
.account_panel {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.account_panel > .error,
.account_panel > .msg {
    width: 100%;
}

.m_account {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.m_account > tbody,
.m_account > tbody > tr,
.m_account > tbody > tr > td {
    display: block;
    width: 100%;
}

.m_account > tbody > tr > td {
    position: relative;
    min-width: 0;
    padding: 0;
}

.m_acccount_heading {
    padding-right: 190px;
    color: var(--slate-900);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.account_updates {
    position: absolute;
    top: -5px;
    right: 0;
}

.account_updates a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: 13px;
    font-weight: 700;
}

.my_acccount {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    border-collapse: collapse;
    table-layout: fixed;
}

.my_acccount td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    font-size: 14px;
    line-height: 1.5;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.my_acccount tr:last-child td {
    border-bottom: 0;
}

.my_acccount td:first-child {
    width: 42%;
    color: var(--slate-600);
    font-weight: 700;
}

.stat_totals {
    float: none;
    padding: 0;
    color: var(--blue-700);
    font-style: normal;
    font-weight: 700;
}

.users_discplines {
    float: none;
    width: 100%;
    padding: 14px 0 0;
    color: var(--slate-700);
    line-height: 1.8;
}

.user_headings {
    margin-right: 5px;
    border: 0;
    color: var(--slate-600);
    font-size: 14px;
    font-style: normal;
}

#edit_profile,
#edit_pwd,
#edit_payments,
#edit_paypal {
    width: 100% !important;
    max-width: 900px;
    margin: 0 auto 16px !important;
    padding: 20px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: var(--surface-muted) !important;
    color: var(--text);
    font: 14px/1.5 "Lato", sans-serif !important;
}

#edit_profile > a,
#edit_pwd > a,
#edit_payments > a,
#edit_paypal > a {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 44px;
    clear: both;
}

#edit_profile > a > span,
#edit_pwd > a > span,
#edit_payments > a > span,
#edit_paypal > a > span {
    float: none !important;
}

#edit_profile table,
#edit_pwd table,
#edit_payments table,
#edit_paypal table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

#edit_profile td,
#edit_pwd td,
#edit_payments td,
#edit_paypal td {
    padding: 6px;
    vertical-align: top;
    overflow-wrap: anywhere;
}

#edit_profile input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
#edit_pwd input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
#edit_payments input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
#edit_paypal input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
#edit_profile select,
#edit_profile textarea,
#edit_payments textarea {
    width: 100% !important;
}

/* Footer */
#footer-wrap,
#footer {
    min-height: 0;
    height: auto;
    margin-top: 32px;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--slate-600);
}

#footer .inner-wrap {
    width: min(var(--content-width), calc(100% - 32px));
    min-height: 0;
    margin: 0 auto;
    padding: 16px 0;
}

.bottom-menu {
    margin: 0;
}

.bottom-menu ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
    padding: 0;
}

.bottom-menu ul li,
ul.bottom-menu li {
    float: none;
    display: block;
    margin: 0;
    padding: 0;
}

.bottom-menu ul li a,
ul.bottom-menu li a,
#footer a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 4px;
    color: var(--slate-700) !important;
    font-size: 14px;
    text-transform: none;
}

.bottom-menu ul li a:hover,
#footer a:hover {
    color: var(--blue-700) !important;
}

.copyright,
#footer .copyright,
.copyright a {
    width: 100%;
    max-width: none;
    padding: 4px 12px 10px;
    color: var(--slate-600) !important;
    font-size: 13px;
    text-align: center;
}

/* DataTables: reflowed rows, visible sorting controls, no horizontal scroll. */
.dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    margin: 16px 0 0;
    overflow: visible;
    color: var(--text);
}

.dataTables_wrapper .top,
.dataTables_wrapper .bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
}

.dataTables_wrapper .bottom {
    padding: 12px 0 0;
}

.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 0;
    color: var(--slate-600);
    font-size: 13px;
    text-align: left;
}

.dataTables_filter input {
    width: min(240px, 100%);
    min-height: 40px;
    margin-left: 6px;
}

table.display {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-spacing: 0;
    border-radius: var(--radius);
    background: var(--surface);
    font-family: "Lato", sans-serif;
    table-layout: fixed;
}

table.display thead th {
    padding: 12px 26px 12px 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background-color: var(--slate-50);
    background-position: right 9px center;
    background-size: 13px 13px;
    color: var(--slate-700);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: middle;
}

table.display thead th:first-child,
table.display thead th:last-child {
    border-radius: 0;
}

table.display thead th.sorting {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c6b82' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 3 3-2 3 2M8 1v14M5 13l3 2 3-2'/%3E%3C/svg%3E");
}

table.display thead th.sorting_asc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230053bd' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 7 4-4 4 4M8 3v10'/%3E%3C/svg%3E");
}

table.display thead th.sorting_desc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230053bd' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 9 4 4 4-4M8 3v10'/%3E%3C/svg%3E");
}

table.display td {
    padding: 12px;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

table.display td a {
    font-weight: 700;
}

table.display tr.odd,
table.display tr.even {
    background: var(--surface);
}

table.display tr.odd td.sorting_1,
table.display tr.even td.sorting_1 {
    background: var(--blue-50);
}

table.display tbody tr:hover {
    background: var(--slate-50);
}

.dataTables_empty {
    padding: 30px 16px !important;
    color: var(--slate-600) !important;
    font-style: normal;
}

.paging_full_numbers {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    width: auto;
    max-width: 100%;
    height: auto;
    line-height: 1.4;
}

.paging_full_numbers a.paginate_button,
.paging_full_numbers a.paginate_active,
.paginate_disabled_previous,
.paginate_enabled_previous,
.paginate_disabled_next,
.paginate_enabled_next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--slate-700) !important;
    line-height: 1.3;
    text-decoration: none;
}

.paging_full_numbers a.paginate_button:hover,
.paginate_enabled_previous:hover,
.paginate_enabled_next:hover {
    border-color: var(--blue-600);
    background: var(--blue-50);
    color: var(--blue-700) !important;
}

.paging_full_numbers a.paginate_active {
    border-color: var(--blue-600);
    background: var(--blue-600);
    color: var(--white) !important;
}

.paginate_disabled_previous,
.paginate_disabled_next {
    background: var(--slate-100);
    color: var(--slate-600) !important;
    cursor: default;
}

.dataTables_processing {
    border-color: var(--blue-600);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--slate-900);
    box-shadow: var(--shadow);
}

/* Existing admin summary remains functional and wraps instead of widening pages. */
.dashboard_orders,
.dashboard_users {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.dashboard_orders td,
.dashboard_users td {
    min-width: 0;
    overflow-wrap: anywhere;
}

.stats_orders .stats_align_nums {
    border-radius: 999px;
    background: var(--blue-50);
}

.stats_orders .stats_align_nums .tallies {
    color: var(--blue-700);
}

.icon_orders_all,
.icon_users_all,
.icon_users_online_all {
    width: 48px;
    height: 48px;
    padding: 0;
    background-position: center;
    background-size: 34px 34px;
}

.hover_more_info:hover + .divhoverinfo,
.hover_more_info:focus + .divhoverinfo {
    max-width: calc(100vw - 32px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    font-family: "Lato", sans-serif;
    text-shadow: none;
}

@media (max-width: 1100px) {
    #flx-wrap {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 16px;
    }

    #my-account {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }

    #accountpanel {
        grid-column: 2;
        grid-row: 1;
    }

    #main-content,
    #sub_section,
    #sub_section_bottom {
        width: calc(100% - 24px);
    }
}

@media (max-width: 1100px) {
    body {
        font-size: 16px;
    }

    #flx-wrap {
        width: calc(100% - 24px);
        padding: 10px 0 12px;
    }

    .logo a {
        font-size: 23px;
        letter-spacing: -0.4px;
    }

    #signuparea > div {
        gap: 4px;
    }

    #signuparea .welcome_u {
        display: block;
        width: 100%;
        max-width: 210px;
        font-size: 12px;
        text-align: right;
    }

    #signuparea a {
        min-height: 44px;
        padding: 9px;
    }

    #my-account {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    #my-account .the-id,
    #my-account .the-level,
    #my-account .the-earnings {
        padding: 8px;
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    #my-account .my-stat,
    #my-account .writers_level_title {
        font-size: 12px;
    }

    #main-content,
    #sub_section,
    #sub_section_bottom {
        width: calc(100% - 16px);
        margin-top: 8px;
        margin-bottom: 8px;
        border-radius: var(--radius);
    }

    #main-content {
        padding: 16px;
    }

    #sub_section,
    #sub_section_bottom {
        padding: 14px;
    }

    .titlehdr,
    .admin-dashboard {
        font-size: 23px;
    }

    h3.titlehdr {
        font-size: 20px;
    }

    #main-content > table,
    #main-content > table > tbody,
    #main-content > table > tbody > tr,
    #main-content > table > tbody > tr > td {
        display: block;
        width: 100% !important;
        max-width: 100%;
        padding: 0 !important;
    }

    #main-content > table > tbody > tr > td:first-child {
        margin-bottom: 18px;
    }

    #myaccount_links,
    .threecol-first #myaccount_links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        padding: 8px;
    }

    #getfacts,
    .threecol-first #getfacts {
        display: contents;
    }

    #getfacts > div:not(.seps_l),
    .threecol-first #getfacts > div:not(.seps_l) {
        display: none;
    }

    #myaccount_links a {
        min-height: 44px;
        margin: 0;
        padding: 6px;
        font-size: 12px;
    }

    #myaccount_links span {
        padding-left: 27px;
        background-size: 16px 16px;
    }

    #sign_in {
        margin: 24px auto;
        padding: 24px;
    }

    #sign_in .logn_p {
        font-size: 27px;
    }

    .m_account {
        padding: 16px;
    }

    .m_acccount_heading {
        padding-right: 0;
    }

    .account_updates {
        position: static;
        margin: 4px 0 0;
    }

    .account_updates a {
        min-height: 44px;
    }

    .my_acccount,
    .my_acccount tbody,
    .my_acccount tr,
    .my_acccount td {
        display: block;
        width: 100% !important;
    }

    .my_acccount tr {
        padding: 9px 0;
        border-bottom: 1px solid var(--slate-100);
    }

    .my_acccount tr:last-child {
        border-bottom: 0;
    }

    .my_acccount td {
        padding: 2px 0;
        border: 0;
    }

    .my_acccount td:first-child {
        color: var(--slate-600);
        font-size: 12px;
    }

    #edit_profile table,
    #edit_profile tbody,
    #edit_profile tr,
    #edit_profile td,
    #edit_pwd table,
    #edit_pwd tbody,
    #edit_pwd tr,
    #edit_pwd td,
    #edit_payments table,
    #edit_payments tbody,
    #edit_payments tr,
    #edit_payments td,
    #edit_paypal table,
    #edit_paypal tbody,
    #edit_paypal tr,
    #edit_paypal td {
        display: block;
        width: 100%;
        padding: 4px 0;
    }

    .dataTables_wrapper .top,
    .dataTables_wrapper .bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .dataTables_length,
    .dataTables_filter,
    .dataTables_info,
    .dataTables_paginate {
        width: 100%;
    }

    .dataTables_filter label {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .dataTables_filter input {
        flex: 1;
        width: auto;
        min-width: 0;
        margin: 0;
    }

    .dataTables_wrapper.responsive-ready table.display,
    .dataTables_wrapper.responsive-ready table.display tbody {
        display: block;
        width: 100% !important;
        border: 0;
        background: transparent;
    }

    .dataTables_wrapper.responsive-ready table.display thead {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .dataTables_wrapper.responsive-ready table.display thead tr {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .dataTables_wrapper.responsive-ready table.display thead th {
        display: inline-flex;
        align-items: center;
        width: auto !important;
        min-width: 0;
        min-height: 36px;
        padding: 7px 24px 7px 9px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background-color: var(--surface);
        background-position: right 7px center;
        font-size: 11px;
    }

    .dataTables_wrapper.responsive-ready table.display tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 12px;
        width: 100%;
        margin-bottom: 10px;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
    }

    .dataTables_wrapper.responsive-ready table.display tbody td {
        display: block;
        width: auto !important;
        min-width: 0;
        padding: 8px 0;
        border: 0;
        border-bottom: 1px solid var(--slate-100);
        background: transparent;
        font-size: 13px;
    }

    .dataTables_wrapper.responsive-ready table.display tbody td:last-child {
        border-bottom: 0;
    }

    .dataTables_wrapper.responsive-ready table.display tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--slate-600);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .dataTables_wrapper.responsive-ready table.display tbody td.dataTables_empty {
        grid-column: 1 / -1;
        text-align: center;
    }

    .dataTables_wrapper.responsive-ready table.display tbody td.dataTables_empty::before {
        content: none;
    }

    .paging_full_numbers {
        justify-content: flex-start;
    }

    .paging_full_numbers a.paginate_button,
    .paging_full_numbers a.paginate_active,
    .paginate_disabled_previous,
    .paginate_enabled_previous,
    .paginate_disabled_next,
    .paginate_enabled_next {
        min-width: 44px;
        min-height: 44px;
    }

    .hover_more_info:hover + .divhoverinfo,
    .hover_more_info:focus + .divhoverinfo {
        position: fixed;
        top: 15%;
        left: 16px;
        width: calc(100vw - 32px);
        height: auto;
        max-height: 70vh;
        overflow: auto;
    }
}

@media (min-width: 1101px) {
    /* Legacy left-panel floating blockifies its table cell and shrinks the
       dashboard's content column. Keep both application columns in the table. */
    #main-content > table > tbody > tr > td.left_panel,
    #main-content > table > tbody > tr > td.right_panel {
        display: table-cell;
        float: none;
    }

    #main-content > table > tbody > tr > td.left_panel {
        width: 218px !important;
        margin-right: 0;
    }

    #main-content > table > tbody > tr > td.right_panel {
        width: auto !important;
        margin: 0;
    }

    #thetable[data-columns="7"] thead th:nth-child(1) { width: 8% !important; }
    #thetable[data-columns="7"] thead th:nth-child(2) { width: 38% !important; }
    #thetable[data-columns="7"] thead th:nth-child(3) { width: 14% !important; }
    #thetable[data-columns="7"] thead th:nth-child(4) { width: 12% !important; }
    #thetable[data-columns="7"] thead th:nth-child(5) { width: 12% !important; }
    #thetable[data-columns="7"] thead th:nth-child(6) { width: 7% !important; }
    #thetable[data-columns="7"] thead th:nth-child(7) { width: 9% !important; }

    /* Paid-order administration loads the shared layer, not modern-orders.css. */
    #thetable[data-columns="9"] thead th:nth-child(1) { width: 9% !important; }
    #thetable[data-columns="9"] thead th:nth-child(2) { width: 23% !important; }
    #thetable[data-columns="9"] thead th:nth-child(3) { width: 12% !important; }
    #thetable[data-columns="9"] thead th:nth-child(4) { width: 12% !important; }
    #thetable[data-columns="9"] thead th:nth-child(5) { width: 12% !important; }
    #thetable[data-columns="9"] thead th:nth-child(6) { width: 6% !important; }
    #thetable[data-columns="9"] thead th:nth-child(7) { width: 9% !important; }
    #thetable[data-columns="9"] thead th:nth-child(8) { width: 8% !important; }
    #thetable[data-columns="9"] thead th:nth-child(9) { width: 9% !important; }

    #thetable[data-columns="9"] thead th {
        padding: 10px 18px 10px 8px;
        background-position: right 4px center;
        background-size: 11px 11px;
        font-size: 11px;
    }

    #thetable[data-columns="9"] td {
        padding: 10px 8px;
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    #flx-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    #logoarea,
    #accountpanel {
        grid-column: 1;
        width: 100%;
        text-align: center;
    }

    #logoarea {
        grid-row: 1;
    }

    #accountpanel {
        grid-row: 2;
    }

    #my-account {
        grid-row: 3;
    }

    #signuparea,
    #signuparea > div {
        justify-content: center;
        width: 100%;
    }

    #signuparea .welcome_u {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    #my-account {
        grid-template-columns: 1fr;
    }

    #my-account .the-id,
    #my-account .the-level,
    #my-account .the-earnings {
        text-align: center;
    }

    #main-content {
        padding: 12px;
    }

    #sign_in {
        padding: 20px;
    }

    .dataTables_wrapper.responsive-ready table.display tbody tr {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
