:root{
  --purple: #3e0073;
  --purple-dark: #2b0050;
  --yellow: #e3c212;

  --text: #111;
  --bg: #f6f7fb;

  --border: #d6d6d6;
  --shadow: 0 4px 15px rgba(0,0,0,0.15);

  --radius: 8px;

  /* Extra (optioneel) */
  --panel: #ffffff;
  --panel-soft: #fafbfd;
  --accent-soft: #f4eefe; /* licht paars */
}

/* Base */
* { box-sizing: border-box; }

body{
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.help-text{
  font-size: 12px;
  opacity: 0.8;
  margin-top: 6px;
}

/* Page container (gebruik op ALLE pagina’s) */
.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navbar */
.navbar{
  background-color: var(--purple);
  overflow: visible;
  position: relative;
  z-index: 1000;
}

.navbar::after{
  content:"";
  display:block;
  clear:both;
}

.navbar a,
.dropdown .dropbtn{
  float:left;
  font-size: 16px;
  color:#fff;
  background-color: var(--purple);
  text-align:center;
  padding:14px 20px;
  text-decoration:none;
  cursor:pointer;
}

.navbar a:hover,
.dropdown:hover .dropbtn{
  background-color: var(--yellow);
  color: #000;
}

/* Navbar right links */
.navbar-right{
  float: right;
  display: flex;
  gap: 10px;
}

.navbar-right a{
  float: none; /* override */
}

.dropbtn{
  border: 0;
  background: transparent;
  font-family: inherit;
}

/* Dropdown */
.dropdown{
  float:left;
  position:relative;
}

.dropdown-content{
  display:none;
  position:absolute;
  background-color: var(--purple);
  min-width:180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 2000;
}

.dropdown:hover .dropdown-content{
  display:block;
}

.dropdown-title{
  font-weight:bold;
  color:#fff;
  background-color: var(--purple-dark);
  padding:10px 16px;
  border-bottom:1px solid var(--yellow);
  text-transform:uppercase;
  pointer-events:none;
}

.dropdown-content a{
  float:none;
  color:#fff;
  padding:10px 16px;
  text-decoration:none;
  display:block;
  text-align:left;
}

.dropdown-content a:hover{
  background-color: var(--yellow);
  color:#000;
}

.navbar .right{ float:right; }

/* Cards (handig voor elke pagina met blokken/tabellen) */
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}


/* Card title (globaal) */
.card-title{
  padding: 12px 14px;
  font-weight: 800;
  background: var(--accent-soft);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}


.card--form{
  max-width: 560px;
}

/* Forms - globaal */
label{
  font-weight: 700;
  display:block;
  margin: 0 0 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 6px;
  background:#fff;
}

textarea{ min-height: 120px; }

.form-row{ margin-bottom: 14px; }

.form-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:16px;
}

/* Rights list (role_rights.tpl) */
.rights-item{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}

.rights-item:last-child{
  border-bottom: none;
}

.rights-item input{
  margin-top: 2px;
}

.rights-main{
  display: inline-block;
}

.rights-desc{
  opacity: 0.75;
  margin-left: 6px;
  font-weight: 400;
}

/* Buttons - globaal (LET OP: geen .container button selector meer) */
.btn{
  display:inline-block;
  padding:10px 14px;
  background: var(--purple);
  color:#fff;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor:pointer;
  text-decoration:none;
  font-size: 16px;
  font-weight: 700;
}

.btn:hover{
  background: var(--purple-dark);
}

.btn--danger{
  background:#c62828;
}

.btn--danger:hover{
  filter: brightness(0.9);
}

.btn--secondary{
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover{
  background: #f1f1f1;
}

/* Login (laat meeliften op card + form styles) */
.login-wrap{
  min-height: calc(100vh - 56px); /* 56px ≈ navbarhoogte */
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}

.login-container{
  width: 360px;
  background: #fff;
  padding: 30px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 300px;
  text-align: center;
  border: 1px solid var(--border);
}

.login-container h1{
  margin:0 0 20px;
  font-size: 22px;
}

.login-container label{
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
  text-align: left;
}

.login-container input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Status bar */
.status-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3000;
  min-height: 44px;
}

.status-bar__message{
  flex: 1;
  margin-right: 10px;
}

.status-bar__close{
  cursor:pointer;
  font-weight:bold;
  border:none;
  background:transparent;
  color: inherit;
  font-size:16px;
  line-height:1;
}

/* Achtergrond per type */
.status-info{ background-color: var(--purple); }
.status-success{ background-color: #2e7d32; }
.status-error{ background-color: #c62828; }
.status-warning{ background-color: var(--yellow); color: #000; }

/* Ruimte onderaan zodat content niet onder status-bar valt */
body.has-status-bar{ padding-bottom: 64px; }

/* =========================================
   Alerts / messages (inline meldingen)
   ========================================= */

.alert{
  padding: 12px 14px;
  border-radius: var(--radius);
  margin: 0 0 16px;
  border: 1px solid transparent;
  font-weight: 700;
  background: #fff;
}

.alert-error{
  background: #fdecee;
  border-color: #f5c2c7;
  color: #842029;
}

.alert-success{
  background: #e9f7ef;
  border-color: #b7e4c7;
  color: #0f5132;
}

.alert-info{
  background: #eef4ff;
  border-color: #cfe0ff;
  color: #084298;
}

/* =========================================
   Tables - globaal
   (gebruik in meerdere templates)
   ========================================= */

/* Verbeterde global table (neutral + consistent met accent-soft headers) */
.table{
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; /* nodig voor afgeronde hoeken */
  box-shadow: var(--shadow);
  margin: 12px 0 18px;
  font-size: 14px;
}

.table thead th{
  background: var(--accent-soft); /* licht paars */
  color: var(--purple-dark);
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td{
  padding: 9px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
}

.table tbody tr:nth-child(even){
  background: var(--panel-soft);
}

.table tbody tr:hover{
  background: #f3f0ff; /* subtiel paars hover */
}

.table .num,
.table .gb{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .gb{ opacity: 0.92; }

.table .col-label{ font-weight: 700; }

.table-subtle{
  opacity: 0.75;
  font-style: italic;
}

/* Acties/knoppen in tabellen: compacter */
.table td .btn{
  padding: 6px 10px;
  font-size: 13px;
  margin-right: 4px;
}

/* =========================================
   Section headers (globaal)
   ========================================= */

.section-title{
  margin: 18px 0 10px;
  padding: 12px 14px;
  border-left: 6px solid var(--purple-dark);
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 800;
}

.section-tag{
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  vertical-align: middle;
}

/* =========================================
   Customers usage components
   (kept for backwards compatibility)
   ========================================= */

/* Backwards-compatible aliases */
.usage-section-title{ composes: section-title; } /* harmless in plain CSS (ignored) */
.usage-tag{ composes: section-tag; }             /* harmless in plain CSS (ignored) */

/* If your environment doesn't support "composes", keep actual rules: */
.usage-section-title{
  margin: 18px 0 10px;
  padding: 12px 14px;
  border-left: 6px solid var(--purple-dark);
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 800;
}
.usage-tag{
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  vertical-align: middle;
}

/* Keep usage-table as alias of .table for now (so existing tpl keeps working) */
.usage-table{ /* identical to .table (old usage look kept intentionally) */
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 10px 0 18px;
}
.usage-table th{
  background: var(--purple-dark);
  color: #fff;
  font-weight: 700;
  padding: 10px 10px;
  border-right: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}
.usage-table th:last-child{ border-right: none; }
.usage-table td{
  padding: 9px 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
}
.usage-table tr:nth-child(even){ background: #fafbfd; }
.usage-table tr:hover{ background: #f3f0ff; }
.usage-col-label{ font-weight: 700; }
.usage-subtle{ font-size: 12px; opacity: 0.85; font-weight: 400; }
.usage-table .num,
.usage-table .gb{ text-align: right; font-variant-numeric: tabular-nums; }
.usage-table .gb{ opacity: 0.92; }

/* Usage search */
.usage-search{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 12px;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.usage-search .field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 1 360px;
  min-width: 240px;
}

.usage-search label{
  font-weight: 700;
  font-size: 13px;
  opacity: 0.85;
}

.usage-search input[type="text"]{
  width: 100%;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.usage-search input[type="text"]::placeholder{ opacity: 0.65; }

.usage-search .actions{
  display: flex;
  gap: 8px;
  align-items: center;
}

.usage-search .hint{
  font-size: 12px;
  opacity: 0.7;
  margin-left: 2px;
}

/* Usage card */
.usage-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  overflow: hidden;
}

.usage-card .card-title{
  padding: 12px 14px;
  font-weight: 800;
  background: var(--accent-soft);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.usage-meta{
  width: 100%;
  border-collapse: collapse;
}

.usage-meta td{
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
}

.usage-meta td.label{
  width: 160px;
  font-weight: 700;
  opacity: 0.85;
  white-space: nowrap;
}



/* Badges */
.badge{
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.badge--success{
  background: #e9f7ef;
  color: #0f5132;
  border: 1px solid #b7e4c7;
}

.badge--muted{
  background: #f3f4f6;
  color: #374151;
  border: 1px solid rgba(0,0,0,0.08);
}

.usage-link { color:#003264; text-decoration:underline; font-weight:500; }
.usage-link:hover { text-decoration:none; }
.btn--small { padding:4px 8px; font-size:12px; line-height:1.2; }