/* IP-ONE – gemeinsames Grunddesign, Referenz lager.php */

:root{
  --bg:#f5f7fb;
  --card:#fff;
  --text:#172033;
  --muted:#687386;
  --line:#e7eaf0;
  --primary:#315efb;
  --ok:#159957;
  --danger:#d92d20;
  --dark:#202938;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

header{
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:5;
}

.nav{
  max-width:1800px;
  margin:auto;
  padding:12px 20px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  font-size:22px;
  font-weight:700;
}

.logo{height:60px;width:auto}
.nav-left{min-width:200px}

.nav-user{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  font-weight:600;
}

.nav-user a{
  color:#315efb;
  text-decoration:none;
  font-weight:600;
}

.nav-user a:hover{text-decoration:underline}

.wrap{
  width:96%;
  max-width:1800px;
  margin:24px auto;
  padding:0 20px;
 position:relative;
}


.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px;
  box-shadow:0 8px 28px rgba(28,42,68,.05);
  margin-bottom:16px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
}

.stat{
  padding:16px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fbfcfe;
}

.stat .value{
  font-size:26px;
  font-weight:800;
  margin-top:5px;
}

.muted{color:var(--muted);font-size:14px}

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

h1,h2,h3{margin:0 0 8px}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

button,.btn{
  font:inherit;
  border:0;
  border-radius:11px;
  padding:11px 14px;
  background:var(--primary);
  color:white;
  text-decoration:none;
  cursor:pointer;
}

.ok{background:var(--ok)}
.dark{background:var(--dark)}
.danger{background:var(--danger)}
.light{background:#eef2f7;color:var(--text)}

input,select{
  font:inherit;
  width:100%;
  padding:10px 11px;
  border:1px solid #d8dee8;
  border-radius:10px;
  background:white;
}

.formgrid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:12px;
}

.alert{
  padding:12px 14px;
  border-radius:12px;
  background:#ecfdf3;
  color:#11763f;
  margin-bottom:14px;
}

.error{background:#fff1f0;color:#b42318}

.calendar-head,.calendar{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}

.calendar-head div{
  text-align:center;
  color:var(--muted);
  font-weight:700;
  padding:6px;
}

.day{
  min-height:94px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fcfdff;
  color:inherit;
  text-decoration:none;
}

.day:hover{border-color:#9db4ff}
.day.today{outline:2px solid #b8c7ff}
.day.selected{background:#eef3ff}

.hours{
  margin-top:22px;
  color:var(--muted);
  font-size:12px;
}

.day.vacation{
  background:#dff6dd;
  border:2px solid #28a745;
}

.day.vacation .hours{
  color:#1e7e34;
  font-weight:bold;
}

.day.vacation:hover{background:#d4f0d0}
.empty{border:0;background:transparent}

table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:10px;
  border-bottom:1px solid var(--line);
  text-align:left;
}

th{color:var(--muted);font-size:13px}
.positive{color:#137333}
.negative{color:#b42318}

.pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:99px;
  background:#eef2f7;
  font-size:12px;
}

.admin-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.adminTab{
  background:#eef2f7;
  color:#172033;
  border:none;
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.adminTab:hover{
  background:#315efb;
  color:white;
}

.adminTab.active{
  background:#315efb;
  color:white;
}

.admin-nav{
  position:sticky;
  top:80px;
  z-index:998;
}

@media(max-width:850px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .formgrid{grid-template-columns:1fr 1fr}
  .formgrid button{grid-column:1/-1}
}

@media(max-width:600px){
  .wrap{margin:14px auto}
  .card{padding:15px;border-radius:16px}
  .grid{grid-template-columns:1fr 1fr}
  .stat .value{font-size:20px}
  .calendar-head,.calendar{gap:3px}
  .day{min-height:67px;padding:6px}
  .hours{margin-top:10px;font-size:11px}
  .hide-mobile{display:none}
  .formgrid{grid-template-columns:1fr}
  table{font-size:13px}
  .mobile-scroll{overflow-x:auto}
}




/* =========================================================
   PERSÖNLICHER NOTIZZETTEL – SCHWEBEND RECHTS
   ========================================================= */

.task-note-wrapper{
    position:fixed !important;

    top:125px !important;
    right:20px !important;
    left:auto !important;

    width:auto !important;
    margin:0 !important;
    padding:0 !important;

    display:block !important;

    z-index:99999 !important;
}

/* Der eigentliche Zettel */
.task-note{
    width:330px;
    max-width:calc(100vw - 40px);

    background:#fff7a8;
    border:1px solid #e6d85c;
    border-radius:5px;

    box-shadow:0 6px 18px rgba(0,0,0,.18);

    position:relative;
    overflow:hidden;

    transition:
        width .2s ease,
        max-height .2s ease;
}

/* Klebeband oben */
.task-note::before{
    content:"";
    position:absolute;

    top:0;
    left:50%;

    transform:translateX(-50%);

    width:90px;
    height:24px;

    background:rgba(255,255,255,.55);

    border-left:1px solid rgba(0,0,0,.05);
    border-right:1px solid rgba(0,0,0,.05);

    z-index:2;
}

/* Kopfbereich */
.task-note-header{
    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:10px;

    padding:30px 14px 10px 14px;

    font-weight:700;
}

/* Titel */
.task-note-title{
    font-size:16px;
}

/* Auf-/Zu-Button */
.task-note-toggle{
    border:none;
    background:transparent;

    color:#172033;

    padding:4px 7px;

    cursor:pointer;

    font-size:16px;
}

/* Inhalt */
.task-note-body{
    padding:0 14px 14px 14px;
}

/* Aufgabenliste */
.task-note-list{
    display:flex;
    flex-direction:column;
    gap:7px;
}

/* einzelne Aufgabe */
.task-note-item{
    display:flex;
    align-items:flex-start;

    gap:8px;

    padding:7px 5px;

    border-bottom:1px dashed rgba(0,0,0,.15);

    font-size:14px;
}

.task-note-item:last-child{
    border-bottom:none;
}

/* Checkbox */
.task-note-item input[type="checkbox"]{
    width:auto;
    margin-top:3px;
}

/* Keine Aufgaben */
.task-note-empty{
    font-size:13px;
    color:#6b6500;
    padding:8px 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:700px){

    .task-note-wrapper{
        top:15px;
        right:15px;
    }

    .task-note{
        width:300px;
        max-width:calc(100vw - 30px);
    }

}