/* =========================================
   NC-AGENT.DE - BASE STYLES
   Core: Variables, Resets, Typography, Forms, Tables
   Based on netclusive.de design system
   ========================================= */

/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */

:root {
  /* Brand Colors - netclusive Corporate Identity */
  --color-primary: #0b65ae;
  --color-primary-dark: #084675;
  --color-primary-light: #2ba3ff;
  --color-primary-lighter: #2691e3;

  /* Secondary Colors */
  --color-secondary: #494c53;
  --color-secondary-dark: #333333;
  --color-secondary-light: #787b81;

  /* Gray Scale */
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-150: #f0f0f0;
  --color-gray-200: #eeeeee;
  --color-gray-250: #f3f3f3;
  --color-gray-300: #e5e5e5;
  --color-gray-350: #dee2e6;
  --color-gray-400: #cccccc;
  --color-gray-500: #aaaaaa;
  --color-gray-600: #888888;
  --color-gray-700: #666666;
  --color-gray-800: #444444;
  --color-gray-900: #222222;

  /* Text Colors */
  --color-text-primary: #212529;
  --color-text-secondary: #495057;
  --color-text-muted: #6c757d;
  --color-text-light: #999999;

  /* Semantic Colors */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-error-border: #fecaca;
  --color-success: #16a34a;
  --color-success-alt: #28a745;
  --color-success-bg: #f0fdf4;
  --color-success-bg-alt: #d4edda;
  --color-success-border: #c3e6cb;
  --color-warning: #f59e0b;
  --color-warning-alt: #ffc107;
  --color-warning-bg: #fff3cd;
  --color-info: #2ba3ff;
  --color-info-bg: #f0f9ff;
  --color-info-bg-light: #e0f2fe;
  --color-info-border: #bae6fd;

  /* Spacing Scale (8px base) */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Typography Scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;

  /* Touch Target Minimum (WCAG AA) */
  --touch-target-min: 44px;

  /* Layout Variables */
  --layout-max-width: 1200px;
  --header-height: 60px;
  --container-main: 1100px;
}


/* ==========================================================================
   2. RESETS & BOX-SIZING
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

html,
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
p,
blockquote {
  margin: 0;
  padding: 0;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

@font-face {
  font-family: 'PT Sans Narrow';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('https://cdn1.netclusive.de/www.netclusive.de/fonts/pt-sans-narrow-v17-latin/pt-sans-narrow-v17-latin-700.woff2') format('woff2'),
       url('https://cdn1.netclusive.de/www.netclusive.de/fonts/pt-sans-narrow-v17-latin/pt-sans-narrow-v17-latin-700.woff') format('woff');
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: var(--line-height-normal);
  color: var(--color-gray-900);
  background-color: var(--color-gray-100);
  min-height: 100vh;
}

h1 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}

h2 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
}

h3 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
}

h4 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

h5 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: var(--font-size-base);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-secondary-dark);
}

strong, b {
  font-weight: 700;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   4. FORMS
   ========================================================================== */

form {
  width: 100%;
  max-width: 100%;
}

fieldset {
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

legend {
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--color-primary);
  padding: 0 var(--space-2);
}

:where(label) {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: var(--space-1);
  line-height: var(--line-height-normal);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  font-family: inherit;
  line-height: var(--line-height-normal);
  color: var(--color-secondary);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="tel"]:hover,
textarea:hover {
  border-color: var(--color-gray-600);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  background-color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 101, 174, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-gray-500);
  opacity: 1;
}

/* Fade placeholder on focus */
input:focus::placeholder,
textarea:focus::placeholder {
  color: var(--color-gray-400);
  transition: color var(--transition-base);
}

textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

select {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  padding-right: calc(var(--space-4) * 3);
  font-size: var(--font-size-sm);
  font-family: inherit;
  line-height: var(--line-height-normal);
  color: var(--color-secondary);
  background-color: var(--color-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 14px;
  border: 1px solid var(--color-gray-400);
  border-radius: var(--radius-md);
  cursor: pointer;
  appearance: none;
  transition: background-color var(--transition-base),
              border-color var(--transition-base);
}

select:hover {
  border-color: var(--color-gray-600);
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: var(--color-gray-200);
  color: var(--color-gray-600);
  cursor: not-allowed;
  opacity: 0.6;
}


/* ==========================================================================
   5. BUTTONS
   ========================================================================== */

button:not([class]),
input[type="submit"]:not([class]),
input[type="button"]:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: var(--space-2) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: 700;
  font-family: inherit;
  line-height: var(--line-height-none);
  color: var(--color-white);
  background: linear-gradient(to bottom, var(--color-primary-light) 0%, var(--color-primary) 100%);
  border: 1px solid var(--color-primary-dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base);
}

button:not([class]):hover,
input[type="submit"]:not([class]):hover {
  background: linear-gradient(to bottom, var(--color-primary-lighter) 0%, var(--color-primary-dark) 100%);
  box-shadow: var(--shadow-md);
}

button:not([class]):focus,
input[type="submit"]:not([class]):focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 101, 174, 0.3);
}

button:disabled,
input[type="submit"]:disabled {
  background: var(--color-gray-400);
  border-color: var(--color-gray-400);
  color: var(--color-gray-600);
  cursor: not-allowed;
  opacity: 0.6;
}


/* ==========================================================================
   6. TABLES
   ========================================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}

thead {
  background-color: var(--color-secondary);
}

th {
  font-weight: 700;
  text-align: left;
  padding: var(--space-2) var(--space-3);
}

thead th {
  color: var(--color-white);
}

td {
  padding: var(--space-2) var(--space-3);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}

.table th,
.table td {
  padding: var(--space-2) var(--space-3);
  vertical-align: middle;
  border-bottom: 1px solid var(--color-gray-200);
}

.table thead th {
  background: var(--color-gray-100);
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-gray-300);
}

.table-striped tbody tr:nth-child(even) {
  background-color: var(--color-gray-100);
}

.table-hover tbody tr:hover {
  background-color: var(--color-gray-50);
}


/* ==========================================================================
   7. LISTS
   ========================================================================== */

ul,
ol {
  list-style-position: outside;
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
}

ul {
  list-style-type: square;
}

ul li::marker {
  color: var(--color-primary);
}

li {
  margin-bottom: var(--space-1);
  line-height: var(--line-height-normal);
}

ul.list-none,
ol.list-none {
  list-style: none;
  padding-left: 0;
}


/* ==========================================================================
   8. UTILITY CLASSES
   ========================================================================== */

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-bold { font-weight: 700 !important; }
.text-muted { color: var(--color-text-muted) !important; }
.text-small { font-size: var(--font-size-xs) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }
.mb-16 { margin-bottom: var(--space-16) !important; }

.ml-2 { margin-left: var(--space-2) !important; }
.ml-4 { margin-left: var(--space-4) !important; }
.mr-2 { margin-right: var(--space-2) !important; }
.mr-4 { margin-right: var(--space-4) !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }

.w-full { width: 100% !important; }
.w-auto { width: auto !important; }

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* ==========================================================================
   9. ACCESSIBILITY
   ========================================================================== */

*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-to-main {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  font-weight: bold;
  border-radius: var(--radius-md);
}

.skip-to-main:focus {
  left: var(--space-4);
  top: var(--space-4);
}


/* ==========================================================================
   10. MEDIA
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

hr {
  border: 0;
  border-bottom: 1px solid var(--color-gray-300);
  margin: var(--space-6) 0;
}

code {
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   11. PRINT STYLES
   ========================================================================== */

@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
    max-width: 100% !important;
  }
}


/* ==========================================================================
   12. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

::selection {
  background: var(--color-primary);
  color: var(--color-white);
  text-shadow: none;
}
