:root {
  --primary-color: #0d4d5c;
  --secondary-color: #1a7a8a;
  --accent-color: #2d9caa;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #fff;
}

/* Header */
.header {
  background-color: var(--primary-color);
  border-bottom: none;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: block;
  text-decoration: none;
}

.logo img {
  height: 70px;
  display: block;
  filter: brightness(0) invert(1);
}

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

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.nav-links a.active {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
}

/* Notifications */
.notification-icon {
  position: relative;
  cursor: pointer;
  padding: 0.5rem 1rem;
  color: white;
  font-size: 1.5rem;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
}

.notification-icon:hover {
  color: var(--accent-color);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0.25rem;
  background-color: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.notification-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 400px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.notification-popup.show {
  display: block;
}

.notification-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-dark);
}

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.notification-item:hover {
  background-color: var(--bg-light);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.notification-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

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

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.container-narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-light);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.file-upload:hover {
  border-color: var(--primary-color);
  background-color: var(--bg-light);
}

.file-upload-icon {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  table-layout: auto;
}

.table th,
.table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  font-size: 0.8rem;
}

.table th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.875rem;
}

.table td {
  font-size: 0.875rem;
}

.table tr:hover {
  background-color: var(--bg-light);
  cursor: pointer;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-new {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-processing {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-sent {
  background-color: #e8f5e9;
  color: #388e3c;
}

.status-urgent {
  background-color: #ffebee;
  color: #c62828;
}

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

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

.stat-card.warning {
  border-left-color: var(--warning-color);
}

.stat-card.success {
  border-left-color: var(--success-color);
}

.stat-card.danger {
  border-left-color: var(--danger-color);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Order detail */
.order-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-item {
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 6px;
  min-width: 0;
  overflow: hidden;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

/* Messages */
.messages-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.message {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.message-sender {
  font-weight: 600;
  color: var(--primary-color);
}

.message-time {
  font-size: 0.875rem;
  color: var(--text-light);
}

.message-body {
  color: var(--text-dark);
}

/* File list */
.file-list {
  list-style: none;
  margin-top: 1rem;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: var(--bg-light);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.file-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--primary-color);
}

.file-name {
  flex: 1;
  font-weight: 500;
}

.file-size {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Features section */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-description {
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
  display: flex;
}

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

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
