/* ----------------------------------------------------
   DROPASH — UNIFIED SaaS UI (Landing + Dashboard)
---------------------------------------------------- */

/* -------------------------
   ROOT VARIABLES (Synced with Landing Page)
--------------------------*/
:root {
  --bg-dark: #050313;
  --bg-gradient-start: #0b0624;
  --bg-gradient-end: #120637;
  --accent: #00f2ff;
  --accent-soft: rgba(0, 242, 255, 0.18);
  --accent-purple: #7a4cff;
  --text-main: #f7f7ff;
  --text-muted: #a4a3bc;
  --card-bg: rgba(15, 12, 40, 0.82);
  --border-glass: rgba(255, 255, 255, 0.14);
  --shadow-soft: 0 26px 80px rgba(0, 0, 0, 0.7);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;

  /* Legacy/Dashboard Compat */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-solid-bg: rgba(10, 18, 35, 0.55);
  --blur: blur(22px);
}

/* -------------------------
   RESET
--------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

h2 {
  margin-bottom: 20px;
}


body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 0% 0%, rgba(122, 76, 255, 0.35), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(0, 242, 255, 0.2), transparent 55%),
    linear-gradient(145deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
}

.text-danger {
  color: #ff6b6b;
  font-weight: 600;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

/* -------------------------
   HEADER & NAV (From Landing Page)
--------------------------*/
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 55%),
    rgba(5, 3, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.7);
  position: sticky;
  top: 12px;
  z-index: 100;
  backdrop-filter: blur(22px);
  margin-bottom: 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-wrap img {
  height: 34px;
  width: auto;
  display: block;
}

.brand-tagline {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: 32px;
}

.nav a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-purple));
  transition: width var(--transition-fast);
}

.nav a:hover,
.nav a.active {
  color: var(--text-main);
}

.nav a:hover::after,
.nav a.active::after {
  width: 18px;
}

.nav a .icon {
  margin-right: 6px;
}

@media (max-width: 500px) {
  .nav a .label {
    display: none;
  }

  .nav {
    margin-left: 0;
  }

  .nav a .icon {
    margin-right: 0;
    font-size: 20px;
  }

  .nav a {
    padding: 6px 8px;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* -------------------------
   BUTTONS
--------------------------*/
.btn,
.btn-ghost {
  border-radius: var(--radius-pill);
  font-size: 14px;
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.btn-primary {
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.4), transparent 55%),
    linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #050511;
  box-shadow: 0 10px 35px rgba(0, 242, 255, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 14px 42px rgba(0, 242, 255, 0.65);
  filter: brightness(1.05);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.26);
}

.menu-toggle,
.menu-items {
  display: none;
}


.product-table .btn-outline-yellow {
  margin-bottom: 10px;
}


/* Unified Button Styles (Dashboard/Admin) */
.btn-gradient,
.btn-gradient-small {
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.4), transparent 55%),
    linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #050511;
  box-shadow: 0 10px 35px rgba(0, 242, 255, 0.45);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.btn-gradient:hover,
.btn-gradient-small:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 14px 42px rgba(0, 242, 255, 0.65);
  filter: brightness(1.05);
}

.btn-gradient {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-gradient-small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-outline,
.btn-outline-small {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline:hover,
.btn-outline-small:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.btn-outline {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-outline-small {
  padding: 4px 10px;
  font-size: 12px;
}

/* Color Variants for Outline */
.btn-outline-green:hover {
  border-color: #00ff9d;
  color: #00ff9d;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
}

.btn-outline-red:hover {
  border-color: #ff4d4d;
  color: #ff4d4d;
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.15);
}

.btn-outline-yellow:hover {
  border-color: #ffcc00;
  color: #ffcc00;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.15);
}

/* -------------------------
   DASHBOARD COMPONENTS
--------------------------*/

/* Sidebar */
.sidebar {
  width: 240px;
  background: rgba(10, 18, 35, 0.45);
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--glass-border);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  transition: .25s ease;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--accent);
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur);
  margin-bottom: 28px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

@media screen and (min-width: 720px) and (max-width: 850px) {
    /* Wähle das 4. Element in jeder Zeile der Tabelle */
    .product-table th:nth-child(4),
    .product-table td:nth-child(4) {
        display: none;
    }
}

@media screen and (min-width: 720px) and (max-width: 760px) {
    /* Wähle das 4. Element in jeder Zeile der Tabelle */
    .product-table th:nth-child(5),
    .product-table td:nth-child(5) {
        display: none;
    }
}


/* Tables */
.product-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.product-table th,
.admin-table th {
  font-weight: 600;
  padding: 10px 12px;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  text-align: left;
}

.product-table td,
.admin-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 15px;
}

.product-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  transition: all var(--transition-fast);
  background: transparent;
}

.icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--accent);
}

.icon-btn.icon-pause {
  border-color: rgba(255, 204, 0, 0.4);
  color: #ffcc00;
}

.icon-btn.icon-activate {
  border-color: rgba(0, 255, 157, 0.4);
  color: #00ff9d;
}

.icon-btn.icon-delete {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ff6b6b;
  cursor: pointer;
}

.product-table tr:hover,
.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Forms */
.input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 15px;
}

.input::placeholder {
  color: var(--text-soft);
}

input[type="date"] {
  color-scheme: light;
}

input[type="time"] {
  color-scheme: light;
}


input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.form-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 32px;
  background: var(--glass-solid-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--blur);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55);
  text-align: center;
  margin: 0 auto;
}

.form-card h2 {
  margin-bottom: 18px;
  font-weight: 600;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.8fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.form-row-grid label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 6px;
  display: block;
}

/* -------------------------
   DASHBOARD STATS (Pills)
--------------------------*/
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: 28px;
}

/* Left Card Content */
.stats-card-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
}

.stats-left-content {
  margin-top: 20px;
  margin-bottom: 20px;
  flex: 1;
}

.stats-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Unified Pill Style (Left & Right) */
.stats-pill,
.scan-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.stats-pill:hover,
.scan-pill:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pill-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-label,
.scan-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.pill-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.dot-green {
  background: #00ff9d;
  box-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
}

.dot-yellow {
  background: #ffcc00;
  box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.dot-grey {
  background: #666;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}

.status-pill .dot {
  width: 8px;
  height: 8px;
}

.form-card a,
.form-card a:visited {
  color: #fff;
}


.center-container {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}


.form-card form {
  margin-bottom: 22px;
}


/* Right Card Content */
.savings-banner {
  background: linear-gradient(90deg, rgba(22, 33, 62, 0.8), rgba(13, 50, 77, 0.8));
  border: 1px solid rgba(0, 242, 255, 0.3);
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.savings-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-soft);
  font-weight: 600;
}

.savings-amount {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.scan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scan-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.icon-green {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
}

.icon-red {
  background: rgba(255, 77, 77, 0.15);
  color: #ff4d4d;
}

.icon-yellow {
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
}

.scan-action {
  font-size: 13px;
  color: var(--text-soft);
  text-align: right;
}

.highlight-green {
  color: #00ff9d;
  font-weight: 600;
}

.highlight-red {
  color: #ff4d4d;
  font-weight: 600;
}

/* -------------------------
   RESPONSIVE
--------------------------*/
@media (max-width: 900px) {
  .sidebar {
    width: 180px;
  }

  .form-row-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .product-table thead {
    display: none;
  }

  .product-table,
  .product-table tbody,
  .product-table tr,
  .product-table td {
    display: block;
    width: 100%;
  }

  .product-table tr {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 10px;
  }

  .product-table td {
    border-bottom: none;
    padding: 4px 0;
  }

  .product-table td:first-child,
  .product-table td:last-child {
    grid-column: 1 / -1;
  }

  .product-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 2px;
  }
}

@media (max-width: 768px) {
  .form-card {
    max-width: 95%;
    padding: 22px 20px;
    width: 100%;
  }
}


/* -------------------------
   FOOTER
--------------------------*/
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: auto;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);           /* hell/dunkel drehen */
  opacity: 0.8;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
}

input[name="purchase_price[]"] {
  min-height: 48px;
}

input[name="input[]"] {
  min-height: 48px;
}

input[name="return_days[]"] {
  min-height: 48px;
}

input[name="purchase_date[]"] {
  min-height: 48px;
  color:white;
}

input[name="password[]"] {
  min-height: 46px;
}

input[name="password"] {
  min-height: 46px;
}

input[name="password_confirm"] {
  min-height: 46px;
}

input[name="discount_threshold[]"] {
  min-height: 48px;
}

.product-table td.actions {
  display: table-cell;
  vertical-align: middle;
}

.product-table td.actions {
  text-align: center;
}

.product-table td.actions a,
.product-table td.actions form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}



td[data-label="Alarm ab %"] input[type="number"] {
  margin-bottom:0px !important;
  padding: 8px 8px !important;
}

@media (max-width: 768px) {
  input[name="purchase_date[]"] {
    width: 99%;
  }
}

/* Nur Geräte mit Touchscreen UND schmalem Display */
@media (max-width: 900px) and (pointer: coarse) {
  input[name="purchase_date[]"] {
    width: 90%;
  }
}




@supports (-webkit-touch-callout: none) {
  input[type="date"] {
    padding-top: 13px;
    padding-bottom: 13px;
  }
}


.footer-links a:hover {
  color: var(--text-main);
}

@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}


.error {
  padding-bottom: 20px;
  color: #ff6b6b;
}

.success {
  padding-bottom: 20px;
  color: #57ffa6;
}

.brand-tagline {
  display: block;
}

@media (max-width: 768px) {
  .brand-tagline {
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
  }
}

@media (max-width: 900px) {
  .glass-card.stats-card-right {
    display: none;
  }
}
