/* CourtOS Trainer Hub module skin
   Shared visual contract for page-like modules and specialist workspaces. */
:root{
  --ctm-brand:#27407a;
  --ctm-brand-strong:#16264c;
  --ctm-accent:#e0a82e;
  --ctm-surface:#fff;
  --ctm-surface-soft:#f5f6f9;
  --ctm-text:#0c0e12;
  --ctm-muted:#5c6470;
  --ctm-border:#e6e2db;
  --ctm-radius:14px;
  --ctm-gutter:clamp(20px,3vw,44px);
  --ctm-shadow:0 8px 28px rgba(22,38,76,.055),0 1px 2px rgba(22,38,76,.04);
}

.ctm-topbar{
  box-sizing:border-box;
  min-height:62px;
  width:100%;
  display:flex;
  align-items:center;
  gap:20px;
  padding:10px var(--ctm-gutter);
  border:0;
  background:var(--ctm-brand-strong);
  color:#fff;
  font-family:'Sora',system-ui,sans-serif;
}
.ctm-topbar__brand{display:flex;align-items:center;gap:20px;min-width:0}
.ctm-topbar__logo{display:block;width:28px;height:28px;flex:0 0 28px;object-fit:contain}
.ctm-topbar__brand strong{font-size:24px;line-height:1;letter-spacing:-1px;white-space:nowrap}
.ctm-topbar__module{padding-left:20px;border-left:1px solid rgba(255,255,255,.3);color:#fff;font-size:16px;font-weight:600;line-height:1.2;white-space:nowrap}
.ctm-topbar__actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:0;margin-left:auto}
.ctm-topbar__hub{flex:0 0 auto;color:#fff;text-decoration:none;font-size:12px;font-weight:650;white-space:nowrap}
.ctm-topbar__hub:hover{text-decoration:underline;text-underline-offset:4px}

/* Mein Tag lebt innerhalb derselben Workspace-Hülle wie die Fachmodule.
   Die Modul-Topbar beginnt daher direkt unter der globalen Tabnavigation. */
body[data-courtos-module="hub"] .v2-hub-main{width:100%;padding:0 0 44px}
body[data-courtos-module="hub"] .trainer-today{width:100%;max-width:none;margin:0;padding:0 var(--ctm-gutter) 56px}
body[data-courtos-module="hub"] .trainer-today__topbar{width:calc(100% + (var(--ctm-gutter) * 2));margin:0 calc(var(--ctm-gutter) * -1) 34px}
body[data-courtos-module="hub"] .trainer-today__header{max-width:none}
body[data-courtos-module="hub"] .trainer-today__topbar .ctm-topbar__hub{text-decoration:none;cursor:default}
/* Die Suche ist eine globale Aktion und liegt deshalb optisch in der Mitte
   der Modul-Topbar — unabhängig davon, wie lang Marke oder Hub-Link sind. */
body[data-courtos-module="hub"] .trainer-today__topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px) minmax(0,1fr);gap:20px}
body[data-courtos-module="hub"] .trainer-today__topbar-actions{display:contents}
body[data-courtos-module="hub"] .trainer-today__topbar .trainer-hub-search{grid-column:2;grid-row:1;width:100%;max-width:none;min-height:38px;border:0;background:#fff;box-shadow:none}
body[data-courtos-module="hub"] .trainer-today__topbar .ctm-topbar__hub{grid-column:3;grid-row:1;justify-self:end}
body[data-courtos-module="hub"] .trainer-today__topbar .trainer-secondary-button{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.1);color:#fff;white-space:nowrap}

body[data-courtos-module="kader"] .kr-app{width:100%;padding:0 0 70px}
body[data-courtos-module="kader"] .kr-header{min-height:62px;padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong);border:0;color:#fff}
body[data-courtos-module="kader"] .kr-header__title h1{color:#fff;font-size:16px;letter-spacing:0}
body[data-courtos-module="kader"] .kr-header__title h1::before{content:none}
body[data-courtos-module="kader"] .kr-header__title .ctm-topbar__brand{display:flex;color:#fff}
body[data-courtos-module="kader"] .kr-header__title .ctm-topbar__brand strong{font-size:24px}
body[data-courtos-module="kader"] .kr-header__title .ctm-topbar__brand h1{padding-left:20px;border-left:1px solid rgba(255,255,255,.3);color:#fff;font-size:16px;font-weight:600;line-height:1.2;letter-spacing:0;white-space:nowrap}
body[data-courtos-module="kader"] .kr-header__title p{display:none}
body[data-courtos-module="kader"] .kr-header__controls{flex-wrap:wrap}
body[data-courtos-module="kader"] .kr-control{color:rgba(255,255,255,.72)}
body[data-courtos-module="kader"] .ctm-topbar__hub{margin-left:4px}
body[data-courtos-module="kader"] .kr-tabs{padding:0 var(--ctm-gutter);background:#fff}
body[data-courtos-module="kader"] .kr-main{width:100%;max-width:none;margin:0;padding:16px var(--ctm-gutter) 0}

body[data-courtos-module="radar"] #app-screen>.hdr{min-height:62px;padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong);border:0;color:#fff;font-family:'Sora',system-ui,sans-serif}
body[data-courtos-module="radar"] #app-screen>.hdr .hdr-icon{display:block;width:28px;height:28px}
body[data-courtos-module="radar"] #app-screen>.hdr .hdr-title{display:flex;align-items:center;gap:20px;color:#fff;font-size:inherit}
body[data-courtos-module="radar"] #app-screen>.hdr .hdr-title strong{font-size:24px;letter-spacing:-1px}
body[data-courtos-module="radar"] #app-screen>.hdr .hdr-title::first-line{color:#fff}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-hub-btn,
body[data-courtos-module="radar"] #app-screen>.hdr .cos-logout-btn{position:static;box-shadow:none}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-hub-btn{order:3;margin-left:auto;background:transparent;padding:7px 0}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-hub-btn svg{display:none}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-hub-btn::after{content:"Trainer Hub";font-size:12px}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-hub-btn{font-size:0}
body[data-courtos-module="radar"] #app-screen>.hdr .cos-logout-btn{order:4;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16)}
body[data-courtos-module="radar"] .screen{width:100%;padding:28px var(--ctm-gutter) 60px}

body[data-courtos-module="replay"]>.nav{min-height:62px;padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong);border:0;color:#fff;font-family:'Sora',system-ui,sans-serif}
body[data-courtos-module="replay"]>.nav .cos-hub-btn{position:static;margin-left:4px;padding:7px 0;background:transparent;box-shadow:none;font-size:0}
body[data-courtos-module="replay"]>.nav .cos-hub-btn svg{display:none}
body[data-courtos-module="replay"]>.nav .cos-hub-btn::after{content:"Trainer Hub";font-size:12px}
body[data-courtos-module="replay"]>.nav .brand .sub{color:#fff}
body[data-courtos-module="replay"]>.nav .brand .mark{width:28px;height:28px}
body[data-courtos-module="replay"]>.nav .brand .name{font-size:24px;color:#fff}
body[data-courtos-module="replay"]>.nav .brand .sub{padding-left:20px;border-left:1px solid rgba(255,255,255,.3);font-size:16px;font-weight:600}
body[data-courtos-module="replay"]>.toolbar{top:62px;width:100%;padding-right:var(--ctm-gutter);padding-left:var(--ctm-gutter)}

body[data-courtos-module="taktikboard"] .topbar{height:auto;min-height:62px;padding:9px var(--ctm-gutter);background:var(--ctm-brand-strong);border:0;color:#fff;backdrop-filter:none}
body[data-courtos-module="taktikboard"] .topbar .brand{color:#fff}
body[data-courtos-module="taktikboard"] .topbar>.ctm-topbar__brand{flex:0 0 auto}
body[data-courtos-module="taktikboard"] .topbar>.brand{min-width:0}
body[data-courtos-module="taktikboard"] .topbar>.brand .clublogo,
body[data-courtos-module="taktikboard"] .topbar>.brand #clubName{display:none}
body[data-courtos-module="taktikboard"] .topbar .brand small{color:rgba(255,255,255,.65)}
body[data-courtos-module="taktikboard"] .topbar .tbtn,
body[data-courtos-module="taktikboard"] .topbar .seg{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff}
body[data-courtos-module="taktikboard"] .topbar .tbtn:hover{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.28)}
body[data-courtos-module="taktikboard"] .topbar .segbtn{color:rgba(255,255,255,.72)}
body[data-courtos-module="taktikboard"] .topbar .segbtn.on{background:#fff;color:var(--ctm-brand-strong)}
body[data-courtos-module="taktikboard"] .topbar>.ctm-topbar__hub{margin-left:4px}

body[data-courtos-module="drills"] .dr-mod-screen{padding:0;background:var(--ctm-surface-soft)}
body[data-courtos-module="drills"] .dr-mod-shell{max-width:none;margin:0;padding:0 var(--ctm-gutter) 40px;border:0;border-radius:0;gap:26px}
body[data-courtos-module="drills"] .dr-mod-lines{display:none}
body[data-courtos-module="drills"] .dr-mod-top{min-height:62px;margin:0 calc(var(--ctm-gutter) * -1);padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong)}
body[data-courtos-module="drills"] .dr-mod-logo{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px}
body[data-courtos-module="drills"] .dr-mod-brand-txt{flex-direction:row;align-items:center;gap:20px}
body[data-courtos-module="drills"] .dr-mod-brand-name{font-size:16px}
body[data-courtos-module="drills"] .dr-mod-brand-name::first-line{color:#fff}
body[data-courtos-module="drills"] .dr-mod-brand-sub{padding-left:20px;border-left:1px solid rgba(255,255,255,.25);color:#fff;letter-spacing:0;text-transform:none;font-family:'Sora',system-ui,sans-serif;font-size:16px}
body[data-courtos-module="drills"] .dr-mod-top>.ctm-topbar__hub{margin-left:auto}
body[data-courtos-module="drills"] .dr-mod-head{margin-top:28px}
body[data-courtos-module="drills"] .dr-mod-title{color:var(--ctm-text)}
body[data-courtos-module="drills"] .dr-mod-hint{color:var(--ctm-muted)}
body[data-courtos-module="drills"] .dr-mod-btn{min-height:180px;border-color:var(--ctm-border);background:#fff;color:var(--ctm-text);box-shadow:var(--ctm-shadow)}
body[data-courtos-module="drills"] .dr-mod-name{color:var(--ctm-text)}
body[data-courtos-module="drills"] .dr-mod-desc{color:var(--ctm-muted)}
body[data-courtos-module="drills"] .dr-mod-icon{background:var(--ctm-surface-soft);border-color:var(--ctm-border);color:var(--ctm-brand)}

body[data-courtos-module="communication"] .chat-app{grid-template-rows:62px minmax(0,1fr)}
body[data-courtos-module="communication"] .chat-topbar{min-height:62px;padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong);color:#fff}
body[data-courtos-module="communication"] .chat-topbar__brand strong,
body[data-courtos-module="communication"] .chat-topbar__module,
body[data-courtos-module="communication"] .chat-topbar__hub{color:#fff}

body[data-courtos-module="anzeigetafel"] .topbar{height:auto;min-height:62px;max-height:none;padding:10px var(--ctm-gutter);background:var(--ctm-brand-strong);color:#fff}
body[data-courtos-module="anzeigetafel"] .tb-brand strong,
body[data-courtos-module="anzeigetafel"] .tb-module{color:#fff}

@media(max-width:900px){
  .ctm-topbar{align-items:flex-start;flex-wrap:wrap}
  body[data-courtos-module="hub"] .trainer-today__topbar{display:flex;gap:12px}
  body[data-courtos-module="hub"] .trainer-today__topbar-actions{display:flex;flex:1 1 auto}
  body[data-courtos-module="hub"] .trainer-today__topbar .trainer-hub-search{flex:1 1 220px}
  body[data-courtos-module="kader"] .kr-header{align-items:flex-start;flex-direction:column}
  body[data-courtos-module="kader"] .kr-header__controls{width:100%;justify-content:flex-start}
  body[data-courtos-module="taktikboard"] .topbar{padding-right:12px;padding-left:12px}
  .ctm-topbar__brand{gap:12px}.ctm-topbar__module{padding-left:12px}
}
@media(max-width:640px){
  :root{--ctm-gutter:16px}
  body[data-courtos-module="hub"] .trainer-today{padding-bottom:32px}
  body[data-courtos-module="hub"] .trainer-today__topbar{margin-bottom:24px}
  body[data-courtos-module="hub"] .trainer-today__topbar{display:flex;gap:12px}
  body[data-courtos-module="hub"] .trainer-today__topbar-actions{display:flex;flex:1 1 auto}
  body[data-courtos-module="hub"] .trainer-today__topbar .trainer-hub-search{flex:1 1 220px}
  body[data-courtos-module="kader"] .kr-header__title h1::before{font-size:19px;margin-right:12px;padding-right:12px}
  body[data-courtos-module="kader"] .kr-search--header{width:100%}
  body[data-courtos-module="drills"] .dr-mod-shell{padding-bottom:24px}
}
