/* Base styles to match original look */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #000;
  background-color: #fff;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* Header - preserve original blue header */
#masthead {
  background-color: #fff;
  margin-bottom: 20px;
}

.header-area {
  float: left;
  width: 100%;
  height: 70px;
  background-color: #3e84c5;
  color: #fff;
  position: relative;
}

.header-area h1 {
  margin: 0;
  padding: 20px 0 0 20px;
  font-size: 1.5em;
  font-weight: bold;
}

.header-area .customer-portal {
  position: absolute;
  right: 15px;
  bottom: 10px;
  color: #fff;
  text-decoration: none;
}

/* Navigation */
.main-nav {
  background-color: #336186;
  margin-bottom: 20px;
}

.main-nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.main-nav li {
  float: left;
}

.main-nav li a {
  display: block;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 5px 10px;
  margin: 2px;
  background-color: #429ec9;
  text-decoration: none;
  border: 1px outset #1f4e69;
}

.main-nav li a:hover, .main-nav li a.active {
  border: 1px inset #000000;
}

/* Main Content */
.content-area {
  display: table;
  width: 100%;
  margin-bottom: 20px;
}

.main-content {
  display: table-cell;
  width: 70%;
  vertical-align: top;
  padding-right: 20px;
}

.sidebar {
  display: table-cell;
  width: 30%;
  vertical-align: top;
  background-color: #f5f5f5;
}

/* Content styling */
h2.header {
  color: #885500;
  font-size: 1.2em;
  margin-top: 0;
}

/* Form elements */
input[type="text"], 
input[type="password"], 
textarea {
  border: 1px inset #ccc;
  padding: 2px;
  font-family: Arial, sans-serif;
  background-color: #fff;
}

button, 
input[type="button"], 
input[type="submit"] {
  border: 2px outset #ccc;
  background-color: #ddd;
  padding: 2px 5px;
  cursor: pointer;
}

button:active, 
input[type="button"]:active, 
input[type="submit"]:active {
  border: 2px inset #ccc;
}

/* Content boxes */
.content-box {
  border: 1px solid #ccc;
  margin-bottom: 15px;
  padding: 10px;
}

.content-box h3 {
  margin-top: 0;
  font-size: 1em;
  color: #006699;
}

/* Tracking tabs */
.tracking-tabs {
  width: 100%;
  display: table;
  border-collapse: collapse;
}

.tab-button {
  display: table-cell;
  background-color: #eee;
  border: 1px solid #ccc;
  text-align: center;
  padding: 5px;
  cursor: pointer;
}

.tab-button.active {
  background-color: #fff;
  border-bottom: none;
}

.tab-content {
  display: none;
  border: 1px solid #ccc;
  border-top: none;
  padding: 10px;
}

.tab-content.active {
  display: block;
}

.tracking-box {
  width: 98%;
  height: 80px;
  border: 1px inset #ccc;
  margin-bottom: 10px;
  padding: 2px;
}

.track-button {
  background-color: #4b8df8;
  color: white;
  border: 2px outset #366dc8;
  padding: 2px 10px;
  float: right;
}

/* Links */
a {
  color: #0000ff;
  text-decoration: underline;
}

a:visited {
  color: #551a8b;
}

a:hover {
  color: #ff0000;
}

/* Footer */
footer {
  margin-top: 30px;
  padding: 10px 0;
  font-size: 0.8em;
  border-top: 1px solid #ddd;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #ddd;
  padding: 5px;
  text-align: left;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Lists */
ul.feature-list {
  list-style-type: none;
  padding-left: 10px;
  margin: 10px 0;
}

ul.feature-list li {
  margin-bottom: 5px;
  padding-left: 15px;
  background: url('../images/arrow.gif') no-repeat left center;
}

/* Search box */
.search-area {
  margin-bottom: 15px;
}

.search-input {
  width: 70%;
  margin-right: 5px;
}

.search-button {
  padding: 1px 5px;
}

/* Dashboard-specific styles */
.dashboard-summary {
  margin-top: 15px;
}

.dashboard-summary h4 {
  margin-top: 0;
  color: #333;
}

/* Error messages */
.error-message {
  background-color: #ffeeee;
  border: 1px solid #ff0000;
  color: #ff0000;
  padding: 10px;
  margin-bottom: 15px;
}

/* Success messages */
.success-message {
  background-color: #eeffee;
  border: 1px solid #00ff00;
  color: #008800;
  padding: 10px;
  margin-bottom: 15px;
}

/* User Controls in Header */
.user-controls {
  position: absolute;
  right: 15px;
  bottom: 10px;
}

.welcome {
  color: #fff;
  margin-right: 10px;
}

.logout-link {
  color: #fff;
  text-decoration: none;
  margin-right: 10px;
  padding: 2px 5px;
  background-color: #265680;
  border: 1px solid #1a3e5c;
}

.logout-link:hover {
  background-color: #1a3e5c;
  color: #fff;
}

/* Login page specific styles */
.login-page .main-content {
  margin: 0 auto;
  max-width: 600px;
  float: none;
}

/* Error messages */
.error-message {
  background-color: #ffeeee;
  border: 1px solid #ff0000;
  color: #ff0000;
  padding: 10px;
  margin-bottom: 15px;
}

/* Success messages */
.success-message {
  background-color: #eeffee;
  border: 1px solid #00ff00;
  color: #008800;
  padding: 10px;
  margin-bottom: 15px;
}

/* Add this to your existing CSS file */

/* Form styles */
.form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.form-group textarea {
  min-height: 120px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 5px;
}

.checkbox-item {
  display: flex;
  align-items: center;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 8px;
}

.form-note {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  text-align: center;
}

.btn-primary {
  background-color: #4a6fa5;
  color: white;
}

/* This is the important addition - explicitly style links inside buttons */
.btn-primary a, 
.btn a {
  color: white;
  text-decoration: none;
}

/* Make sure hover states don't revert to default link colors */
.btn-primary:hover,
.btn-primary a:hover,
.btn:hover a {
  color: white;
  text-decoration: underline;
}

/* Ensure the button text is white regardless of visited state */
.btn-primary:visited,
.btn-primary a:visited {
  color: white;
}

.btn-secondary {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  color: #333;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 14px;
}

/* Message styles */
.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.error-message ul {
  margin: 5px 0 0 20px;
  padding: 0;
}

/* Project card styles */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Reduced from 250px */
  gap: 10px; /* Reduced from 20px */
  margin-top: 10px; /* Reduced from 15px */
}

.project-card {
  border: 1px solid #ddd;
  padding: 10px; /* Reduced from 15px */
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}


.project-card h3 {
  margin-top: 0;
  margin-bottom: 5px; /* Added to reduce space */
  font-size: 16px; /* Reduced from 18px */
}

.project-type {
  display: inline-block;
  background-color: #eaeaea;
  padding: 2px 6px; /* Reduced from 3px 8px */
  border-radius: 3px;
  font-size: 12px; /* Reduced from 14px */
  margin: 3px 0; /* Reduced from 5px 0 */
}

.project-role, .project-creator {
  font-size: 12px; /* Reduced from 14px */
  color: #666;
  margin-bottom: 5px; /* Reduced from 10px */
  line-height: 1.2; /* Added to reduce line height */
}

/* Make the buttons smaller */
.project-card .btn-sm {
  padding: 3px 8px; /* Reduced from 5px 10px */
  font-size: 12px; /* Reduced from 14px */
}

/* Optional: make content boxes a bit more compact too */
.content-box {
  margin-bottom: 12px; /* Reduced from 15px */
  padding: 8px; /* Reduced from 10px */
}

.content-box h3 {
  margin-bottom: 5px; /* Added to reduce space */
}

/* Action buttons at the top of pages */
.action-buttons {
  margin-bottom: 20px;
}