:root {
  --navy: #1a2f4d;
  --blue: #087eaf;
  --cyan: #02ade3;
  --ink: #17283f;
  --muted: #68778a;
  --line: #e0e7ef;
  --canvas: #f3f6fa;
  --paper: #fff;
  --shadow: 0 12px 32px rgba(27, 56, 92, .08);
  --font-body: "DM Sans", Arial, sans-serif;
  --font-heading: "Manrope", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font-body); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-heading); }
h1 { margin-bottom: 0; font-size: 30px; letter-spacing: -.9px; line-height: 1.12; }
h2 { margin-bottom: 7px; font-size: 22px; letter-spacing: -.6px; line-height: 1.18; }
h3 { margin-bottom: 8px; font-size: 16px; letter-spacing: -.2px; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 7px; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 13px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; }
.button.primary { color: #fff; background: var(--blue); }
.button.secondary { color: var(--navy); background: #e8eef5; }
.inline-button { margin-top: 8px; }
.text-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 700; text-decoration: none; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: white; background: transparent; font-weight: 700; }
.icon-button.dark { border-color: var(--line); color: var(--ink); }
.login-view { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 75% 20%, rgba(2,173,227,.16), transparent 32%), linear-gradient(135deg, #11253e, #244d75); }
.login-card { width: min(420px, 100%); padding: 32px 34px 34px; border: 1px solid rgba(255,255,255,.35); border-radius: 18px; background: #fff; box-shadow: 0 22px 52px rgba(5,21,42,.3); }
.login-logo { display: grid; min-height: 132px; place-items: center; margin: -14px -16px 25px; padding: 16px; border-radius: 13px; background: linear-gradient(135deg, #10243d, #1a3b5e); }
.login-logo img { display: block; width: 126px; height: 121px; object-fit: contain; }
.login-copy { margin-bottom: 24px; }
.login-copy h1 { color: var(--navy); font-size: 31px; }
.login-copy .muted { margin: 10px 0 0; line-height: 1.55; }
.login-fields { display: grid; gap: 15px; }
.login-card .field input { min-height: 43px; padding: 11px 12px; }
.login-submit { width: 100%; min-height: 42px; margin-top: 6px; }
.form-error { min-height: 17px; margin: 11px 0 0; color: #b84f48; font-size: 12px; line-height: 1.4; }
.password-rules { display: grid; gap: 4px; margin: 16px 0; padding: 12px; border-radius: 8px; color: var(--muted); background: #f5f8fb; font-size: 12px; }
.password-rules strong { color: var(--ink); }
.password-rules span::before { margin-right: 7px; color: var(--blue); content: "•"; }
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 228px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 18px 13px; color: #fff; background: var(--navy); }
.brand { display: flex; align-items: center; justify-content: center; margin-bottom: 25px; color: #fff; text-decoration: none; }
.brand img { width: 104px; height: 100px; object-fit: contain; }
.nav-link { display: flex; width: 100%; align-items: center; gap: 9px; padding: 10px 9px; border: 0; border-radius: 7px; color: #c5d7e8; background: transparent; font-size: 12px; font-weight: 700; text-align: left; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(2,173,227,.16); }
.nav-link span { display: inline-flex; width: 22px; color: #70ceee; font-size: 10px; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 10px 5px; color: #c5d7e8; }
.sidebar-foot strong, .sidebar-foot small { display: block; font-size: 10px; }
.sidebar-foot small { margin-top: 4px; color: #91adc7; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ad6a3; box-shadow: 0 0 0 4px rgba(106,214,163,.14); }
.workspace { min-width: 0; }
.topbar { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 34px 21px; color: #fff; background: linear-gradient(110deg, #1a2f4d, #264e76); }
.topbar-copy { display: grid; gap: 5px; }
.topbar .eyebrow { margin: 0; color: #70ceee; }
.topbar h1 { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.profile strong, .profile small { display: block; }
.profile small { margin-top: 3px; color: #b9d1e6; font-size: 11px; }
.content { padding: 30px 34px 52px; }
.welcome, .placeholder { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.welcome p:last-child, .placeholder p:last-of-type { max-width: 760px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.dashboard-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 27px 29px; overflow: hidden; border-radius: 15px; color: #fff; background: radial-gradient(circle at 86% 16%, rgba(2,173,227,.28), transparent 29%), linear-gradient(118deg, #1a2f4d, #264e76); box-shadow: var(--shadow); }
.dashboard-hero .eyebrow { color: #70ceee; }
.dashboard-hero h2 { margin-bottom: 9px; font-size: 28px; }
.dashboard-hero p:last-child { max-width: 700px; margin-bottom: 0; color: #c5d7e8; line-height: 1.55; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-hero .button.primary { background: #fff; color: var(--navy); }
.dashboard-hero .button.secondary { color: #fff; background: rgba(255,255,255,.13); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 20px 0; }
.metric, .card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.metric span, .metric small { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin: 8px 0 5px; color: var(--navy); font-size: 28px; }
.dashboard-metric { position: relative; overflow: hidden; padding: 19px 19px 18px; }
.dashboard-metric::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; background: var(--cyan); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 15px; }
.dashboard-section { padding: 20px; }
.dashboard-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dashboard-section-head h2 { margin-bottom: 0; font-size: 19px; }
.dashboard-section-head span { color: var(--muted); font-size: 11px; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.module-card { position: relative; overflow: hidden; box-shadow: none; }
.module-card::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; content: ""; background: var(--cyan); }
.module-card .module-label { display: block; margin-bottom: 13px; color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.module-card p { min-height: 58px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.dashboard-side { display: grid; align-content: start; gap: 15px; }
.ticket-snapshot { display: grid; gap: 0; }
.ticket-snapshot-row { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.ticket-snapshot-row strong { font-size: 11px; }
.ticket-snapshot-row p { overflow: hidden; margin: 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.coming-list { display: grid; gap: 10px; }
.coming-item { padding: 11px 12px; border-radius: 9px; background: #f5f8fb; }
.coming-item strong, .coming-item small { display: block; }
.coming-item strong { font-size: 12px; }
.coming-item small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.module-intro { padding: 21px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.module-intro p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.account-card p, .project-card p { min-height: 34px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.account-card small { color: var(--muted); font-size: 11px; }
.crm-hero { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 26px 27px; border-radius: 14px; color: white; background: radial-gradient(circle at 88% 30%, rgba(2,173,227,.24), transparent 27%), linear-gradient(115deg, #1a2f4d, #264e76); box-shadow: var(--shadow); }
.crm-hero .eyebrow { color: #70ceee; }
.crm-hero h2 { margin-bottom: 8px; font-size: 28px; }
.crm-hero p:last-child { max-width: 690px; margin-bottom: 0; color: #c5d7e8; line-height: 1.5; }
.crm-live { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; color: #c5d7e8; font-size: 11px; font-weight: 700; white-space: nowrap; }
.crm-live i { width: 8px; height: 8px; border-radius: 50%; background: #6ad6a3; box-shadow: 0 0 0 4px rgba(106,214,163,.15); }
.crm-metric { position: relative; overflow: hidden; }
.crm-metric::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; background: var(--cyan); }
.crm-metric-icon { display: grid; width: 29px; height: 29px; place-items: center; margin-bottom: 13px; border-radius: 8px; color: var(--blue); background: #e8f4f9; font-size: 10px; font-weight: 700; }
.crm-overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 13px; margin-bottom: 7px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.section-heading span { color: var(--muted); font-size: 11px; }
.crm-activity-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.crm-activity-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--blue); background: #e8f4f9; font-size: 10px; font-weight: 700; }
.crm-activity-row strong, .crm-activity-row p { display: block; margin: 0; font-size: 12px; }
.crm-activity-row p { margin-top: 3px; color: var(--muted); }
.crm-activity-row time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.pipeline-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.pipeline-row span, .pipeline-row strong { display: block; }
.pipeline-row span { color: var(--muted); font-size: 11px; }
.pipeline-row strong { margin-top: 4px; color: var(--navy); font-size: 20px; }
.pipeline-row b { color: var(--blue); font-size: 12px; text-align: right; }
.tc-account-card { position: relative; overflow: hidden; padding-top: 21px; transition: box-shadow 160ms ease, transform 160ms ease; }
.tc-account-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; content: ""; background: var(--cyan); }
.tc-account-card:hover { box-shadow: 0 15px 30px rgba(27,56,92,.14); transform: translateY(-2px); }
.account-card-top, .account-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-grade { display: inline-flex; padding: 5px 7px; border-radius: 99px; color: #376685; background: #e8f2f8; font-size: 10px; font-weight: 700; }
.grade-grade-a { color: #147654; background: #e6f5ee; }
.grade-grade-b { color: #376685; background: #e8f2f8; }
.grade-grade-c { color: #ad6723; background: #fff2e5; }
.account-location { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tc-account-card h3 { margin-top: 18px; color: var(--navy); }
.tc-account-card p span { color: #91a0b0; font-size: 11px; }
.account-card-foot { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.account-card-foot strong { color: var(--blue); font-size: 9px; letter-spacing: 1px; }
.card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 13px 0; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-meta small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.card-meta strong { font-size: 12px; }
.back-button { margin-bottom: 15px; }
.detail-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.detail-row span { color: var(--muted); font-size: 12px; }
.detail-row strong { font-size: 12px; text-align: right; }
.long-copy { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.55; white-space: pre-line; }
.simple-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.settings-card { margin-top: 18px; }
.logo-settings { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 18px; }
.logo-preview { display: grid; min-height: 140px; place-items: center; padding: 18px; border-radius: 10px; background: var(--navy); }
.logo-preview img { max-width: 170px; max-height: 105px; object-fit: contain; }
.logo-controls { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; gap: 10px; }
.logo-controls p { margin-bottom: 0; }
.font-settings { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 18px; }
.font-preview { display: grid; align-content: center; gap: 7px; min-height: 140px; padding: 18px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--navy), #264e76); }
.font-preview strong { font-family: var(--font-heading); font-size: 24px; }
.font-preview span { color: #c5d7e8; font-size: 13px; }
.font-controls { display: grid; gap: 12px; }
.font-mode { display: flex; flex-wrap: wrap; gap: 13px; }
.font-mode label { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.font-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.font-controls .field input[type="file"] { padding: 8px; background: #fff; }
.font-controls .button { justify-self: start; }
.file-button input { display: none; }
.user-form { display: grid; grid-template-columns: 1.2fr 1fr 1.25fr 180px auto; gap: 10px; align-items: start; margin-top: 18px; }
.user-form .button { min-height: 38px; margin-top: 22px; }
.form-message { min-height: 17px; margin: 11px 0 0; color: var(--blue); font-size: 12px; }
.user-table-wrap { overflow-x: auto; margin-top: 13px; border: 1px solid var(--line); border-radius: 9px; }
.user-table td small { display: block; margin-top: 3px; color: var(--muted); }
.text-button.danger { color: #b84f48; }
.embedded-module { height: calc(100vh - 94px); margin: -30px -34px -52px; overflow: hidden; background: #fff; }
.embedded-module iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 27px 0 13px; }
.toolbar h2 { margin-bottom: 0; }
.toolbar-actions { display: flex; gap: 8px; }
input, textarea, select { border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(2,173,227,.12); }
.toolbar input { min-width: 220px; padding: 9px 10px; }
.toolbar select { padding: 9px 10px; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; color: var(--muted); background: #f5f8fb; font-size: 10px; letter-spacing: .8px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); font-size: 12px; vertical-align: top; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.issue-cell { min-width: 260px; max-width: 520px; line-height: 1.45; white-space: pre-line; }
.tag { display: inline-flex; padding: 5px 7px; border-radius: 99px; color: #376685; background: #e8f2f8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.tag.high, .tag.urgent { color: #a94f28; background: #fff0e4; }
.tag.resolved, .tag.closed { color: #147654; background: #e6f5ee; }
.tag.new { color: #a94f28; background: #fff0e4; }
.empty { padding: 30px; color: var(--muted); text-align: center; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; background: rgba(10,25,46,.48); }
.modal { position: fixed; z-index: 11; top: 50%; left: 50%; width: min(630px, 94vw); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 14px; background: #fff; box-shadow: 0 20px 48px rgba(10,25,46,.22); transform: translate(-50%, -50%); }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.field input, .field textarea, .field select { width: 100%; padding: 10px; }
.full { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.checkbox span { margin: 0; }
.modal-actions { display: flex; justify-content: end; gap: 8px; }
.ticket-summary { padding: 13px; border-radius: 8px; background: #f5f8fb; }
.ticket-summary p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; white-space: pre-line; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 68px 1fr; }
  .sidebar { padding: 14px 8px; }
  .nav-link:not(.active) { font-size: 0; }
  .brand { justify-content: center; }
  .brand img { width: 49px; height: 48px; }
  .nav-link { justify-content: center; font-size: 0; }
  .nav-link span { width: auto; font-size: 10px; }
  .sidebar-foot div { display: none; }
  .sidebar-foot { justify-content: center; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-overview { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 17px 16px; }
  .content { padding: 18px 15px 35px; }
  .embedded-module { height: calc(100vh - 132px); margin: -18px -15px -35px; }
  .profile { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .toolbar input { min-width: 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .module-grid { grid-template-columns: 1fr; }
  .metric { padding: 14px; }
  .metric strong { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .cards-grid, .detail-layout, .logo-settings, .font-settings { grid-template-columns: 1fr; }
  .font-upload-grid { grid-template-columns: 1fr; }
  .user-form { grid-template-columns: 1fr; }
  .crm-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; padding: 22px; }
  .login-card { padding: 26px 24px 28px; }
  .login-logo { margin: -10px -8px 22px; }
}
