/* nShift Shipment Creator Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #053027 0%, #1b2d36 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.header img {
  justify-self: start;
}

.header h1 {
  color: #1b2d36;
  font-size: 24px;
  margin: 0;
  justify-self: center;
}

.header button {
  justify-self: end;
}

.login-box, .upload-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  color: #1b2d36;
  text-align: center;
  margin-bottom: 10px;
  font-size: 28px;
}

h2 {
  color: #1b2d36;
  margin-bottom: 15px;
  font-size: 24px;
}

h3 {
  color: #555;
  margin-bottom: 10px;
  font-size: 18px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

.info-text {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.csv-format {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid #c94912;
}

.csv-format h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.csv-format pre {
  background: white;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 13px;
  border: 1px solid #ddd;
}

.csv-format .note {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  font-style: italic;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
  background-color: white;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #c94912;
}

.file-label {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border: 2px dashed #c94912;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0;
}

.file-label:hover {
  background: #e9ecef;
  border-color: rgba(201, 73, 18, 0.7);
}

.file-icon {
  font-size: 24px;
  margin-right: 12px;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #c94912 0%, rgba(201, 73, 18, 0.7) 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(201, 73, 18, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  padding: 10px 20px;
}

.btn-secondary:hover {
  background: #5a6268;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c94912, #053027, #c94912);
  background-size: 200% 100%;
  animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

#results {
  margin-top: 30px;
}

.results-summary {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.results-summary.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.results-summary.warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.results-summary h3 {
  margin-bottom: 15px;
  color: inherit;
}

.results-summary p {
  margin: 5px 0;
}

.results-table-container {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-table thead {
  background: #1b2d36;
  color: white;
}

.results-table th,
.results-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.results-table tbody tr:hover {
  background: #f8f9fa;
}

.results-table code {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #1b2d36;
}

.status-success {
  color: #28a745;
  font-weight: 500;
}

.status-failed {
  color: #dc3545;
  font-weight: 500;
}

.details-cell {
  font-size: 12px;
  color: #666;
}

.details-cell a {
  color: #c94912;
  text-decoration: none;
  font-weight: 500;
}

.details-cell a:hover {
  text-decoration: underline;
}

.error-box {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 20px;
  border-radius: 8px;
}

.error-box h3 {
  color: #721c24;
  margin-bottom: 10px;
}

.sender-info {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.sender-info h3 {
  color: #1b2d36;
  margin-bottom: 15px;
}

.sender-info p {
  line-height: 1.8;
  color: #555;
}

.history-section {
  background: white;
  padding: 30px;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.history-section h2 {
  color: #1b2d36;
  margin-bottom: 20px;
  font-size: 22px;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
  }
  
  .login-box, .upload-box {
    padding: 25px;
  }
  
  .results-table {
    font-size: 14px;
  }
  
  .results-table th,
  .results-table td {
    padding: 8px;
  }
}

/* Download Label Button */
.btn-download {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #c94912 0%, rgba(201, 73, 18, 0.7) 100%);
  color: white !important;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  color: white !important;
}

.error-text {
  color: #dc3545;
  font-size: 11px;
  cursor: help;
}
