/* ============================================================
   flexodex - style.css
   ============================================================ */

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

:root
  {
  --color-bg:      #f5f5f0;
  --color-surface: #ffffff;
  --color-border:  #d0d0c8;
  --color-text:    #1a1a1a;
  --color-muted:   #888880;
  --color-accent:  #1a1a1a;
  --font-mono:     'Courier New', Courier, monospace;
  --font-sans:     Georgia, 'Times New Roman', serif;
  }

body
  {
  background-color: var(--color-bg);
  color:            var(--color-text);
  font-family:      var(--font-sans);
  font-size:        15px;
  line-height:      1.6;
  padding:          2rem;
  }

h1
  {
  font-family:  var(--font-mono);
  font-size:    1.4rem;
  font-weight:  normal;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-text);
  padding-bottom: 0.5rem;
  }

h2
  {
  font-family:  var(--font-mono);
  font-size:    1rem;
  font-weight:  normal;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--color-muted);
  }

/* ---- Tabelle ---- */

table
  {
  width:           100%;
  border-collapse: collapse;
  margin-bottom:   2rem;
  }

th
  {
  font-family:    var(--font-mono);
  font-size:      0.75rem;
  font-weight:    normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--color-muted);
  border-bottom:  1px solid var(--color-border);
  padding:        0.4rem 0.75rem;
  text-align:     left;
  }

td
  {
  padding:       0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  }

tr:hover td
  {
  background-color: #ebebе6;
  cursor: pointer;
  }

/* ---- Buttons ---- */

.btn
  {
  display:         inline-block;
  font-family:     var(--font-mono);
  font-size:       0.8rem;
  letter-spacing:  0.05em;
  padding:         0.4rem 1rem;
  border:          1px solid var(--color-text);
  background:      transparent;
  color:           var(--color-text);
  cursor:          pointer;
  text-decoration: none;
  transition:      background 0.15s, color 0.15s;
  }

.btn:hover
  {
  background: var(--color-text);
  color:      var(--color-bg);
  }

.btn-primary
  {
  background: var(--color-text);
  color:      var(--color-bg);
  }

.btn-primary:hover
  {
  background: #444;
  }

/* ---- Formular ---- */

.form-grid
  {
  display:               grid;
  grid-template-columns: 200px 1fr;
  gap:                   0.75rem 1rem;
  max-width:             800px;
  margin-bottom:         2rem;
  }

label
  {
  font-family:    var(--font-mono);
  font-size:      0.8rem;
  letter-spacing: 0.05em;
  color:          var(--color-muted);
  padding-top:    0.35rem;
  }

input[type="text"],
input[type="date"],
textarea
  {
  width:       100%;
  font-family: var(--font-sans);
  font-size:   0.95rem;
  padding:     0.35rem 0.5rem;
  border:      1px solid var(--color-border);
  background:  var(--color-surface);
  color:       var(--color-text);
  outline:     none;
  }

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus
  {
  border-color: var(--color-text);
  }

textarea
  {
  resize:     vertical;
  min-height: 80px;
  }

/* ---- Tag-Input (Ressourcen) ---- */

.tag-input-wrap
  {
  border:     1px solid var(--color-border);
  background: var(--color-surface);
  padding:    0.3rem 0.5rem;
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.3rem;
  cursor:     text;
  }

.tag-input-wrap:focus-within
  {
  border-color: var(--color-text);
  }

.tag
  {
  font-family:  var(--font-mono);
  font-size:    0.75rem;
  padding:      0.15rem 0.5rem;
  border:       1px solid var(--color-border);
  background:   var(--color-bg);
  display:      inline-flex;
  align-items:  center;
  gap:          0.4rem;
  }

.tag-remove
  {
  cursor:     pointer;
  color:      var(--color-muted);
  font-size:  0.9rem;
  line-height: 1;
  border:     none;
  background: none;
  padding:    0;
  }

.tag-remove:hover
  {
  color: var(--color-text);
  }

.tag-text-input
  {
  border:      none;
  outline:     none;
  font-family: var(--font-sans);
  font-size:   0.95rem;
  min-width:   120px;
  flex:        1;
  background:  transparent;
  }

.tag-suggestions
  {
  position:   absolute;
  z-index:    10;
  background: var(--color-surface);
  border:     1px solid var(--color-border);
  min-width:  200px;
  max-height: 200px;
  overflow-y: auto;
  }

.tag-suggestion-item
  {
  padding:    0.4rem 0.75rem;
  font-size:  0.9rem;
  cursor:     pointer;
  }

.tag-suggestion-item:hover
  {
  background: var(--color-bg);
  }

.tag-wrap-outer
  {
  position: relative;
  }

/* ---- Actions-Leiste ---- */

.actions
  {
  display:     flex;
  gap:         0.75rem;
  margin-top:  1.5rem;
  }

/* ---- Meldungen ---- */

.msg
  {
  font-family:  var(--font-mono);
  font-size:    0.8rem;
  padding:      0.5rem 0.75rem;
  border-left:  3px solid var(--color-text);
  margin-bottom: 1.5rem;
  }

.msg-error
  {
  border-color: #c00;
  color:        #c00;
  }
