/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.5;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.username {
  font-weight: 500;
}

.logout-btn {
  color: #666;
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* Navigation */
.nav {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 20px;
}

.nav-links {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
}

.nav-links a {
  padding: 12px 0;
  color: #666;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

/* Cards */
.card {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

th {
  background: #fafafa;
  font-weight: 600;
  color: #555;
}

tr:hover {
  background: #f9f9f9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: white;
  color: black;
}

.btn-primary:hover {
  background: #333;
}

.btn-danger {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  background: rgba(220, 53, 69, 0.3);
}

.btn-warning {
  background: rgba(255, 140, 0, 0.2);
  color: #ff8c00;
  border: 1px solid rgba(255, 140, 0, 0.3);
}

.btn-success {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #999;
}

/* Urgency badges */
.urgency-critical {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.urgency-high {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.urgency-mid {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

.urgency-low {
  background: rgba(108, 117, 125, 0.15);
  color: #6c757d;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: white;
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  border-radius: 4px;
  max-height: 80%;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.close {
  font-size: 28px;
  cursor: pointer;
  color: #999;
}

/* Utilities */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-20 {
  margin-top: 20px;
}
.mb-20 {
  margin-bottom: 20px;
}
.p-20 {
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  th,
  td {
    padding: 8px;
    font-size: 12px;
  }

  .card-header h2 {
    font-size: 16px;
  }
}
