.clh-wrap,
.clh-shortcode {
    color: #111827 !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    max-width: 1120px;
}

.clh-shortcode {
    background: #f4f7fb !important;
    box-sizing: border-box;
    margin: 24px auto;
    padding: 24px;
}

.clh-login-shortcode {
    background: #eef4fb !important;
    margin: 0 auto;
    max-width: none;
    min-height: 72vh;
    padding: 42px 18px;
    width: 100%;
}

.clh-login-shell {
    align-items: stretch;
    background: #fff !important;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    margin: 0 auto;
    max-width: 1040px;
    overflow: hidden;
}

.clh-login-brand {
    background: #0b4798;
    color: #fff !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 460px;
    padding: 42px;
    position: relative;
}

.clh-login-brand::after {
    background: #f06414;
    bottom: 0;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    width: 100%;
}

.clh-login-brand span,
.clh-login-kicker {
    color: rgba(255, 255, 255, 0.82) !important;
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.clh-login-brand h1 {
    color: #fff !important;
    font-size: 38px;
    line-height: 1.12;
    margin: 0 0 14px;
}

.clh-login-brand p {
    color: rgba(255, 255, 255, 0.90) !important;
    font-size: 17px;
    margin: 0;
    max-width: 540px;
}

.clh-login-card {
    background: #fff !important;
    color: #0f172a !important;
    padding: 42px;
}

.clh-login-card .clh-login-kicker {
    color: #0b4798 !important;
}

.clh-login-card h2 {
    color: #0f172a !important;
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.clh-login-intro {
    color: #475569 !important;
    font-size: 15px;
    margin: 0 0 20px;
}

.clh-login-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    color: #9f1239 !important;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.clh-login-form {
    display: grid;
    gap: 16px;
}

.clh-login-form label {
    color: #0f172a !important;
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.clh-login-form input[type="text"],
.clh-login-form input[type="password"] {
    background: #fff !important;
    border: 1px solid #b9c5d3;
    border-radius: 6px;
    box-sizing: border-box;
    color: #0f172a !important;
    font-size: 16px;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

.clh-login-form input[type="text"]:focus,
.clh-login-form input[type="password"]:focus {
    border-color: #0b4798;
    box-shadow: 0 0 0 2px rgba(11, 71, 152, 0.18);
    outline: none;
}

.clh-login-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.clh-login-row a,
.clh-link-button {
    color: #0b4798 !important;
    font-weight: 800;
    text-decoration: none !important;
}

.clh-login-row a:hover,
.clh-link-button:hover,
.clh-link-button:focus {
    color: #f06414 !important;
}

.clh-remember {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
}

.clh-remember input {
    margin: 0;
}

.clh-login-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.clh-login-submit {
    width: 100%;
}

.clh-session-bar {
    align-items: center;
    background: #fff !important;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 13px 16px;
}

.clh-session-bar span {
    color: #64748b !important;
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.clh-session-bar strong {
    color: #0f172a !important;
    font-size: 15px;
}

.clh-session-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.clh-session-actions a {
    background: #eef6ff;
    border: 1px solid #cfe1f7;
    border-radius: 6px;
    color: #0b4798 !important;
    font-size: 14px;
    font-weight: 800;
    min-height: 34px;
    padding: 7px 11px;
    text-decoration: none !important;
}

.clh-session-actions a:hover,
.clh-session-actions a:focus {
    background: #0b4798;
    color: #fff !important;
    outline: none;
}

.clh-tabs {
    margin-bottom: 20px;
}

.clh-panel {
    background: #fff !important;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    margin-top: 18px;
    padding: 26px;
}

.clh-panel-heading {
    align-items: flex-start;
    border-bottom: 1px solid #eceff3;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
}

.clh-panel-heading h2 {
    color: #0f172a !important;
    font-size: 20px;
    line-height: 1.25;
    margin: 0 0 6px;
}

.clh-panel-heading p {
    color: #334155 !important;
    font-size: 15px;
    margin: 0;
}

.clh-form {
    display: grid;
    gap: 18px;
}

.clh-form label {
    display: grid;
    gap: 7px;
}

.clh-form label > span {
    color: #0f172a !important;
    font-size: 15px;
    font-weight: 700;
}

.clh-field-label {
    color: #0f172a !important;
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 7px;
}

.clh-form input[type="text"],
.clh-form input[type="email"],
.clh-form input[type="tel"],
.clh-form input[type="url"],
.clh-form input[type="date"],
.clh-form input[type="number"],
.clh-form input[type="file"],
.clh-form select,
.clh-form textarea {
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-sizing: border-box;
    background: #fff !important;
    color: #0f172a !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    max-width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    width: 100%;
}

.clh-form input[type="text"]:focus,
.clh-form input[type="email"]:focus,
.clh-form input[type="tel"]:focus,
.clh-form input[type="url"]:focus,
.clh-form input[type="date"]:focus,
.clh-form input[type="number"]:focus,
.clh-form input[type="file"]:focus,
.clh-form select:focus,
.clh-form textarea:focus {
    border-color: #0b4798;
    box-shadow: 0 0 0 2px rgba(11, 71, 152, 0.18);
    outline: none;
}

.clh-form input::placeholder,
.clh-form textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

.clh-form textarea {
    min-height: 92px;
    resize: vertical;
}

.clh-form textarea[readonly] {
    background: #f8fafc !important;
    color: #334155 !important;
}

.clh-rich-field {
    display: block;
}

.clh-rich-toolbar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
}

.clh-rich-toolbar select,
.clh-rich-toolbar button {
    min-height: 34px !important;
}

.clh-rich-toolbar select {
    background: #fff !important;
    border: 1px solid #b9c5d3;
    border-radius: 6px;
    color: #0f172a !important;
    font-size: 14px;
    padding: 5px 8px;
}

.clh-rich-tool,
.clh-rich-table,
.clh-rich-image {
    background: #fff;
    border: 1px solid #b9c5d3;
    border-radius: 6px;
    color: #0f172a;
    cursor: pointer;
    font-weight: 800;
    padding: 0 11px;
}

.clh-rich-tool:hover,
.clh-rich-tool:focus,
.clh-rich-table:hover,
.clh-rich-table:focus,
.clh-rich-image:hover,
.clh-rich-image:focus {
    border-color: #0b4798;
    color: #0b4798;
    outline: none;
}

.clh-rich-editor {
    background: #fff !important;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
    color: #0f172a !important;
    font-family: Georgia, serif;
    font-size: 12px;
    line-height: 1.55;
    min-height: 280px;
    overflow: auto;
    padding: 14px;
    width: 100%;
}

.clh-rich-editor:focus {
    border-color: #0b4798;
    box-shadow: 0 0 0 2px rgba(11, 71, 152, 0.18);
    outline: none;
}

.clh-rich-editor:empty::before {
    color: #64748b;
    content: attr(data-placeholder);
}

.clh-rich-editor table {
    border-collapse: collapse;
    margin: 10px 0;
    width: 100%;
}

.clh-rich-editor td,
.clh-rich-editor th {
    border: 1px solid #1f2937;
    min-width: 64px;
    padding: 6px;
}

.clh-rich-editor img {
    display: block;
    height: auto;
    margin: 10px 0;
    max-width: 280px;
}

.clh-photo-crop-panel {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(130px, 1fr)) auto;
    padding: 14px;
}

.clh-photo-crop-panel p {
    color: #475569 !important;
    font-size: 13px;
    margin: 2px 0 0;
}

.clh-photo-crop-panel label {
    gap: 6px;
}

.clh-photo-crop-panel input[type="range"] {
    accent-color: #0b4798;
    min-height: 30px;
    width: 100%;
}

.clh-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clh-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clh-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.clh-button {
    align-items: center;
    background: #0b4798;
    border: 0;
    border-radius: 6px;
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    font-size: 16px;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    text-decoration: none !important;
}

.clh-form .button,
.clh-tool-card {
    text-decoration: none !important;
}

.clh-form .button {
    align-items: center;
    background: #fff;
    border: 1px solid #b9c5d3;
    border-radius: 6px;
    color: #0f172a !important;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    min-height: 38px;
    padding: 0 13px;
}

.clh-form .button:hover,
.clh-form .button:focus {
    border-color: #0b4798;
    color: #0b4798 !important;
}

.clh-form .button-primary,
.clh-form .button-primary:hover,
.clh-form .button-primary:focus {
    background: #0b4798 !important;
    border-color: #0b4798 !important;
    color: #fff !important;
}

.clh-button:hover,
.clh-button:focus {
    background: #093a7d;
    color: #fff;
}

.clh-company-list {
    display: grid;
    gap: 12px;
}

.clh-user-list {
    display: grid;
    gap: 12px;
}

.clh-user-card form {
    padding: 16px;
}

.clh-user-meta {
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 6px;
    color: #334155;
    padding: 10px 12px;
}

.clh-log-heading {
    align-items: center;
    gap: 16px;
}

.clh-log-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
}

.clh-log-stats div {
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 14px;
}

.clh-log-stats span {
    color: #64748b !important;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.clh-log-stats strong {
    color: #0b4798 !important;
    font-size: 24px;
    line-height: 1.1;
}

.clh-empty-log {
    background: #f8fafc;
    border: 1px dashed #b9c5d3;
    border-radius: 8px;
    color: #475569 !important;
    font-weight: 700;
    padding: 24px;
    text-align: center;
}

.clh-log-table-wrap {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    overflow-x: auto;
}

.clh-log-table {
    border: 0 !important;
    min-width: 1080px;
}

.clh-log-table th {
    background: #0b4798;
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.clh-log-table td {
    color: #0f172a !important;
    vertical-align: top;
}

.clh-log-table td span {
    color: #64748b !important;
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.clh-access-controls {
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: grid;
    gap: 18px;
    padding: 16px;
}

.clh-check-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clh-check-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 240px));
}

.clh-check-grid label {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 6px;
    color: #0f172a !important;
    display: flex;
    gap: 9px;
    min-height: 42px;
    padding: 10px 11px;
}

.clh-check-grid input {
    margin-top: 3px;
}

.clh-check-grid span {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.clh-company-card {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
}

.clh-company-card summary {
    align-items: center;
    background: #f6f7f7;
    cursor: pointer;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 13px 16px;
}

.clh-company-card summary span {
    color: #646970;
    font-weight: 700;
}

.clh-company-card summary strong {
    color: #1d2327;
    font-weight: 700;
}

.clh-company-fields {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.clh-template-note {
    background: #eef6ff;
    border-left: 4px solid #0b4798;
    border-radius: 4px;
    color: #1d3d63;
    font-weight: 600;
    padding: 10px 12px;
}

.clh-logo-picker {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.clh-logo-preview {
    align-items: center;
    background: #f6f7f7;
    border: 1px dashed #b6b8bb;
    border-radius: 6px;
    color: #646970;
    display: flex;
    height: 74px;
    justify-content: center;
    overflow: hidden;
    width: 118px;
}

.clh-logo-preview img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.clh-tools-hero {
    background: #0b4798;
    border-radius: 8px;
    box-shadow: 0 16px 30px rgba(11, 71, 152, 0.20);
    box-sizing: border-box;
    color: #fff !important;
    overflow: hidden;
    padding: 34px;
    position: relative;
}

.clh-tools-hero::after {
    background: #f06414;
    bottom: 0;
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    width: 100%;
}

.clh-tools-hero span {
    color: rgba(255, 255, 255, 0.82) !important;
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.clh-tools-hero h1 {
    color: #fff !important;
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 8px;
}

.clh-tools-hero p {
    color: rgba(255, 255, 255, 0.90) !important;
    font-size: 17px;
    margin: 0;
    max-width: 620px;
}

.clh-tool-cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.clh-tool-card {
    background: #fff !important;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
    box-sizing: border-box;
    color: #0f172a !important;
    display: grid;
    gap: 8px;
    min-height: 126px;
    padding: 22px;
}

.clh-tool-card:hover,
.clh-tool-card:focus {
    border-color: #0b4798;
    box-shadow: 0 14px 28px rgba(11, 71, 152, 0.14);
    outline: none;
}

.clh-tool-card strong {
    color: #0b4798 !important;
    font-size: 20px;
    line-height: 1.25;
}

.clh-tool-card span {
    color: #475569 !important;
    font-size: 15px;
}

.clh-layout-panel {
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 16px;
}

.clh-layout-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.clh-layout-heading span,
.clh-layout-selected {
    color: #0f172a !important;
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.clh-layout-heading p {
    color: #475569 !important;
    font-size: 14px;
    margin: 3px 0 0;
}

.clh-layout-editor {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, 420px) minmax(220px, 1fr);
}

.clh-preview-shell {
    align-items: center;
    background: #e8eef6;
    border: 1px solid #d2dce8;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 360px;
    padding: 18px;
}

.clh-preview-stage {
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    container-type: inline-size;
    max-height: 520px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.clh-preview-stage-a4 {
    aspect-ratio: 612 / 792;
}

.clh-preview-stage-id {
    aspect-ratio: 141.75 / 240.75;
    max-width: 240px;
}

.clh-preview-stage::before {
    border-top: 6px solid #0b4798;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.clh-preview-stage::after {
    background: linear-gradient(90deg, #0b4798 0 33%, #f06414 33% 66%, #0b4798 66% 100%);
    bottom: 0;
    content: "";
    height: 9%;
    left: 0;
    opacity: 0.9;
    position: absolute;
    right: 0;
}

.clh-preview-stage-id::after {
    height: 7%;
}

.clh-preview-design {
    color: #0f172a;
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.clh-preview-brand-logo {
    align-items: center;
    border: 1px solid #d8e0ea;
    border-radius: 5px;
    color: #64748b;
    display: flex;
    font-size: 9px;
    font-weight: 800;
    height: 10%;
    justify-content: center;
    left: 7%;
    overflow: hidden;
    position: absolute;
    top: 5%;
    width: 16%;
}

.clh-preview-brand-logo img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.clh-preview-brand-title {
    color: #0b4798;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    position: absolute;
    right: 7%;
    text-align: right;
    text-transform: uppercase;
    top: 6%;
    width: 52%;
}

.clh-preview-brand-meta {
    color: #475569;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.25;
    position: absolute;
    right: 7%;
    text-align: right;
    top: 14%;
    width: 52%;
}

.clh-preview-watermark {
    color: rgba(15, 23, 42, 0.08);
    font-size: 24px;
    font-weight: 900;
    left: 14%;
    line-height: 1;
    position: absolute;
    right: 14%;
    text-align: center;
    text-transform: uppercase;
    top: 47%;
}

.clh-preview-footer-cue {
    bottom: 1.6%;
    color: #fff;
    display: grid;
    font-size: 8px;
    font-weight: 900;
    grid-template-columns: repeat(3, 1fr);
    left: 0;
    position: absolute;
    right: 0;
    text-align: center;
    z-index: 2;
}

.clh-layout-panel[data-tool="invoice"] .clh-preview-brand-title {
    top: 5%;
}

.clh-layout-panel[data-tool="invoice"] .clh-preview-watermark,
.clh-layout-panel[data-tool="invoice"] .clh-preview-footer-cue {
    display: none;
}

.clh-layout-panel[data-tool="idcard"] .clh-preview-brand-logo {
    border: 0;
    height: 13%;
    left: 19%;
    top: 7%;
    width: 62%;
}

.clh-layout-panel[data-tool="idcard"] .clh-preview-brand-title {
    font-size: 12px;
    left: 7%;
    right: 7%;
    text-align: center;
    top: 9%;
    width: auto;
}

.clh-layout-panel[data-tool="idcard"] .clh-preview-brand-meta,
.clh-layout-panel[data-tool="idcard"] .clh-preview-watermark,
.clh-layout-panel[data-tool="idcard"] .clh-preview-footer-cue {
    display: none;
}

.clh-preview-item {
    align-items: center;
    background: rgba(11, 71, 152, 0.13);
    border: 1.5px solid rgba(11, 71, 152, 0.78);
    border-radius: 5px;
    box-sizing: border-box;
    color: #073b7c !important;
    cursor: move;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    line-height: 1.15;
    min-height: 18px;
    overflow: hidden;
    padding: 4px 18px 4px 6px;
    position: absolute;
    text-align: center;
    touch-action: none;
    user-select: none;
    z-index: 2;
}

.clh-preview-label {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    color: inherit;
    font-size: 10px;
    line-height: 1;
    padding: 2px 4px;
    position: absolute;
    right: 4px;
    top: 4px;
}

.clh-preview-content {
    color: #111827;
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    max-height: 100%;
    overflow: hidden;
    pointer-events: none;
    text-align: left;
    width: 100%;
}

.clh-preview-content strong,
.clh-preview-content span,
.clh-preview-content small,
.clh-preview-content em {
    display: block;
}

.clh-preview-content small,
.clh-preview-content em {
    color: #475569;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
}

.clh-preview-content table {
    border-collapse: collapse;
    font-size: 8px;
    margin: 2px 0;
    width: 100%;
}

.clh-preview-content td,
.clh-preview-content th {
    border: 1px solid rgba(15, 23, 42, 0.5);
    padding: 2px;
}

.clh-preview-content img {
    display: block;
    height: auto;
    margin: 2px 0;
    max-height: 42px;
    max-width: 100%;
    object-fit: contain;
}

.clh-preview-logo-img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.clh-preview-item[data-key="date"] .clh-preview-content,
.clh-preview-item[data-key="name"] .clh-preview-content,
.clh-preview-item[data-key="designation"] .clh-preview-content,
.clh-preview-item[data-key="totals"] .clh-preview-content {
    text-align: center;
}

.clh-preview-item[data-key="photo"] {
    padding: 0;
}

.clh-preview-item[data-key="photo"] .clh-preview-content {
    height: 100%;
}

.clh-preview-photo-frame,
.clh-preview-photo-placeholder {
    align-items: center;
    background: #eef2f7;
    display: flex;
    height: 100%;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.clh-preview-photo-frame img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.clh-preview-photo-placeholder {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.clh-preview-mini-logo {
    align-items: center;
    background: #0b4798;
    border-radius: 999px;
    color: #fff !important;
    display: inline-flex !important;
    font-size: 13px;
    height: 34px;
    justify-content: center;
    margin: 0 auto;
    width: 34px;
}

.clh-preview-rows {
    display: grid;
    gap: 3px;
}

.clh-preview-rows span {
    border-bottom: 1px solid rgba(15, 23, 42, 0.14);
    padding-bottom: 2px;
}

.clh-preview-item.is-selected {
    background: rgba(240, 100, 20, 0.16);
    border-color: #f06414;
    box-shadow: 0 0 0 2px rgba(240, 100, 20, 0.16);
    color: #8f3304 !important;
    z-index: 4;
}

.clh-preview-item i {
    border-bottom: 8px solid #0b4798;
    border-left: 8px solid transparent;
    bottom: 3px;
    cursor: nwse-resize;
    height: 0;
    pointer-events: auto;
    position: absolute;
    right: 3px;
    width: 0;
}

.clh-preview-item.is-selected i {
    border-bottom-color: #f06414;
}

.clh-layout-controls {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 14px;
}

.clh-layout-control-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.clh-layout-control-grid label {
    display: grid;
    gap: 5px;
}

.clh-layout-control-grid span {
    color: #475569 !important;
    font-size: 12px;
    font-weight: 800;
}

.clh-invoice-items {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    overflow: hidden;
}

.clh-invoice-engine {
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 14px;
}

.clh-items-heading {
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid #d8e0ea;
    display: flex;
    justify-content: space-between;
    padding: 13px 14px;
}

.clh-items-heading span {
    color: #0f172a !important;
    font-weight: 800;
}

.clh-item-row {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1.5fr) minmax(86px, 0.55fr) minmax(72px, 0.45fr) minmax(92px, 0.55fr) minmax(78px, 0.45fr) auto;
    padding: 10px 14px;
}

.clh-item-row:last-child {
    border-bottom: 0;
}

.clh-item-head {
    background: #0b4798;
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    min-height: 34px;
    padding-bottom: 8px;
    padding-top: 8px;
    text-transform: uppercase;
}

.clh-item-head span {
    color: #fff !important;
}

.clh-item-row input {
    min-height: 38px !important;
    padding: 8px 10px !important;
}

.clh-remove-item {
    justify-content: center;
}

@media (max-width: 720px) {
    .clh-panel {
        padding: 16px;
    }

    .clh-shortcode {
        padding: 14px;
    }

    .clh-grid,
    .clh-grid-3,
    .clh-tool-cards,
    .clh-check-grid,
    .clh-check-grid-compact,
    .clh-log-stats,
    .clh-photo-crop-panel {
        grid-template-columns: 1fr;
    }

    .clh-tools-hero {
        padding: 24px 20px;
    }

    .clh-tools-hero h1 {
        font-size: 28px;
    }

    .clh-login-shortcode {
        padding: 16px 10px;
    }

    .clh-login-shell {
        grid-template-columns: 1fr;
    }

    .clh-login-brand {
        min-height: 260px;
        padding: 28px 22px;
    }

    .clh-login-brand h1 {
        font-size: 30px;
    }

    .clh-login-card {
        padding: 26px 20px;
    }

    .clh-login-row,
    .clh-session-bar,
    .clh-log-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .clh-items-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .clh-layout-heading,
    .clh-layout-editor {
        grid-template-columns: 1fr;
    }

    .clh-layout-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .clh-item-head {
        display: none;
    }

    .clh-item-row {
        grid-template-columns: 1fr;
    }

    .clh-company-card summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* Final production polish */
.clh-wrap,
.clh-shortcode {
    --clh-primary: #0b4798;
    --clh-primary-dark: #083a7a;
    --clh-accent: #f06414;
    --clh-ink: #0f172a;
    --clh-muted: #475569;
    --clh-border: #d8e2ee;
    --clh-soft: #f8fafc;
    --clh-focus: rgba(11, 71, 152, 0.18);
    color-scheme: light;
}

.clh-shortcode {
    background: linear-gradient(180deg, #f7fafc 0%, #edf4fb 100%) !important;
    border: 1px solid #e0e8f2;
    border-radius: 10px;
}

.clh-panel,
.clh-session-bar,
.clh-tool-card,
.clh-login-shell {
    border-color: var(--clh-border);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.clh-panel {
    overflow: hidden;
}

.clh-panel-heading {
    margin-left: -2px;
    padding-left: 14px;
    position: relative;
}

.clh-panel-heading::before {
    background: var(--clh-accent);
    border-radius: 999px;
    bottom: 16px;
    content: "";
    left: 0;
    position: absolute;
    top: 2px;
    width: 4px;
}

.clh-panel-heading h2,
.clh-login-card h2,
.clh-tools-hero h1 {
    letter-spacing: 0;
}

.clh-panel-heading p,
.clh-tools-hero p,
.clh-login-intro {
    max-width: 760px;
}

.clh-form label > span,
.clh-field-label,
.clh-items-heading span,
.clh-layout-heading span {
    letter-spacing: 0;
}

.clh-form input[type="text"],
.clh-form input[type="email"],
.clh-form input[type="tel"],
.clh-form input[type="url"],
.clh-form input[type="date"],
.clh-form input[type="number"],
.clh-form input[type="file"],
.clh-form select,
.clh-form textarea,
.clh-login-form input[type="text"],
.clh-login-form input[type="password"] {
    border-color: #b8c6d6;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.clh-form input[type="text"]:hover,
.clh-form input[type="email"]:hover,
.clh-form input[type="tel"]:hover,
.clh-form input[type="url"]:hover,
.clh-form input[type="date"]:hover,
.clh-form input[type="number"]:hover,
.clh-form input[type="file"]:hover,
.clh-form select:hover,
.clh-form textarea:hover,
.clh-login-form input[type="text"]:hover,
.clh-login-form input[type="password"]:hover {
    border-color: #8ea3bb;
}

.clh-form input[type="text"]:focus,
.clh-form input[type="email"]:focus,
.clh-form input[type="tel"]:focus,
.clh-form input[type="url"]:focus,
.clh-form input[type="date"]:focus,
.clh-form input[type="number"]:focus,
.clh-form input[type="file"]:focus,
.clh-form select:focus,
.clh-form textarea:focus,
.clh-login-form input[type="text"]:focus,
.clh-login-form input[type="password"]:focus,
.clh-rich-editor:focus {
    border-color: var(--clh-primary);
    box-shadow: 0 0 0 3px var(--clh-focus);
}

.clh-button,
.clh-form .button-primary,
.clh-session-actions a,
.clh-tool-card,
.clh-rich-tool,
.clh-rich-table,
.clh-rich-image,
.clh-layout-reset,
.clh-photo-crop-reset {
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.clh-button,
.clh-form .button-primary {
    box-shadow: 0 10px 18px rgba(11, 71, 152, 0.18);
}

.clh-button:hover,
.clh-button:focus,
.clh-form .button-primary:hover,
.clh-form .button-primary:focus {
    box-shadow: 0 12px 22px rgba(11, 71, 152, 0.24);
    transform: translateY(-1px);
}

.clh-tool-card {
    position: relative;
}

.clh-tool-card::before {
    background: linear-gradient(180deg, var(--clh-primary), var(--clh-accent));
    border-radius: 999px;
    bottom: 18px;
    content: "";
    left: 0;
    position: absolute;
    top: 18px;
    width: 4px;
}

.clh-tool-card:hover,
.clh-tool-card:focus {
    transform: translateY(-2px);
}

.clh-login-brand,
.clh-tools-hero {
    background: linear-gradient(135deg, #083a7a 0%, #0b4798 62%, #145db8 100%);
}

.clh-template-note,
.clh-invoice-engine,
.clh-access-controls,
.clh-photo-crop-panel,
.clh-layout-panel {
    background: linear-gradient(180deg, #f9fbfd 0%, #f3f7fb 100%);
}

.clh-rich-toolbar,
.clh-items-heading {
    background: #f3f7fb;
}

.clh-rich-editor {
    min-height: 320px;
}

.clh-preview-shell {
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.08) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.08) 75%),
        #e8eef6;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.clh-preview-stage {
    border-color: #b8c6d6;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.clh-preview-item {
    backdrop-filter: blur(2px);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.07);
}

.clh-preview-item:focus {
    outline: none;
}

.clh-preview-item.is-selected {
    box-shadow: 0 0 0 2px rgba(240, 100, 20, 0.22), 0 10px 20px rgba(15, 23, 42, 0.12);
}

.clh-layout-controls,
.clh-invoice-items,
.clh-log-table-wrap,
.clh-user-meta {
    border-color: var(--clh-border);
}

.clh-layout-selected {
    background: #eef6ff;
    border: 1px solid #cfe1f7;
    border-radius: 6px;
    padding: 8px 10px;
}

.clh-photo-crop-panel input[type="range"]:focus {
    outline: 2px solid var(--clh-focus);
    outline-offset: 3px;
}

.clh-log-stats div {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.clh-company-card summary:hover {
    background: #eef4fb;
}

@media (prefers-reduced-motion: reduce) {
    .clh-button,
    .clh-form .button-primary,
    .clh-session-actions a,
    .clh-tool-card,
    .clh-rich-tool,
    .clh-rich-table,
    .clh-rich-image,
    .clh-layout-reset,
    .clh-photo-crop-reset,
    .clh-form input,
    .clh-form select,
    .clh-form textarea {
        transition: none;
    }

    .clh-button:hover,
    .clh-button:focus,
    .clh-form .button-primary:hover,
    .clh-form .button-primary:focus,
    .clh-tool-card:hover,
    .clh-tool-card:focus {
        transform: none;
    }
}
