:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --border: #e4e7ec;
  --primary: #155eef;
  --primary-dark: #0b4bd4;
  --sidebar: #101828;
  --sidebar-hover: #1d2939;
  --success-bg: #dcfae6;
  --success-text: #067647;
  --danger-bg: #fee4e2;
  --danger-text: #b42318;
  --warning-bg: #fef0c7;
  --warning-text: #93370d;
  --shadow: 0 10px 30px rgba(16, 24, 40, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--primary); }
button, input, select, textarea { font: inherit; }

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px;
  color: #fff;
  background: linear-gradient(180deg, #101828 0%, #0c1424 100%);
  box-shadow: 8px 0 24px rgba(16, 24, 40, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 0 8px;
}

.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2e90fa, #155eef);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(21, 94, 239, .32);
}

.brand strong,
.brand span { display: block; }
.brand strong { font-size: 15px; }
.brand span { color: #98a2b3; font-size: 12px; margin-top: 2px; }

.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #d0d5dd;
  text-decoration: none;
  font-weight: 600;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.sidebar nav a:hover { background: var(--sidebar-hover); color: #fff; transform: translateX(2px); }
.sidebar nav a.active { background: #155eef; color: #fff; box-shadow: 0 8px 20px rgba(21, 94, 239, .22); }
.sidebar nav a:last-child { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; padding-top: 18px; }

.main {
  min-width: 0;
  padding: 28px 32px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.2; }
.topbar p { margin: 0; color: var(--muted); }
.user {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(16, 24, 40, .04);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: 21px; }
.card h3 { margin-top: 0; }

.metric { min-height: 112px; display: flex; flex-direction: column; justify-content: center; }
.metric .label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.metric .value { margin-top: 7px; font-size: 34px; font-weight: 800; line-height: 1; color: var(--primary); }
.small { color: var(--muted); font-size: 13px; }

.notice {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.notice.ok, .ok { background: var(--success-bg); color: var(--success-text); border-color: #abefc6; }
.notice.err, .err { background: var(--danger-bg); color: var(--danger-text); border-color: #fecdca; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--surface-soft); color: #344054; font-size: 12px; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdff; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.ok { background: var(--success-bg); color: var(--success-text); }
.badge.danger { background: var(--danger-bg); color: var(--danger-text); }
.badge.warn { background: var(--warning-bg); color: var(--warning-text); }

.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover, button:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(21, 94, 239, .18); }
.btn.secondary, button.secondary { background: #fff; color: #344054; border-color: #d0d5dd; }
.btn.secondary:hover, button.secondary:hover { background: #f9fafb; border-color: #98a2b3; box-shadow: none; }
.btn.danger, button.danger { background: #b42318; border-color: #b42318; color: #fff; }
.btn.danger:hover, button.danger:hover { background: #912018; border-color: #912018; }
button:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form > div, .form label { min-width: 0; }
.form .full, .full { grid-column: 1 / -1; }
label { display: block; color: #344054; font-weight: 700; }
input, select, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: #84adff; box-shadow: 0 0 0 4px rgba(21, 94, 239, .10); }
textarea { min-height: 110px; resize: vertical; }
input[readonly] { background: #f9fafb; color: var(--muted); }
.checkline { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }
.checkline input { width: auto; margin: 0; }
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.password-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.telemetry-group, .telemetry-product {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.telemetry-group > summary, .telemetry-product > summary { cursor: pointer; padding: 14px 16px; font-weight: 800; background: var(--surface-soft); }
.telemetry-group > div, .telemetry-product > div { padding: 14px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, .58);
  z-index: 1000;
}
.modal-backdrop.open, .modal-backdrop[style*="display: flex"], .modal-backdrop[style*="display:flex"] { display: grid !important; }
.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(16, 24, 40, .28);
}
.modal-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-title h3 { margin: 0; }
.modal-close { min-width: 38px; padding: 6px; border-radius: 999px; background: #f2f4f7; color: #344054; border-color: #eaecf0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }

/* Product/version workflow v2.1 */
.compact-card { padding: 18px 20px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-head h2 { margin: 0 0 5px; }
.count-pill { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 7px 11px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.inline-form { display: grid; grid-template-columns: 2fr 1.4fr auto; gap: 14px; align-items: end; }
.inline-form label, .version-create-form label, .version-edit-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.inline-action { padding-bottom: 1px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.product-card { border: 1px solid var(--border); border-radius: 16px; padding: 18px; text-decoration: none; color: var(--text); background: #fff; transition: .15s; }
.product-card:hover { border-color: #93c5fd; transform: translateY(-2px); box-shadow: 0 12px 25px rgba(15, 23, 42, .07); }
.product-card-top { display: flex; justify-content: space-between; align-items: center; }
.product-icon { width: 42px; height: 42px; border-radius: 12px; background: #eff6ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.product-card h3 { margin: 16px 0 3px; }
.product-code { font: 13px Consolas, monospace; color: var(--muted); }
.product-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.product-stats div { background: #f8fafc; border-radius: 10px; padding: 10px; }
.product-stats strong, .product-stats span { display: block; }
.product-stats span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.card-link { color: var(--primary); font-weight: 700; font-size: 14px; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); background: #f8fafc; border-radius: 12px; }
.breadcrumb { display: flex; gap: 9px; align-items: center; margin: -6px 0 16px; color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.version-create-form { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.version-list { display: flex; flex-direction: column; gap: 16px; }
.version-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.version-summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.version-title { font-size: 20px; font-weight: 800; }
.version-edit-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; gap: 14px; padding: 18px; }
.check-stack { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.version-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.installer-box { border-top: 1px solid var(--border); padding: 16px 18px; background: #fbfdff; }
.installer-box h3 { margin: 0 0 10px; }
.installer-info { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.installer-info code { font-size: 11px; max-width: 100%; overflow-wrap: anywhere; color: var(--muted); }
.upload-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; gap: 12px; align-items: center; }
.upload-row input[type=file] { padding: 8px; }
.password-panel { grid-column: 1 / -1; }

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .version-edit-form { grid-template-columns: repeat(2, 1fr); }
  .upload-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .brand { margin-bottom: 12px; }
  .sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sidebar nav a { justify-content: center; text-align: center; min-height: 46px; }
  .sidebar nav a:last-child { margin-top: 0; border-top: 0; border-radius: 10px; padding-top: 10px; }
  .main { padding: 22px 18px 38px; }
  .topbar { align-items: center; }
}

@media (max-width: 760px) {
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-direction: column; align-items: flex-start; }
  .user { max-width: 100%; }
  .grid, .form, .inline-form, .version-create-form, .version-edit-form, .product-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
  .product-stats { grid-template-columns: 1fr; }
  .upload-row { grid-template-columns: 1fr; }
  .password-row { grid-template-columns: 1fr; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  th, td { padding: 11px 10px; }
}

/* Zentrale Kundenakte V2.7.0 */
.readonly-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.readonly-grid>div{padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}
.readonly-grid span,.readonly-grid strong{display:block}.readonly-grid span{font-size:12px;color:var(--muted);font-weight:700;margin-bottom:4px}
.readonly-grid .full{grid-column:1/-1}
@media(max-width:700px){.readonly-grid{grid-template-columns:1fr}}
/* Downloadverwaltung V2.8.0 */
.channel-release{font-weight:700}.channel-beta{font-weight:700}.channel-alpha{font-weight:700}


/* RWS Modullizenzierung V2.9.0 */
.module-create-form,.module-admin-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.module-create-form{padding:16px;border:1px solid var(--border);border-radius:14px;background:#f8fafc;margin-bottom:16px}
.module-admin-list{display:flex;flex-direction:column;gap:12px}
.module-admin-card{padding:16px;border:1px solid var(--border);border-radius:14px;background:#fff}
.module-admin-card label,.module-create-form label{display:block;font-weight:700;margin-bottom:6px}
.module-admin-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.module-price-hint{font-size:12px;color:var(--muted);margin-right:auto}
.modules-cell{min-width:280px}
.license-module-list{display:flex;flex-direction:column;gap:7px}
.license-module-row{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:8px 9px;border:1px solid var(--border);border-radius:10px;background:#f8fafc;margin:0!important}
.license-module-info{min-width:0}.license-module-info strong,.license-module-info small{display:block}.license-module-info small{color:var(--muted);font-size:11px;margin-top:2px}
.ios-switch{position:relative;display:inline-block;flex:0 0 auto;width:44px;height:25px}
.ios-switch input{opacity:0;width:0;height:0;position:absolute}
.ios-slider{position:absolute;cursor:pointer;inset:0;background:#cbd5e1;border-radius:999px;transition:.18s}
.ios-slider:before{content:"";position:absolute;height:19px;width:19px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(15,23,42,.25);transition:.18s}
.ios-switch input:checked + .ios-slider{background:#22c55e}.ios-switch input:checked + .ios-slider:before{transform:translateX(19px)}
.module-save-note{margin-top:5px}
.customer-modules{margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.customer-modules h3{margin:0 0 12px}.customer-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.customer-module-card{border:1px solid var(--border);border-radius:12px;padding:13px;background:#fff}.customer-module-card.not-licensed{background:#f8fafc}
.customer-module-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.customer-module-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:9px;font-size:12px}.customer-module-meta code{background:#eef2f7;padding:3px 6px;border-radius:5px}
@media(max-width:900px){.module-create-form,.module-admin-card,.customer-module-grid{grid-template-columns:1fr}.modules-cell{min-width:220px}}


/* ==========================================================
   RWS V2.9.1 – Module UI Cleanup
   ========================================================== */

/* Kundenstamm: kompakte Modulfreigabe */
.modules-cell{
    min-width:260px;
    vertical-align:top;
}
.license-module-list{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:240px;
}
.license-module-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:9px 10px;
    border:1px solid #e1e7ef;
    border-radius:9px;
    background:#f9fbfd;
}
.license-module-info{
    display:flex;
    flex-direction:column;
    min-width:0;
    line-height:1.2;
}
.license-module-info strong{
    font-size:13px;
    color:#172033;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.license-module-info span{
    margin-top:3px;
    font-size:10px;
    color:#788496;
    white-space:normal;
}
.module-empty-inline{
    font-size:12px;
    color:#7c8797;
}

/* iOS-artiger Toggle */
.ios-switch{
    position:relative;
    display:inline-block;
    width:46px;
    height:26px;
    flex:0 0 46px;
    cursor:pointer;
}
.ios-switch input{
    opacity:0;
    width:0;
    height:0;
    position:absolute;
}
.ios-slider{
    position:absolute;
    inset:0;
    border-radius:999px;
    background:#c9d0d9;
    transition:.18s ease;
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
}
.ios-slider:before{
    content:"";
    position:absolute;
    width:20px;
    height:20px;
    left:3px;
    top:3px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 4px rgba(0,0,0,.28);
    transition:.18s ease;
}
.ios-switch input:checked + .ios-slider{
    background:#22a447;
}
.ios-switch input:checked + .ios-slider:before{
    transform:translateX(20px);
}
.ios-switch input:focus-visible + .ios-slider{
    outline:2px solid #1769e0;
    outline-offset:2px;
}

/* Produktstamm: kompakte Liste statt Formulare untereinander */
.module-clean-list{
    margin-top:14px;
    border:1px solid #dfe5ee;
    border-radius:10px;
    overflow:hidden;
    background:#fff;
}
.module-clean-row{
    display:grid;
    grid-template-columns:minmax(220px,1.3fr) minmax(280px,1fr) auto;
    align-items:center;
    gap:18px;
    padding:14px 16px;
    border-bottom:1px solid #e8edf3;
}
.module-clean-row:last-child{
    border-bottom:0;
}
.module-clean-main{
    display:flex;
    flex-direction:column;
    min-width:0;
}
.module-clean-main strong{
    font-size:15px;
    color:#172033;
}
.module-code{
    margin-top:3px;
    font-size:11px;
    color:#7b8797;
}
.module-clean-meta{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.module-clean-price{
    font-size:11px;
    color:#5f6b7a;
}
.module-clean-actions{
    display:flex;
    justify-content:flex-end;
}
.module-list-footer{
    margin-top:14px;
}

/* Detailformular nur wenn geöffnet */
.module-editor-panel{
    margin-top:18px;
    padding:18px;
    border:1px solid #d9e1eb;
    border-radius:11px;
    background:#f8fafc;
}
.module-editor-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:15px;
}
.module-editor-header h3{
    margin:0 0 3px;
}
.module-editor-form{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.module-editor-form label{
    display:block;
    font-weight:700;
    margin-bottom:6px;
}
.module-editor-form .full{
    grid-column:1/-1;
}
.module-editor-form textarea{
    width:100%;
    resize:vertical;
}
.module-editor-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding-top:4px;
}
.module-editor-buttons{
    display:flex;
    gap:9px;
    justify-content:flex-end;
}

@media(max-width:1100px){
    .module-clean-row{
        grid-template-columns:1fr auto;
    }
    .module-clean-meta{
        grid-column:1/2;
    }
    .module-clean-actions{
        grid-column:2/3;
        grid-row:1/3;
    }
}
@media(max-width:900px){
    .module-clean-row{
        grid-template-columns:1fr;
    }
    .module-clean-meta,
    .module-clean-actions{
        grid-column:auto;
        grid-row:auto;
        justify-content:flex-start;
    }
    .module-editor-form{
        grid-template-columns:1fr;
    }
    .module-editor-form .full{
        grid-column:auto;
    }
    .module-editor-bottom{
        align-items:flex-start;
        flex-direction:column;
    }
}

/* RWS Business / Support V3.0.0 */
.support-live{display:flex;align-items:center;gap:22px;margin-bottom:20px;padding:18px 22px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow)}
.support-live.running{border-left:5px solid #22c55e}.support-live.paused{border-left:5px solid #f59e0b}
.support-clock{min-width:260px;padding:14px 20px;border-radius:12px;background:#fff6a6;text-align:center;font:700 48px/1.1 Consolas,"Courier New",monospace;letter-spacing:.04em;color:#111827}
.text-success{color:var(--success-text)}
.notice.warn{background:var(--warning-bg);color:var(--warning-text);border-color:#fedf89}
hr{border:0;border-top:1px solid var(--border);margin:8px 0 16px}
@media(max-width:760px){.support-live{align-items:flex-start;flex-direction:column}.support-clock{min-width:0;width:100%;font-size:36px}}

/* RWS Supportkalender V3.0.2 */
.calendar-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.calendar-head h2 { margin-bottom:4px; }
.calendar-head .actions strong { min-width:170px; text-align:center; font-size:17px; text-transform:capitalize; }
.calendar-weekdays { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border:1px solid var(--border); border-bottom:0; border-radius:12px 12px 0 0; overflow:hidden; }
.calendar-weekdays span { padding:9px 8px; text-align:center; font-size:12px; font-weight:800; color:#475467; background:var(--surface-soft); border-right:1px solid var(--border); }
.calendar-weekdays span:last-child { border-right:0; }
.support-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border-left:1px solid var(--border); border-top:1px solid var(--border); }
.cal-day { min-width:0; min-height:128px; display:block; padding:8px; text-align:left; border:0; border-right:1px solid var(--border); border-bottom:1px solid var(--border); border-radius:0; background:#fff; color:var(--text); box-shadow:none; font-weight:400; overflow:hidden; }
.cal-day:nth-child(7n) { border-right:1px solid var(--border); }
.cal-day:hover { background:#f8fbff; border-color:var(--border); transform:none; box-shadow:inset 0 0 0 2px rgba(21,94,239,.12); }
.cal-day.outside { background:#fafafa; color:#98a2b3; }
.cal-day.past { cursor:default; opacity:.65; }
.cal-day.past:hover { background:#fafafa; box-shadow:none; }
.cal-day.today { box-shadow:inset 0 0 0 2px var(--primary); }
.cal-day-number { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; font-weight:800; font-size:13px; }
.cal-day.today .cal-day-number { background:var(--primary); color:#fff; }
.cal-events { display:grid; gap:5px; margin-top:6px; }
.cal-event { display:block; max-width:100%; padding:5px 7px; border-radius:7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:800; cursor:pointer; }
.cal-event.free { background:#eef4ff; color:#1849a9; border:1px solid #c7d7fe; }
.cal-event.booked { background:var(--success-bg); color:var(--success-text); border:1px solid #abefc6; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; color:var(--muted); font-size:12px; }
.calendar-legend span { display:inline-flex; align-items:center; gap:6px; }
.cal-dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.cal-dot.free { background:#2e90fa; }.cal-dot.booked { background:#12b76a; }.cal-dot.google { background:#7f56d9; }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.modal-head h2 { margin:0 0 4px; }
.calendar-modal { width:min(640px,100%); }
@media (max-width: 900px) {
  .calendar-head { flex-direction:column; }
  .cal-day { min-height:100px; padding:5px; }
  .cal-event { font-size:10px; padding:4px; }
}
@media (max-width: 700px) {
  .support-calendar, .calendar-weekdays { min-width:760px; }
  .calendar-card { overflow-x:auto; }
}

.sync-error { margin-top: 5px; max-width: 420px; color: #b42318; line-height: 1.3; overflow-wrap: anywhere; }

/* RWS Website Analytics V3.0.4 */
.wa-metrics{margin-bottom:16px}.wa-secondary{grid-template-columns:repeat(2,minmax(0,1fr));max-width:760px}
.wa-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.wa-chart{height:270px;display:grid;grid-template-columns:repeat(14,minmax(28px,1fr));align-items:end;gap:8px;padding:28px 8px 4px;border-top:1px solid var(--border);margin-top:14px;overflow-x:auto}
.wa-bar-col{height:220px;min-width:28px;display:grid;grid-template-rows:22px 1fr 28px;align-items:end;text-align:center}
.wa-bar-value{font-size:11px;font-weight:800;color:#475467;align-self:end;padding-bottom:4px}
.wa-bar{width:min(34px,72%);min-height:3px;margin:0 auto;background:var(--primary);border-radius:7px 7px 2px 2px;box-shadow:0 4px 12px rgba(21,94,239,.12)}
.wa-bar-label{font-size:10px;color:var(--muted);padding-top:7px;white-space:nowrap}
.wa-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.wa-num{text-align:right}.wa-privacy{border-left:4px solid #2e90fa}
@media(max-width:900px){.wa-two-col{grid-template-columns:1fr}.wa-secondary{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.wa-secondary{grid-template-columns:1fr}.wa-chart{grid-template-columns:repeat(14,42px)}}
