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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #3498db;
}

/* Main content */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Headings */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #34495e;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

thead {
  background-color: #34495e;
  color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid #ecf0f1;
}

tbody tr:hover {
  background-color: #f8f9fa;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3498db;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
  margin-left: 0.5rem;
}

.btn-danger:hover {
  background-color: #c0392b;
}

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

.stat-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-box h3 {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.stat-box .stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

.stat-box .stat-label {
  font-size: 0.9rem;
  color: #95a5a6;
  margin-top: 0.25rem;
}

/* Region badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-eu {
  background-color: #3498db;
  color: white;
}

.badge-us {
  background-color: #e74c3c;
  color: white;
}

.badge-purchase {
  background-color: #27ae60;
  color: white;
}

.badge-quote {
  background-color: #f39c12;
  color: white;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.alert-error {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c33;
}

.alert-error ul {
  margin-left: 1.5rem;
}

/* Filters */
.filters {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filters form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filters .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 1.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

.radio-group input[type="radio"] {
  width: auto;
}

/* Footer */
footer {
  background-color: #2c3e50;
  color: white;
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 3rem;
}

/* Links */
a {
  color: #3498db;
}

a:hover {
  color: #2980b9;
}

/* Utility classes */
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: 500px;
}

.kanban-column {
  flex: 0 0 300px;
  min-width: 300px;
  background: #ecf0f1;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #bdc3c7;
}

.kanban-column-title {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
}

.kanban-column-count {
  background: #95a5a6;
  color: white;
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.kanban-card {
  background: white;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.kanban-card-key {
  font-weight: 600;
  color: #3498db;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.kanban-card-summary {
  font-size: 0.9rem;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #7f8c8d;
  padding-top: 0.5rem;
  border-top: 1px solid #ecf0f1;
}

.kanban-card-assignee {
  font-weight: 500;
}

.kanban-card-priority {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.kanban-card-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ecf0f1;
  font-size: 0.85rem;
}

.kanban-card-purchases,
.kanban-card-amount {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #7f8c8d;
}

.kanban-card-budget-warning {
  background: #fff3cd;
  border-left: 3px solid #f39c12;
  padding: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  border-radius: 3px;
}

.kanban-card-budget-danger {
  background: #fee;
  border-left: 3px solid #e74c3c;
}

/* View switcher */
.view-switcher {
  display: inline-flex;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.view-switcher a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #7f8c8d;
  border-right: 1px solid #ecf0f1;
  transition: background-color 0.2s, color 0.2s;
}

.view-switcher a:last-child {
  border-right: none;
}

.view-switcher a:hover {
  background: #ecf0f1;
  color: #2c3e50;
}

.view-switcher a.active {
  background: #3498db;
  color: white;
}

/* Status filter for Kanban */
.status-filter {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-filter-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #2c3e50;
}

.status-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.status-checkbox input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.status-checkbox label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: normal;
}

/* Badges for Jira statuses */
.badge-success {
  background-color: #27ae60;
  color: white;
}

.badge-warning {
  background-color: #f39c12;
  color: white;
}

.badge-danger {
  background-color: #e74c3c;
  color: white;
}

.text-danger {
  color: #e74c3c;
}

.text-warning {
  color: #f39c12;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}
