body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    /* Removed body padding-top */
}

.navbar {
    min-height: 60px;
    /* Removed mb-4 class from navbar in HTML instead */
}

.navbar-brand img {
    margin-right: 8px;
}

/* Main Content Area */
/* mt-4 added to container in HTML */

/* Cards */
.card {
    border: 1px solid #dee2e6; /* Match tab border color */
    /* Removed margin-bottom as panes handle spacing */
}
.card-header {
    background-color: #f8f9fa; /* Match active tab background */
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}
.card-header h5, .card-header h6 { /* Target h6 as well */
     margin-bottom: 0;
     font-size: 1rem; /* Slightly smaller header */
}
.card-body {
    padding: 1.5rem;
}

/* Input Section Specifics */
#input-section label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

/* Welcome message styling */
#welcome-message {
    font-style: italic;
    /* font-size: 0.9rem; /* Optional: adjust size */
    /* color: #6c757d; /* Optional: adjust color */
}

/* Field Display (Read-Only View) */
.field-display {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.field-display .label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.field-display .value {
    color: #555;
    white-space: pre-wrap; /* Preserve line breaks */
}
.field-display .value i.small { /* Style for N/A */
    font-size: 0.85rem;
}
/* Ensure nested lists/tables within value look okay */
.field-display .value ul,
.field-display .value ol {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}
.field-display .value table {
    font-size: 0.9em; /* Slightly smaller tables */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    width: auto; /* Allow table to shrink if content allows */
    max-width: 100%; /* Prevent overflow */
}


/* Section Headers within display */
.section-header {
    font-size: 1rem;
    font-weight: 600;
    color: #007bff; /* Primary color */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

/* Edit Form Styling */
.edit-form .form-group {
    margin-bottom: 1rem;
}
.edit-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
.edit-form textarea {
    resize: vertical;
    min-height: 80px;
    font-size: 0.95rem;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.5rem;
}
.edit-form textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.form-actions {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: 1.5rem;
}

/* Tab Styling Adjustments */
.nav-tabs {
    border-bottom: 1px solid #dee2e6; /* Ensure bottom border exists */
    /* Removed mb-3 class in HTML */
}

.tab-content {
    /* Removed padding-top */
    /* Add other styles if needed */
}

.tab-pane .card {
    /* Remove top border and top radius of card inside tab pane */
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 1.5rem; /* Re-add margin for spacing between content and next element */
}

.nav-tabs .nav-link {
    color: #495057;
    border-bottom-color: transparent; /* Hide bottom border by default */
    margin-bottom: -1px; /* Overlap the tab content border */
    border-top-left-radius: .25rem;  /* Keep top radius */
    border-top-right-radius: .25rem; /* Keep top radius */

}

.nav-tabs .nav-link.active {
    background-color: #fff; /* Make active tab background white */
    border-color: #dee2e6 #dee2e6 #fff; /* Match card border, make bottom white */
    font-weight: 600;
    color: #007bff;
}

.nav-tabs .nav-link:hover:not(.active) { /* Style non-active hover */
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa; /* Light hover background */
}


/* Loading Spinner - Styles moved to HTML for simplicity */
.loading-spinner { }

/* Utility Classes */
.edit-button i { margin-right: 5px; }
/* Screen reader only styles */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Specificity for Navbar Actions Alignment */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav {
    align-items: center; /* Vertically align items */
  }
}