/* ================================================
   PFLEEGE - PROFESSIONAL INVOICE & PAYROLL STYLES
   ================================================ */

/* ========== INVOICE STATUS BADGES ========== */
.invoice-status-offen {
  background: #fff3cd;
  color: #856404;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.invoice-status-bezahlt {
  background: #d4edda;
  color: #155724;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.invoice-status-überfällig {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  animation: pulse-red 2s infinite;
}

.invoice-status-gemahnt {
  background: #dc3545;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  animation: pulse-red 2s infinite;
}

.invoice-status-storniert {
  background: #6c757d;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  text-decoration: line-through;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ========== REMINDER LEVEL BADGES ========== */
.reminder-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reminder-level-1 {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #f39c12;
}

.reminder-level-2 {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #e74c3c;
}

.reminder-level-3 {
  background: #dc3545;
  color: white;
  border-left: 4px solid #8b0000;
}

/* ========== INVOICE DETAILS CARD ========== */
.invoice-detail-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 6px solid var(--color-primary);
}

.invoice-header-section {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.invoice-company-info {
  flex: 1;
}

.invoice-customer-info {
  flex: 1;
  text-align: right;
}

.invoice-number-display {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.invoice-date-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.invoice-date-item {
  text-align: center;
}

.invoice-date-label {
  font-size: 11px;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  font-weight: 600;
}

.invoice-date-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-secondary);
}

/* ========== INVOICE ITEMS TABLE ========== */
.invoice-items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
}

.invoice-items-table thead {
  background: var(--color-primary);
  color: white;
}

.invoice-items-table th {
  padding: 12px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invoice-items-table td {
  padding: 12px;
  border-bottom: 1px solid #ecf0f1;
}

.invoice-items-table tbody tr:hover {
  background: #f8f9fa;
}

.invoice-items-table .text-right {
  text-align: right;
}

.invoice-items-table .text-center {
  text-align: center;
}

/* ========== INVOICE TOTALS ========== */
.invoice-totals-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.invoice-total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 16px;
}

.invoice-total-row.subtotal {
  border-bottom: 1px solid #dee2e6;
}

.invoice-total-row.tax {
  color: #7f8c8d;
  font-size: 14px;
}

.invoice-total-row.grand-total {
  border-top: 3px solid var(--color-primary);
  margin-top: 15px;
  padding-top: 15px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ========== PAYMENT STATUS INDICATORS ========== */
.payment-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.payment-indicator-unbezahlt {
  background: #fff3cd;
  color: #856404;
}

.payment-indicator-teilweise {
  background: #cfe2ff;
  color: #084298;
}

.payment-indicator-vollständig {
  background: #d4edda;
  color: #155724;
}

.payment-indicator::before {
  content: '●';
  font-size: 20px;
}

/* ========== REMINDER TIMELINE ========== */
.reminder-timeline {
  margin: 30px 0;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.reminder-timeline-item {
  display: flex;
  align-items: start;
  padding: 15px;
  border-left: 4px solid #f39c12;
  margin-bottom: 15px;
  background: #fffbf5;
  border-radius: 6px;
  position: relative;
}

.reminder-timeline-item.level-2 {
  border-left-color: #e74c3c;
  background: #fff5f5;
}

.reminder-timeline-item.level-3 {
  border-left-color: #8b0000;
  background: #ffe6e6;
}

.reminder-timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  font-size: 20px;
  margin-right: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reminder-timeline-content {
  flex: 1;
}

.reminder-timeline-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--color-secondary);
}

.reminder-timeline-date {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.reminder-timeline-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-danger);
}

.reminder-sent-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #27ae60;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

/* ========== PAYROLL STATUS BADGES ========== */
.payroll-status-entwurf {
  background: #cfe2ff;
  color: #084298;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.payroll-status-geprüft {
  background: #fff3cd;
  color: #856404;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.payroll-status-ausgezahlt {
  background: #d4edda;
  color: #155724;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* ========== PAYROLL DETAIL CARD ========== */
.payroll-detail-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 6px solid var(--color-success);
}

.payroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.payroll-employee-info {
  flex: 1;
}

.payroll-period-info {
  text-align: right;
  flex: 1;
}

.payroll-number-display {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 5px;
}

/* ========== PAYROLL SECTIONS ========== */
.payroll-section {
  margin: 25px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.payroll-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-secondary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}

.payroll-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.payroll-hour-item {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid var(--color-primary);
}

.payroll-hour-label {
  font-size: 12px;
  color: #7f8c8d;
  margin-bottom: 5px;
}

.payroll-hour-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-secondary);
}

.payroll-hour-amount {
  font-size: 14px;
  color: var(--color-success);
  font-weight: 600;
  margin-top: 5px;
}

/* ========== PAYROLL DEDUCTIONS ========== */
.payroll-deductions {
  margin: 25px 0;
}

.deduction-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #ecf0f1;
}

.deduction-label {
  font-size: 14px;
  color: var(--color-secondary);
}

.deduction-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-danger);
}

.deduction-total {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  margin-top: 15px;
  border-top: 3px solid var(--color-danger);
  font-size: 18px;
  font-weight: 700;
}

/* ========== PAYROLL NET PAYMENT ========== */
.payroll-net-payment {
  margin: 30px 0;
  padding: 25px;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  border-radius: 12px;
  color: white;
  text-align: center;
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.payroll-net-label {
  font-size: 16px;
  margin-bottom: 10px;
  opacity: 0.9;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.payroll-net-amount {
  font-size: 42px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ========== STATISTICS BOXES ========== */
.finance-stats-box {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  transition: all 0.3s;
  border-top: 4px solid var(--color-primary);
}

.finance-stats-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.finance-stats-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 15px 0;
}

.finance-stats-label {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-stats-box.danger .finance-stats-value {
  color: var(--color-danger);
}

.finance-stats-box.danger {
  border-top-color: var(--color-danger);
}

.finance-stats-box.success .finance-stats-value {
  color: var(--color-success);
}

.finance-stats-box.success {
  border-top-color: var(--color-success);
}

.finance-stats-box.warning .finance-stats-value {
  color: var(--color-warning);
}

.finance-stats-box.warning {
  border-top-color: var(--color-warning);
}

/* ========== ACTION BUTTONS ========== */
.invoice-actions,
.payroll-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid #ecf0f1;
}

/* ========== OVERDUE WARNING BANNER ========== */
.overdue-warning-banner {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.overdue-warning-icon {
  font-size: 36px;
}

.overdue-warning-content {
  flex: 1;
}

.overdue-warning-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.overdue-warning-text {
  font-size: 14px;
  opacity: 0.95;
}

/* ========== REMINDER DASHBOARD ========== */
.reminder-dashboard {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.reminder-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.reminder-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.reminder-stat-box {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--color-warning);
}

.reminder-stat-box.level-2 {
  border-left-color: var(--color-danger);
}

.reminder-stat-box.level-3 {
  border-left-color: #8b0000;
}

.reminder-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-warning);
}

.reminder-stat-box.level-2 .reminder-stat-value {
  color: var(--color-danger);
}

.reminder-stat-box.level-3 .reminder-stat-value {
  color: #8b0000;
}

.reminder-stat-label {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .invoice-header-section {
    flex-direction: column;
    gap: 20px;
  }
  
  .invoice-customer-info {
    text-align: left;
  }
  
  .invoice-date-info {
    grid-template-columns: 1fr;
  }
  
  .invoice-actions,
  .payroll-actions {
    flex-direction: column;
  }
  
  .invoice-actions .btn,
  .payroll-actions .btn {
    width: 100%;
  }
  
  .payroll-hours-grid {
    grid-template-columns: 1fr;
  }
  
  .reminder-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .payroll-net-amount {
    font-size: 32px;
  }
}
