/*
Theme Name: SWD Kundenportal
Theme URI: https://swd-portal.com/
Author: Sonntag Webdesign
Description: Responsive Kundenportal theme with a secure login gate. Logged-out visitors see only the login screen.
Version: 2.4.3
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: swd-portal
*/

:root{
  --navy:#0b1b2f;
  --blue:#19395d;
  --gold:#c9a85b;
  --bg:#f4f2ed;
  --text:#10233d;
  --muted:#6d7d91;
  --white:#fff;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit}
.swd-login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}
.swd-login-shell{width:min(440px,100%);background:#fff;border:1px solid #e1ddd4;box-shadow:0 14px 45px rgba(11,27,47,.10);padding:38px;border-radius:4px}
.swd-login-logo{display:flex;justify-content:center;margin-bottom:24px}
.swd-login-logo img{display:block;max-width:230px;max-height:100px;width:auto;height:auto;object-fit:contain}
.swd-login-brand{font-size:28px;font-weight:700;text-align:center;margin:0 0 5px}
.swd-login-subtitle{text-align:center;color:var(--muted);margin:0 0 28px}
.swd-login-shell .login-username,
.swd-login-shell .login-password{margin:0 0 17px}
.swd-login-shell label{display:block;font-weight:600;font-size:14px;margin-bottom:7px}
.swd-login-shell input[type=text],
.swd-login-shell input[type=password]{width:100%;padding:13px 14px;border:1px solid #d8d6d0;border-radius:3px;background:#fff;font-size:16px}
.swd-login-shell input:focus{outline:2px solid rgba(201,168,91,.28);border-color:var(--gold)}
.swd-login-shell .login-remember{margin:8px 0 20px;font-size:14px;color:#53657a}
.swd-login-shell .login-remember input{margin-right:7px}
.swd-login-shell input[type=submit]{width:100%;border:0;border-radius:3px;background:var(--navy);color:#fff;padding:14px;font-size:16px;font-weight:700;cursor:pointer}
.swd-login-shell input[type=submit]:hover{background:var(--blue)}
.swd-login-links{text-align:center;margin-top:18px;font-size:14px;color:#53657a}
.swd-login-error{background:#fff0f0;border:1px solid #efc5c5;color:#a33b3b;padding:12px 14px;margin-bottom:18px;border-radius:4px}
.swd-portal-wrap{min-height:100vh}
.swd-site-header{height:68px;background:#fff;border-bottom:1px solid #e3e0d9;display:flex;align-items:center;justify-content:space-between;padding:0 28px}
.swd-site-logo img{max-height:48px;max-width:210px;display:block}
.swd-user-nav{display:flex;gap:18px;align-items:center;font-size:14px}
.swd-user-nav a{text-decoration:none}
.swd-content{max-width:1400px;margin:0 auto;padding:34px 28px}
.swd-content img{max-width:100%;height:auto}
.swd-content button,.swd-content input[type=submit]{max-width:100%}
.swd-mobile-menu{display:none}

@media (max-width:700px){
  .swd-login-page{padding:14px}
  .swd-login-shell{padding:28px 20px}
  .swd-login-logo img{max-width:190px;max-height:85px}
  .swd-site-header{height:auto;min-height:64px;padding:10px 14px}
  .swd-site-logo img{max-width:150px;max-height:42px}
  .swd-user-nav{gap:10px;font-size:13px}
  .swd-content{padding:20px 14px}
}


/* =========================================================
   SWD LIVE KUNDENPORTAL – Dashboard/Layout
   Die Inhalte bleiben dynamisch und kommen aus WordPress/
   dem Kundenportal-Plugin. Keine fest codierten Zähler.
   ========================================================= */

body.swd-logged-in{
  background:#f4f2ed;
}

.swd-app{
  min-height:100vh;
  display:flex;
}

.swd-sidebar{
  width:285px;
  flex:0 0 285px;
  min-height:100vh;
  background:#0b1b2f;
  color:#aebbd0;
  position:sticky;
  top:0;
  align-self:flex-start;
  padding:18px 10px 24px;
  z-index:100;
}

.swd-sidebar-brand{
  display:flex;
  align-items:center;
  gap:15px;
  padding:0 18px 26px;
}
.swd-sidebar-brand img{
  width:68px;
  height:56px;
  object-fit:contain;
}
.swd-sidebar-brand-text strong{
  display:block;
  color:#fff;
  font-size:22px;
  line-height:1.1;
}
.swd-sidebar-brand-text span{
  display:block;
  color:#9eb0c7;
  font-size:15px;
  margin-top:5px;
}

.swd-sidebar-client{
  margin:0 12px 30px;
  padding:19px 20px;
  background:#19395d;
  border-left:3px solid #c9a85b;
}
.swd-sidebar-client .kicker{
  color:#a9b8cb;
  font-size:12px;
  letter-spacing:1.4px;
  text-transform:uppercase;
}
.swd-sidebar-client strong{
  display:block;
  color:#fff;
  font-size:18px;
  margin-top:8px;
}
.swd-sidebar-client small{
  display:block;
  color:#9fb0c5;
  margin-top:8px;
}
.swd-sidebar-client .customer-number{
  color:#c9a85b;
  margin-top:10px;
  font-size:12px;
}

.swd-sidebar-section{
  padding:0 20px 10px;
  color:#748aa5;
  font-size:11px;
  font-weight:700;
  letter-spacing:1.6px;
  text-transform:uppercase;
}
.swd-sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.swd-sidebar-nav a{
  display:flex;
  align-items:center;
  min-height:51px;
  padding:0 20px;
  color:#b5c1d1;
  text-decoration:none;
  font-size:16px;
  border-left:3px solid transparent;
  transition:.15s ease;
}
.swd-sidebar-nav a:hover,
.swd-sidebar-nav a.active{
  background:#19395d;
  color:#c9a85b;
  border-left-color:#c9a85b;
}
.swd-sidebar-nav .icon{
  width:32px;
  color:#9cb0c8;
  font-size:17px;
}
.swd-sidebar-nav a.active .icon{color:#c9a85b}

.swd-app-main{
  flex:1;
  min-width:0;
}
.swd-app-topbar{
  height:68px;
  background:#fff;
  border-bottom:1px solid #e4e1da;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 30px;
}
.swd-app-search{
  width:390px;
  max-width:55%;
  height:42px;
  border:1px solid #e1ded7;
  background:#faf9f7;
  padding:0 14px;
  color:#728198;
  display:flex;
  align-items:center;
}
.swd-app-user{
  display:flex;
  align-items:center;
  gap:15px;
  color:#5d6b7d;
  font-size:14px;
}
.swd-app-user .avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  background:#0b1b2f;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:11px;
}
.swd-app-user a{text-decoration:none}

.swd-dashboard-content{
  max-width:1500px;
  margin:0 auto;
  padding:38px 38px 60px;
}
.swd-dashboard-content h1{
  margin:0 0 8px;
  font-size:32px;
  color:#10233d;
}
.swd-dashboard-content > .entry-content,
.swd-dashboard-content .swd-live-content{
  width:100%;
}

/* Generic live dashboard cards used by the portal plugin */
.swd-dashboard-grid,
.swd-dashboard-cards,
.skp-dashboard-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin:24px 0;
}
.swd-dashboard-card,
.skp-dashboard-card,
.swd-stat-card{
  background:#fff;
  border:1px solid #e1ded7;
  padding:24px;
  min-height:125px;
  box-shadow:0 2px 7px rgba(11,27,47,.03);
}
.swd-dashboard-card h3,
.skp-dashboard-card h3,
.swd-stat-card h3{
  margin:0 0 13px;
  font-size:14px;
  font-weight:400;
  color:#6d7d91;
}
.swd-dashboard-card .value,
.skp-dashboard-card .value,
.swd-stat-card .value{
  font-size:28px;
  font-weight:700;
  color:#10233d;
}
.swd-dashboard-card.balance,
.skp-dashboard-card.balance{
  border-left:4px solid #20c56a;
}
.swd-dashboard-card.balance .value,
.skp-dashboard-card.balance .value{color:#16883f}

/* Wide content sections */
.swd-dashboard-section,
.skp-dashboard-section,
.swd-live-box{
  background:#fff;
  border:1px solid #e1ded7;
  margin:18px 0;
  padding:24px;
}
.swd-dashboard-section h2,
.skp-dashboard-section h2,
.swd-live-box h2{
  margin:0 0 16px;
  font-size:20px;
}

/* Project cards remain live; no fixed project counts are inserted by theme */
.swd-project-list,
.skp-project-list{
  display:grid;
  gap:18px;
}
.swd-project-card,
.skp-project-card{
  background:#fff;
  border:1px solid #e1ded7;
  padding:28px;
}
.swd-project-card .progress,
.skp-project-card .progress{
  height:10px;
  background:#ece9e2;
  overflow:hidden;
  margin:14px 0;
}
.swd-project-card .progress > *,
.skp-project-card .progress > *{
  height:100%;
  background:#c9a85b;
}

/* Responsive */
@media(max-width:1100px){
  .swd-sidebar{width:235px;flex-basis:235px}
  .swd-dashboard-grid,.swd-dashboard-cards,.skp-dashboard-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .swd-app{display:block}
  .swd-sidebar{
    position:relative;
    width:100%;
    min-height:auto;
    padding:12px 10px;
  }
  .swd-sidebar-brand{padding:4px 12px 14px}
  .swd-sidebar-brand img{width:58px;height:46px}
  .swd-sidebar-client{margin:0 4px 12px}
  .swd-sidebar-nav{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
  }
  .swd-sidebar-nav a{
    min-height:46px;
    padding:0 10px;
    font-size:14px;
  }
  .swd-sidebar-section{padding:6px 12px}
  .swd-app-topbar{height:58px;padding:0 14px}
  .swd-app-search{max-width:62%;width:100%;height:38px}
  .swd-app-user{gap:8px}
  .swd-dashboard-content{padding:22px 14px 40px}
  .swd-dashboard-content h1{font-size:26px}
  .swd-dashboard-grid,.swd-dashboard-cards,.skp-dashboard-grid{
    grid-template-columns:1fr !important;
    gap:12px;
  }
  .swd-dashboard-card,.skp-dashboard-card,.swd-stat-card{
    min-height:105px;
  }
}
