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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  background: #000;
  color: white;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Container */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
  min-height: calc(100vh - 60px);
}

/* Header */
.header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
}

.header-left h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header-left p {
  opacity: 0.9;
  font-size: 0.9rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Content */
.content {
  flex: 1;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* Login page specific content */
.login-content {
  max-width: 400px;
  margin: 0 auto;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  color: #333;
  font-weight: 600;
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-group input:focus {
  outline: none;
  border-color: #00a8cc;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

/* Buttons */
.login-btn {
  width: 100%;
  padding: 1rem;
  background: #00a8cc;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.login-btn:hover {
  background: #0077b6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.action-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0.5rem;
  transition: transform 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

/* Links */
.forgot-password {
  text-align: center;
  margin-top: 2rem;
}

.forgot-password a {
  color: #00a8cc;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

.forgot-password a:hover {
  text-decoration: underline;
}

/* User Info */
.user-info {
  text-align: right;
}

.user-info p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.welcome-section h2 {
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.welcome-section p {
  color: #666;
  font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e1e5e9;
  transition: all 0.3s ease;
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 168, 204, 0.15);
  border-color: #00a8cc;
}

.stat-card h3 {
  color: #00a8cc;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-card p {
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Actions Section */
.actions-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.actions-section h3 {
  color: #333;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: #000;
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  width: 20px;
  height: 20px;
  background: #00a8cc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Search Section */
.search-section {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 300px;
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
}

.search-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
}

.clear-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.clear-btn:hover {
  transform: translateY(-2px);
}

.excel-export-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.excel-export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Date Filter Section */
.date-filter-section {
  margin-bottom: 2rem;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #e1e5e9;
}

.date-filter-row {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.date-input-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.date-input {
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.date-input:focus {
  outline: none;
  border-color: #667eea;
}

.date-filter-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  height: fit-content;
}

.date-filter-btn:hover {
  transform: translateY(-2px);
}

.clear-date-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  height: fit-content;
}

.clear-date-btn:hover {
  transform: translateY(-2px);
}

/* Cards Container */
.cards-container {
  margin: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.project-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e9ecef;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
  height: 4px;
  width: 100%;
}

.card-header.status-afgerond {
  background: #28a745;
}

.card-header.status-in-behandeling {
  background: #ffc107;
}

.card-header.status-te-factureren {
  background: #17a2b8;
}

.card-header.status-geannuleerd {
  background: #dc3545;
}

.card-header.status-openstaand {
  background: #6c757d;
}

.card-content {
  padding: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-date {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.card-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.card-status.status-afgerond {
  background: #d4edda;
  color: #155724;
}

.card-status.status-in-behandeling {
  background: #fff3cd;
  color: #856404;
}

.card-status.status-te-factureren {
  background: #d1ecf1;
  color: #0c5460;
}

.card-status.status-geannuleerd {
  background: #f8d7da;
  color: #721c24;
}

.card-status.status-openstaand {
  background: #e2e3e5;
  color: #383d41;
}

.card-location {
  color: #28a745;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.card-detail-item {
  display: flex;
  flex-direction: column;
}

.card-detail-label {
  color: #6c757d;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.card-detail-value {
  color: #212529;
  font-weight: 500;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e1e5e9;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
  z-index: 10;
}

tr:hover {
  background: #f8f9fa;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-in-behandeling {
  background: #fff3cd;
  color: #856404;
}

.status-te-factureren {
  background: #d1ecf1;
  color: #0c5460;
}

.status-afgerond {
  background: #d4edda;
  color: #155724;
}

.status-geannuleerd {
  background: #f8d7da;
  color: #721c24;
}

/* Loading and Messages */
.loading {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-size: 1.1rem;
}

.error {
  text-align: center;
  padding: 2rem;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid #f5c6cb;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-style: italic;
}

/* Project Details */
.project-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-section h3 {
  color: #00a8cc;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e1e5e9;
}

.detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-label {
  font-weight: 600;
  color: #555;
  flex: 1;
}

.detail-value {
  color: #333;
  flex: 2;
  text-align: right;
}

.full-width {
  grid-column: 1 / -1;
}

.description-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.description-section h3 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.description-text {
  color: #555;
  line-height: 1.6;
}

/* Widgets */
.widgets-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.widget {
  background: white;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget h3 {
  background: #00a8cc;
  color: white;
  padding: 1rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.widget-content {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.loading-widget {
  text-align: center;
  color: #666;
  padding: 2rem;
}

.uren-item,
.inkoop-item,
.medewerker-item,
.materiaal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e1e5e9;
}

.uren-item:last-child,
.inkoop-item:last-child,
.medewerker-item:last-child,
.materiaal-item:last-child {
  border-bottom: none;
}

.uren-info,
.inkoop-info,
.medewerker-info,
.materiaal-info {
  flex: 1;
}

.uren-info h4,
.inkoop-info h4,
.medewerker-info h4,
.materiaal-info h4 {
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.uren-info p,
.inkoop-info p,
.materiaal-info p {
  color: #666;
  font-size: 0.8rem;
  margin: 0;
}

.uren-uren,
.inkoop-bedrag,
.medewerker-uren,
.materiaal-aantal {
  font-weight: 600;
  color: #667eea;
  font-size: 1rem;
}

.uren-totaal,
.inkoop-totaal,
.materiaal-totaal {
  background: #667eea;
  color: white;
  padding: 0.75rem;
  margin-top: 1rem;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: #667eea;
  color: white;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .current-page {
  background: #667eea;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-details {
    grid-template-columns: 1fr;
  }

  .widgets-section {
    grid-template-columns: 1fr;
  }

  .detail-item {
    flex-direction: column;
  }

  .detail-value {
    text-align: left;
    margin-top: 0.25rem;
  }

  .content {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .header-left h1 {
    font-size: 1.5rem;
  }

  .date-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .date-input-group {
    min-width: auto;
  }

  .search-section {
    flex-direction: column;
    align-items: stretch;
  }

  .excel-export-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 1.5rem 1rem;
  }

  .header {
    padding: 1.5rem 1rem 1rem;
  }

  .header h1 {
    font-size: 2rem;
  }
}
