/* =====================================================
   Modernes Theme-Override für osTicket
   ===================================================== */

/* --- Variablen & Reset --- */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-accent: #0ea5e9;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Basis --- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 15px; overflow-y: scroll; }

body {
  margin: 0;
  padding: 24px 0 0;
  background: var(--color-bg);
  font-family: var(--font);
  color: var(--color-text);
  line-height: 1.6;
}

body, input, select, textarea {
  font-family: var(--font);
  color: var(--color-text);
}

/* --- Container --- */
#container {
  background: var(--color-surface);
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* --- Header --- */
#header {
  background: var(--color-surface);
  height: auto;
  padding: 16px 28px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

#logo {
  height: auto;
  display: flex;
  align-items: center;
}

#header #logo img {
  max-height: 52px;
  max-width: 260px;
  width: auto;
  height: auto;
  vertical-align: middle;
}

.valign-helper { display: none; }

#header .pull-right {
  float: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

#header p {
  width: auto;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

#header p a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
#header p a:hover {
  background: var(--color-primary-light);
  border-bottom: none;
}

/* --- Navigation --- */
#nav {
  margin: 0;
  padding: 0 20px;
  height: auto;
  background: var(--color-primary);
  border-top: none;
  box-shadow: 0 2px 8px rgba(37,99,235,.25);
  white-space: nowrap;
  display: flex;
  align-items: center;
}

#nav li {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline;
}

#nav li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  line-height: 1;
  padding: 10px 16px;
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  text-decoration: none;
  transition: background .15s, color .15s;
  background-position: 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-left: 34px;
}

#nav li a.active,
#nav li a:hover {
  background-color: rgba(255,255,255,.15);
  color: #fff;
  border-bottom: none;
}

/* Nav-Icons — behalten, aber heller */
#nav li a.home { background-image: url('../images/icons/home.png'); filter: brightness(10); }
#nav li a.kb   { background-image: url('../images/icons/kb.png');   filter: brightness(10); }
#nav li a.new  { background-image: url('../images/icons/new.png');  filter: brightness(10); }
#nav li a.status  { background-image: url('../images/icons/status.png'); filter: brightness(10); }
#nav li a.tickets { background-image: url('../images/icons/tix.png');   filter: brightness(10); }

/* --- Content --- */
#content {
  padding: 28px 32px;
  margin: 0;
  min-height: 400px;
}

/* --- Footer --- */
#footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 16px 20px;
}

#footer a, #poweredBy {
  color: var(--color-text-muted);
  text-decoration: none;
}
#footer a:hover { color: var(--color-primary); border-bottom: none; }

/* --- Typografie --- */
a, .link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color .15s;
}
a:hover, .link:hover {
  color: var(--color-primary-dark);
  border-bottom: 1px solid currentColor;
}

h1 { color: var(--color-primary); font-size: 22px; font-weight: 700; margin: 0 0 12px; }
h2, .subject { font-size: 17px; font-weight: 600; color: var(--color-text); }
h3 { font-size: 15px; font-weight: 600; }

/* --- Buttons --- */
.button,
.button:visited,
input[type="submit"],
input[type="button"] {
  background: var(--color-primary);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  max-width: none;
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: none;
  text-shadow: none;
  cursor: pointer;
  transition: background .18s, transform .1s;
  line-height: 1.4;
}

.button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button:active, input[type="submit"]:active { transform: translateY(0); }

.green.button, .green.button:visited { background: var(--color-success); }
.green.button:hover { background: #15803d; }

.blue.button, .blue.button:visited { background: var(--color-accent); }
.blue.button:hover { background: #0284c7; }

/* --- Formulare --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--color-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* --- Alerts & Notices --- */
#msg_notice {
  margin: 0 0 16px;
  padding: 12px 16px 12px 44px;
  height: auto;
  line-height: 1.5;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  background: #f0fdf4 url('../images/icons/ok.png') 14px 50% no-repeat;
  color: #15803d;
}
#msg_warning, .warning-banner {
  margin: 0 0 16px;
  padding: 12px 16px 12px 44px;
  height: auto;
  line-height: 1.5;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb url('../images/icons/alert.png') 14px 50% no-repeat;
  color: #92400e;
}
#msg_error {
  margin: 0 0 16px;
  padding: 12px 16px 12px 44px;
  height: auto;
  line-height: 1.5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fef2f2 url('../images/icons/error.png') 14px 50% no-repeat;
  color: #991b1b;
}
.error_bar {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 28px;
  font-size: 13px;
}
.warning_bar {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 28px;
  font-size: 13px;
}
.notice_bar {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  color: #15803d;
  padding: 10px 28px;
  font-size: 13px;
}

/* --- Tabellen --- */
table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.list thead th {
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .04em;
}
table.list tbody tr:hover { background: var(--color-primary-light); }
table.list tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

/* --- Ticket-Karten --- */
.ticket-info,
.ticket-entry,
.info-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

/* --- Pagination --- */
#pagination { margin: 0 0 32px; padding: 0; }
#pagination li { list-style: none; display: inline; font-size: 13px; }
#pagination li a {
  display: inline-block;
  float: left;
  padding: 5px 10px;
  margin-right: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  text-decoration: none;
  transition: background .15s;
}
#pagination li a:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
#pagination .active {
  display: inline-block;
  float: left;
  padding: 5px 10px;
  margin-right: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
}
#pagination .previousOff, #pagination .nextOff {
  display: inline-block;
  float: left;
  padding: 5px 10px;
  margin-right: 4px;
  color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 700px) {
  #container { border-radius: 0; margin: 0; }
  body { padding: 0; }
  #content { padding: 20px 18px; }
  #header { padding: 14px 18px; }
  #nav li a { padding: 10px 12px 10px 28px; font-size: 13px; }
}
