:root {
  --purple: #7d71d3;
  --pink: #e3345e;
  --ink: #25243a;
  --muted: #77768a;
  --line: #e9e8f0;
  --soft: #f7f7fb;
  --white: #ffffff;
  --success: #21865b;
  --warning: #9a6b0a;
  --danger: #b52e4b;
  font-family: "Open Sans", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #fff; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Open Sans", sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: var(--purple); color: #fff; min-height: 70px; box-shadow: 0 3px 14px rgba(39, 31, 98, .12); }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #fff; font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.brand:hover { color: #fff; text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 19px; flex-wrap: wrap; }
.main-nav a, .nav-user { color: #fff; font-size: 13px; font-weight: 600; }
.main-nav a:hover { color: #fff; opacity: .85; }
.main-nav .nav-cta { background: var(--pink); padding: 9px 15px; border-radius: 7px; }
.nav-user { opacity: .82; }
.main-content { min-height: calc(100vh - 142px); padding-top: 34px; padding-bottom: 60px; }
.site-footer { background: var(--purple); color: #fff; padding: 18px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; opacity: .95; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 39px); line-height: 1.2; margin-bottom: 10px; letter-spacing: -.8px; }
h2 { font-size: 23px; line-height: 1.3; margin-bottom: 15px; }
h3 { font-size: 17px; margin-bottom: 10px; }
.eyebrow { color: var(--pink); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; margin-bottom: 9px; }
.muted { color: var(--muted); font-size: 13px; }
.text-link { font-size: 13px; font-weight: 700; color: var(--pink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 7px; padding: 10px 17px; color: #fff; background: var(--pink); font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
.btn:hover { color: #fff; text-decoration: none; opacity: .92; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-light { color: var(--purple); background: #f0effb; }
.btn-light:hover { color: var(--purple); }
.btn-danger { background: #b52e4b; }
.btn-outline-danger { color: #b52e4b; background: #fff; border: 1px solid #e6b9c4; }
.btn-outline-danger:hover { color: #b52e4b; }
.btn-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.btn-block { width: 100%; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 23px; margin-bottom: 22px; box-shadow: 0 5px 20px rgba(34, 28, 73, .035); }
.compact-panel { padding: 15px 20px; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 25px; }
.page-title-row p { margin-bottom: 0; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 45px; align-items: center; padding: 56px 0 66px; }
.hero h1 { font-size: clamp(36px, 5vw, 54px); max-width: 650px; line-height: 1.12; }
.hero-copy > p { max-width: 600px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span { border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; color: var(--purple); font-size: 12px; font-weight: 700; }
.hero-panel { background: #f5f4fc; border-radius: 18px; padding: 32px; }
.code-window { border-radius: 12px; background: #26243d; color: #fff; overflow: hidden; box-shadow: 0 20px 50px rgba(32, 27, 78, .16); }
.window-dots { display: flex; gap: 6px; padding: 15px 18px; background: #312f4a; }
.window-dots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: #e6a1b2; }
.window-dots i:nth-child(2) { background: #e8c67d; }
.window-dots i:nth-child(3) { background: #82c5a5; }
.code-window pre { padding: 28px 25px; margin: 0; overflow: auto; font-size: 14px; line-height: 2; }
.code-window code { color: #d7d2ff; }
.code-status { padding: 13px 20px; border-top: 1px solid rgba(255,255,255,.1); color: #9be0b8; font-size: 12px; }
.section-block { padding: 20px 0 55px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
.feature-strip { background: #f7f6fc; border: 1px solid var(--line); border-radius: 14px; padding: 27px 30px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.feature-strip h2 { margin-bottom: 6px; }
.feature-strip p { color: var(--muted); margin: 0; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 19px; min-width: 0; box-shadow: 0 4px 16px rgba(34,28,73,.03); }
.project-card h3 { margin: 12px 0 8px; }
.project-card h3 a { color: var(--ink); }
.project-card p { color: var(--muted); font-size: 13px; min-height: 62px; }
.card-top, .card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.card-meta { justify-content: flex-start; font-size: 12px; color: var(--muted); margin: 14px 0; }
.status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 30px; font-size: 10px; line-height: 1.5; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; background: #f0eff8; color: var(--purple); white-space: nowrap; }
.status-in_progress { background: #eaf6f0; color: #21865b; }
.status-completed, .status-confirmed { background: #edf0f7; color: #59617e; }
.status-awaiting_payment, .status-pending, .status-reopen_requested { background: #fff5df; color: #9a6b0a; }
.status-rejected, .status-deleted, .status-cancelled { background: #fff0f2; color: #b52e4b; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 11px 15px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a.active { color: var(--pink); border-color: var(--pink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid label, .form-stack label { display: flex; flex-direction: column; gap: 6px; color: #4a4960; font-size: 12px; font-weight: 700; }
.form-grid .full, .form-grid .visibility-options { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 1px solid #dedde8; border-radius: 7px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(125,113,211,.1); }
textarea { resize: vertical; min-height: 90px; }
small { color: var(--muted); font-size: 11px; font-weight: 400; }
.check-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 9px !important; font-weight: 500 !important; }
.check-label input { width: auto; }
.visibility-options { display: flex; flex-direction: column; gap: 10px; padding: 15px; background: var(--soft); border-radius: 9px; }
.auth-wrap { display: flex; justify-content: center; padding: 35px 0; }
.auth-panel { width: min(450px, 100%); padding: 30px; }
.auth-panel h1 { font-size: 30px; }
.auth-panel .muted { margin: 15px 0 0; }
.registration-privacy-choice { align-items: flex-start; line-height: 1.55; }
.registration-privacy-choice input { flex-shrink: 0; margin-top: 3px; accent-color: var(--pink); }
.captcha-wrap { min-height: 78px; overflow-x: auto; }
.alert { padding: 12px 15px; border-radius: 8px; margin: 0 0 18px; font-size: 13px; }
.alert-success { color: #1c6b4a; background: #eaf6f0; border: 1px solid #cce8d9; }
.alert-error { color: #a02b45; background: #fff0f2; border: 1px solid #f1cbd4; }
.alert-info { color: #55518d; background: #f0effb; border: 1px solid #dedbf7; }
.alert-warning { color: #86600d; background: #fff7e6; border: 1px solid #f0dfb7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: #fff; display: flex; flex-direction: column; gap: 7px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 27px; line-height: 1.2; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.dashboard-tile { display: flex; flex-direction: column; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; }
.dashboard-tile:hover { border-color: var(--purple); text-decoration: none; box-shadow: 0 7px 20px rgba(34,28,73,.06); }
.dashboard-tile strong { font-size: 16px; }
.dashboard-tile span { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 680px; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
td a { font-weight: 700; }
.inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-actions form { margin: 0; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { width: auto; }
.admin-controls { background: #fcfbff; }
.admin-controls .inline-actions { margin: 12px 0; }
.empty-state { padding: 20px; text-align: center; color: var(--muted); background: #fafafd; border-radius: 9px; font-size: 13px; }
.chat-panel { padding: 20px; }
.chat-messages { display: flex; flex-direction: column; gap: 12px; min-height: 130px; max-height: 470px; overflow-y: auto; padding: 12px; background: #fafafd; border: 1px solid var(--line); border-radius: 9px; margin: 15px 0; }
.chat-message { max-width: min(80%, 700px); padding: 11px 13px; border: 1px solid #e8e6f0; border-radius: 9px; background: #fff; overflow-wrap: anywhere; }
.chat-author { color: var(--purple); font-weight: 700; font-size: 11px; margin-bottom: 4px; }
.chat-body { color: #38374d; font-size: 13px; white-space: pre-wrap; }
.chat-form { display: flex; flex-direction: column; gap: 10px; }
.chat-form textarea { min-height: 78px; }
.chat-form input[type=url] { margin-top: 1px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-error { color: #b52e4b; font-size: 12px; }
.chat-media { display: block; max-width: min(100%, 520px); max-height: 360px; width: auto; height: auto; margin-top: 8px; border-radius: 7px; object-fit: contain; }
.media-url { margin: 7px 0 0; }
.media-url a, .media-link { font-size: 12px; font-weight: 700; }
.prose { line-height: 1.8; overflow-wrap: anywhere; }
.metric-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 15px 0 24px; }
.metric-row > div { background: var(--soft); border-radius: 9px; padding: 14px; display: flex; flex-direction: column; gap: 5px; }
.metric-row strong { font-size: 18px; }
.payment-method-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.payment-method { border: 1px solid var(--line); background: #fbfbfe; border-radius: 9px; padding: 14px; overflow-wrap: anywhere; }
.payment-method code { display: block; padding: 8px; margin: 8px 0; background: #f0eff8; border-radius: 6px; font-size: 11px; }
.payment-submit { padding-top: 17px; border-top: 1px solid var(--line); }
.review, .comment, .notification { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review p, .comment p, .notification p { margin: 7px 0; }
.review-form { margin-top: 18px; }
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 25px 0; }
.pagination a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.pagination a.current { background: var(--purple); color: #fff; border-color: var(--purple); }
.break-all { overflow-wrap: anywhere; max-width: 220px; }
.countdown { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #fff5df; border: 1px solid #f1dfb8; border-radius: 9px; min-width: 130px; }
.countdown span { color: #8c6715; font-size: 10px; text-transform: uppercase; font-weight: 700; }
.countdown strong { color: #6f4f0a; font-size: 21px; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; gap: 25px; padding: 35px 0 45px; }
  .hero-panel { max-width: 650px; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 26px, 1160px); }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 13px 0; gap: 10px; }
  .main-nav { gap: 11px; }
  .main-nav a, .nav-user { font-size: 11px; }
  .main-content { padding-top: 22px; }
  .page-title-row, .feature-strip, .footer-inner { align-items: flex-start; flex-direction: column; }
  .project-grid, .dashboard-grid, .stats-grid, .form-grid, .metric-row, .payment-method-grid { grid-template-columns: 1fr; }
  .form-grid .full, .form-grid .visibility-options { grid-column: auto; }
  .panel { padding: 17px; }
  .hero-panel { padding: 15px; }
  .chat-message { max-width: 95%; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form input { width: 100%; }
  .countdown { align-self: stretch; }
}


/* Administrator file manager */
.fm-security { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; background: #fbfaff; }
.fm-security > div { min-width: 0; }
.fm-security strong { display: block; margin-bottom: 5px; }
.fm-security code { display: inline-block; max-width: 100%; padding: 6px 9px; border-radius: 6px; background: #f0eff8; overflow-wrap: anywhere; font-size: 12px; }
.fm-security p { margin: 7px 0 0; }
.fm-attempt-count { display: inline-block; color: var(--danger); font-size: 23px; font-weight: 700; }
.fm-browser { overflow: hidden; }
.fm-toolbar { display: flex; flex-direction: column; gap: 15px; margin-bottom: 18px; }
.fm-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 13px; font-weight: 700; }
.fm-breadcrumb span { color: var(--muted); }
.fm-create-forms { display: flex; flex-wrap: wrap; gap: 10px; }
.fm-create-form, .fm-rename-form, .fm-inline-action { display: flex; align-items: center; gap: 7px; margin: 0; }
.fm-create-form input, .fm-rename-form input { width: auto; min-width: 160px; min-height: 34px; padding: 6px 9px; font-size: 12px; }
.fm-table { min-width: 780px; }
.fm-table td { font-size: 12px; }
.fm-folder { font-weight: 700; }
.fm-locked { color: var(--muted); font-weight: 700; }
.fm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.fm-rename-form input { min-width: 130px; max-width: 190px; }
.fm-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.fm-editor-heading h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.fm-editor-heading p { margin: 0; }
.fm-code-editor { display: block; width: 100%; min-height: 560px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fbfbfd; color: #24233a; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; white-space: pre; overflow: auto; }
.CodeMirror { height: 560px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.6; }
.fm-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 14px; }
@media (max-width: 760px) {
  .fm-security { grid-template-columns: 1fr; }
  .fm-create-forms { flex-direction: column; }
  .fm-create-form { align-items: stretch; }
  .fm-create-form input { flex: 1; min-width: 0; }
  .fm-editor-heading, .fm-editor-actions { align-items: flex-start; flex-direction: column; }
  .fm-rename-form input { max-width: 130px; min-width: 100px; }
}

.fm-provider-status { color: var(--success); font-weight: 700; }
.fm-provider-missing { color: var(--danger); font-weight: 700; }

/* Administrator customer controls retain the CMS palette and typography. */
.customer-create { max-width: 880px; }
.customer-create .full > .muted { margin: 10px 0 0; }
.customer-create [data-generator-status]:empty { display: none; }
.customer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.customer-actions .btn:disabled { cursor: not-allowed; }
.customer-search { margin-bottom: 18px; }
.customer-search > label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 12px; }
.customer-search input { flex: 1 1 200px; max-width: 440px; }
.customer-table { min-width: 780px; }
.customer-table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); cursor: pointer; }
.customer-confirm-list { margin: 18px 0; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.customer-confirm-list summary { cursor: pointer; font-weight: 700; }
.customer-confirm-list ol { max-height: 300px; overflow-y: auto; padding-left: 30px; }
.customer-delete { align-self: flex-start; }
.customer-cancel { margin-top: 12px; }
.status-awaiting_review { color: var(--purple); background: #f0effb; }
.chat-message-system { border-left: 3px solid var(--purple); background: #f7f6fc; }
.chat-message .text-link { display: inline-block; margin-top: 8px; }
.server-details-panel { border-color: #d4cfee; }
.server-details-panel details { margin-top: 18px; }
.server-details-panel summary { cursor: pointer; font-weight: 700; margin-bottom: 14px; }
.server-details-content { max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 16px; font: 13px/1.6 ui-monospace, monospace; }
.server-details-panel [hidden] { display: none !important; }
@media (max-width: 600px) {
  .customer-create .form-grid { grid-template-columns: 1fr; }
  .customer-actions .btn { flex: 1 1 auto; }
}

/* Fixed sender roles in project and support conversations. */
.chat-message { flex-shrink: 0; }
.chat-side-admin { align-self: flex-start; }
.chat-side-customer { align-self: flex-end; background: #f0edfc; border-color: #d9d2f2; }
.chat-side-system { align-self: center; }

.chat-delete-form { margin-top: 6px; text-align: right; }
.chat-delete-button { border: 0; background: transparent; color: #b52e4b; font: inherit; font-size: 11px; padding: 3px; cursor: pointer; text-decoration: underline; }
.chat-message-deleted .chat-body { font-style: italic; color: #6a687d; }


/* Global dismissible notice */
.global-data-loss-notice {
    position: relative;
    padding-right: 46px;
    line-height: 1.6;
}

.global-data-loss-notice[hidden] {
    display: none !important;
}

.global-notice-close {
    position: absolute;
    top: 5px;
    right: 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 25px;
    cursor: pointer;
    padding: 2px 5px;
}

.global-notice-close:hover {
    opacity: 0.6;
}
