/* Modern Freight Manager Frontend Styles */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
}

/* Dashboard Styles */
.fm-client-dashboard,
.fm-register-form,
.fm-login-form {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  max-width: 1200px;
  margin: 2rem auto;
  border: 1px solid var(--border-color);
}

.fm-client-dashboard h2,
.fm-client-dashboard h3 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.875rem;
  line-height: 1.2;
}

.fm-client-dashboard h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Dashboard Grid Layout */
.fm-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.fm-dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.fm-dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.fm-dashboard-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fm-dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.fm-dashboard-card.fm-dashboard-stat {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.fm-dashboard-card img,
.fm-dashboard-card svg {
  width: 48px;
  height: 48px;
  opacity: 0.9;
}

.fm-stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

/* Ship Icon for Total Shipments */
.fm-ship-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 18h18v-2H3v2zm-.5-4H21l-3-7H6l-3.5 7zm1.5-5h14l1.5 3H3l1.5-3z'/%3E%3C/svg%3E")
    no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 18h18v-2H3v2zm-.5-4H21l-3-7H6l-3.5 7zm1.5-5h14l1.5 3H3l1.5-3z'/%3E%3C/svg%3E")
    no-repeat center;
  -webkit-mask-size: contain;
}

/* Dashboard Sections */
.fm-dashboard-section {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.fm-dashboard-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Staff Claims Section */
.fm-staff-claims-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.fm-staff-claims-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.fm-staff-claims-card h4 {
  margin: 1rem 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.fm-assigned-clients ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.fm-assigned-clients ul li:last-child {
  border-bottom: none;
}

.fm-claim-client-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid #e9ecef;
}

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

.fm-claim-form select,
.fm-claim-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.fm-claim-form select:focus,
.fm-claim-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 116, 188, 0.1);
}

.fm-pending-claims ul li {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.fm-pending-claims ul li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.fm-pending-claims ul li small {
  color: var(--text-secondary);
  display: block;
  line-height: 1.4;
}

.fm-dashboard-section h2::before {
  content: "";
  width: 4px;
  height: 1.5rem;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
}

/* Shipment Cards */
.fm-shipment-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
}

.fm-shipment-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.fm-shipment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.fm-shipment-number {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
}

.fm-shipment-status {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-status-delivered {
  background-color: #dcfce7;
  color: #166534;
}

.fm-status-in-transit {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.fm-status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.fm-status-unknown {
  background-color: #f1f5f9;
  color: var(--text-secondary);
}

.fm-shipment-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fm-shipment-details > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fm-shipment-details strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-shipment-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.fm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.fm-btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--primary-color);
}

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

.fm-btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.fm-btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.fm-btn-secondary:hover {
  background: var(--background-color);
  color: var(--text-primary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Profile and Quick Actions Cards */
.fm-profile-card,
.fm-quick-actions-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.fm-profile-card h3,
.fm-quick-actions-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.fm-profile-card > div {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.fm-profile-card > div:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.fm-profile-card strong {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-quick-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.fm-quick-action:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.fm-quick-action span {
  font-size: 1.25rem;
}

/* Warehouse List */
.fm-warehouse-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fm-warehouse-item {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.fm-warehouse-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Forms */
.fm-register-form,
.fm-login-form,
.fm-forgot-form {
  max-width: 500px;
  margin: 2rem auto;
}

.fm-register-form,
.fm-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fm-form-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.fm-form-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.fm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fm-register-form label,
.fm-login-form label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-register-form input,
.fm-login-form input,
.fm-register-form textarea,
.fm-register-form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--surface-color);
  transition: all 0.2s ease;
  font-family: inherit;
}

.fm-register-form input:focus,
.fm-login-form input:focus,
.fm-register-form textarea:focus,
.fm-register-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.fm-register-form button,
.fm-login-form button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.fm-register-form button:hover,
.fm-login-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.fm-form-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

.fm-form-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.fm-form-footer a:hover {
  text-decoration: underline;
}

/* Error and Success Messages */
.fm-errors {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.fm-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.fm-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Portal Login Prompt */
.fm-portal-login-prompt {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  max-width: 500px;
  margin: 3rem auto;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.fm-portal-login-prompt p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.fm-portal-login-prompt a {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: all 0.2s ease;
}

.fm-portal-login-prompt a:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Tables */
.fm-recent-shipments {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.fm-recent-shipments th,
.fm-recent-shipments td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.fm-recent-shipments th {
  background: var(--background-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-recent-shipments tr:last-child td {
  border-bottom: none;
}

.fm-recent-shipments tr:hover {
  background: var(--background-color);
}

/* Search Widget */
.fm-search-widget,
.fm-quick-track-widget {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
  max-width: 600px;
}

.fm-quick-track-widget h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.fm-simple-search-fields,
.fm-form-group {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.fm-simple-search-fields input[type="text"],
.fm-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--surface-color);
  transition: all 0.2s ease;
}

.fm-simple-search-fields input[type="text"]:focus,
.fm-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Enhanced Search Results */
.fm-simple-search-results,
.fm-quick-track-results,
.fm-results-container {
  margin-top: 2rem;
}

.fm-results-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.fm-shipments-results,
.fm-invoices-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fm-shipments-results h4,
.fm-invoices-results h4 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.fm-icon {
  font-size: 1.5rem;
}

/* Improved Result Items */
.fm-result-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fm-result-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.fm-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.fm-result-header h5 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.2;
}

.fm-result-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  background: var(--background-color);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
}

/* Vertically Aligned Details */
.fm-result-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fm-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.fm-detail-row:last-child {
  border-bottom: none;
}

.fm-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fm-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.fm-status {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  width: fit-content;
}

/* Result Actions */
.fm-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.fm-btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* Track Results Specific Styles */
.fm-track-results-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fm-track-results-container h4 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-align: center;
}

.fm-track-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.fm-track-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.fm-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.fm-track-type {
  background: var(--primary-color);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.fm-track-header h5 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fm-track-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--background-color);
  border-radius: var(--radius-md);
}

.fm-status-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fm-status-value {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: var(--success-color);
  color: white;
}

.fm-track-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fm-track-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--background-color);
  border-radius: var(--radius-sm);
}

.fm-track-row span:first-child {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.fm-track-row span:last-child {
  font-weight: 500;
  color: var(--text-primary);
}

.fm-track-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Quick Track Results */
.fm-quick-result {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.fm-quick-result:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.fm-quick-result .fm-result-header {
  margin-bottom: 1rem;
}

.fm-quick-result .fm-result-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.fm-quick-result .fm-result-details {
  margin-bottom: 1.5rem;
}

.fm-quick-result .fm-result-details .fm-detail-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.fm-quick-result .fm-result-status {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fm-quick-result .fm-result-actions {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* Error States */
.fm-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  color: #991b1b;
  text-align: center;
}

.fm-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .fm-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .fm-dashboard-sidebar {
    flex-direction: row;
    gap: 1rem;
  }

  .fm-profile-card,
  .fm-quick-actions-card {
    flex: 1;
  }

  .fm-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .fm-track-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .fm-track-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 768px) {
  .fm-client-dashboard,
  .fm-register-form,
  .fm-login-form {
    padding: 1.5rem;
    margin: 1rem;
  }

  .fm-dashboard-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fm-dashboard-section {
    padding: 1.5rem;
  }

  .fm-shipment-details {
    grid-template-columns: 1fr;
  }

  .fm-shipment-actions,
  .fm-result-actions,
  .fm-track-actions {
    justify-content: center;
  }

  .fm-simple-search-fields,
  .fm-form-group {
    flex-direction: column;
    align-items: stretch;
  }

  .fm-form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fm-dashboard-sidebar {
    flex-direction: column;
  }

  .fm-detail-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  .fm-client-dashboard,
  .fm-register-form,
  .fm-login-form {
    padding: 1rem;
  }

  .fm-form-title {
    font-size: 1.5rem;
  }

  .fm-shipment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .fm-result-item,
  .fm-track-item,
  .fm-quick-result {
    padding: 1rem;
  }
}

/* Animation for loading states */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fm-loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Focus styles for accessibility */
.fm-btn:focus-visible,
.fm-quick-action:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .fm-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .fm-dashboard-sidebar {
    display: none;
  }

  .fm-btn {
    display: none;
  }
}
