/* ============================================
   SHEEN Logistics - Brand Colors & Variables
   ============================================ */
:root {
  /* Header / footer gradient stops */
  --color-header-1: #1E2E45;
  --color-header-2: #1F2E43;
  --color-header-3: #202F44;
  --color-header-4: #1F2F46;
  --color-header-5: #1F3044;
  --color-header-6: #1E2F43;
  --color-header-7: #1F2E45;

  /* Body / button gradient stops */
  --color-bg-1: #3B7491;
  --color-bg-2: #3C7190;
  --color-bg-3: #39758F;
  --color-bg-4: #398595;
  --color-bg-5: #3B7992;

  --color-text-main: #E2EBF0;
  --color-card: #E2EBF0;       /* services & forms background */
  --color-card-alt: #d7e3ea;
  --color-card-border: rgba(57, 117, 143, 0.25);

  --color-button-1: #3B7491;
  --color-button-2: #398595;

  --color-input-bg: rgba(255, 255, 255, 0.06);
  --color-input-border: rgba(226, 235, 240, 0.18);
  --color-error: #DC2626;
  --color-success: #10B981;
  --color-white: #FFFFFF;
}

/* ============================================
   Body Background - Teal Blue Gradient
   ============================================ */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  background: linear-gradient(135deg,
    var(--color-bg-1) 0%,
    var(--color-bg-2) 20%,
    var(--color-bg-3) 40%,
    var(--color-bg-4) 60%,
    var(--color-bg-5) 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--color-text-main);
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body.section-form-page {
  background: linear-gradient(135deg,
    var(--color-bg-1) 0%,
    var(--color-bg-2) 20%,
    var(--color-bg-3) 40%,
    var(--color-bg-4) 60%,
    var(--color-bg-5) 100%);
}

/* ============================================
   Composite Background Hero Section
   ============================================ */
.hero-composite {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #1E2E45;
}

.hero-composite::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/header-backgound.png');
  background-size: 100% auto;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0.9;
}

.hero-composite::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
}

.hero-composite > * {
  position: relative;
  z-index: 10;
}

/* ============================================
   Modern Form Styles (Label Above Input)
   ============================================ */
.form-card {
  background: var(--color-card);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--color-card-border);
  color: var(--color-text-main);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-main);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-card-border);
  border-radius: 8px;
  font-size: 16px;
  color: #3B7491 !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  transition: all 0.3s ease;
  box-sizing: border-box;
  -webkit-text-fill-color: #3B7491 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group textarea::placeholder {
  color: #3B7491 !important;
  opacity: 0.6;
  -webkit-text-fill-color: #3B7491 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-button-2);
  box-shadow: 0 0 0 3px rgba(57, 133, 149, 0.25);
}

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

.form-group .input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-group .input-group input {
  flex: 1;
}

.form-group .input-group span {
  color: var(--color-text-main);
  font-weight: 500;
}

/* ============================================
   Button Styles - Blue Primary, Orange Accent
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--color-button-1) 0%, var(--color-button-2) 100%);
  color: #E2EBF0 !important;
  border: 1px solid rgba(226, 235, 240, 0.35);
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.btn-primary,
.btn-primary * {
  color: #E2EBF0 !important;
  -webkit-text-fill-color: #E2EBF0 !important;
  background: linear-gradient(135deg, var(--color-button-1) 0%, var(--color-button-2) 100%);
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-main);
  border: 1px solid rgba(226, 235, 240, 0.35);
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

/* ============================================
   Table Styles
   ============================================ */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
  background: var(--color-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

th, td {
  border: 1px solid var(--color-card-border);
  padding: 12px 16px;
  text-align: left;
}

/* Table text on light backgrounds should be dark */
table td {
  color: #1E2E45 !important;
  background: transparent;
}

table td * {
  color: #1E2E45 !important;
}

table th {
  color: var(--color-text-main) !important;
}

th {
  background: linear-gradient(135deg, var(--color-header-3), var(--color-header-5));
  color: var(--color-text-main);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:nth-child(even) {
  background-color: var(--color-card-alt);
}

tbody tr:hover {
  background-color: var(--color-bg-2);
}

/* Legacy form table support (for backward compatibility during transition) */
.formTd {
  border: 1px solid var(--color-gray-light);
  padding: 12px;
}

/* ============================================
   Card Styles
   ============================================ */
.service-card {
  background: var(--color-card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--color-card-border);
}

.service-card a,
a.service-card {
  text-decoration: none;
  display: block;
}

.service-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 18px;
}

/* Form card text on light background - gradient */
.form-card *:not(input):not(select):not(textarea):not(button) {
  background: linear-gradient(135deg, #3B7491, #3C7190, #39758F, #398595, #3B7992);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Service card text on light background - gradient */
.service-card *:not(input):not(select):not(textarea):not(button) {
  background: linear-gradient(135deg, #3B7491, #3C7190, #39758F, #398595, #3B7992);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  background: var(--color-card-alt);
}

/* Services section background */
.services-section {
  background: linear-gradient(135deg,
    var(--color-bg-1) 0%,
    var(--color-bg-2) 25%,
    var(--color-bg-3) 50%,
    var(--color-bg-4) 75%,
    var(--color-bg-5) 100%);
  padding: 64px 24px;
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Search bar section */
.search-bar-section {
  background: linear-gradient(135deg,
    var(--color-header-1),
    var(--color-header-3),
    var(--color-header-5),
    var(--color-header-7));
  padding: 32px 24px;
  margin: 0;
  display: none;
}

.search-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-bar-input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid var(--color-input-border);
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-main);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-bar-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-bar-button {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--color-button-1), var(--color-button-2));
  color: var(--color-text-main);
  border: 1px solid rgba(226, 235, 240, 0.35);
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.search-bar-button:hover {
  background: var(--color-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
  .search-bar-container {
    flex-direction: column;
  }
  
  .search-bar-input {
    width: 100%;
  }
  
  .search-bar-button {
    width: 100%;
    justify-content: center;
  }
}

.card-list {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.details {
  width: 100%;
  min-height: 200px;
  padding: 24px;
  border-radius: 12px;
  background: var(--color-card);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  text-align: left;
  margin-top: 24px;
  border: 1px solid var(--color-card-border);
}

.details *:not(input):not(select):not(textarea):not(button):not(a) {
  background: linear-gradient(135deg, #3B7491, #3C7190, #39758F, #398595, #3B7992);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.details a {
  background: linear-gradient(135deg, #3B7491, #3C7190, #39758F, #398595, #3B7992);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: underline;
}

/* ============================================
   Header Styles
   ============================================ */
.site-header {
  background: linear-gradient(90deg,
    var(--color-header-1),
    var(--color-header-2),
    var(--color-header-3),
    var(--color-header-4),
    var(--color-header-5),
    var(--color-header-6),
    var(--color-header-7));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 100;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  clear: both;
}

.header-logo {
  width: 60px;
  height: auto;
  background: transparent;
  object-fit: contain;
  display: block;
  /* Subtle shadow for visibility on dark background */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

/* ============================================
   Section Styles
   ============================================ */
.section-form {
  background: transparent;
  padding: 48px 24px;
  min-height: calc(100vh - 200px);
  overflow: hidden;
}

/* ============================================
   Sidebar Menu Styles
   ============================================ */
.sidebar-menu {
  position: relative;
  float: left;
  width: 250px;
  min-height: calc(100vh - 70px);
  background: linear-gradient(180deg,
    var(--color-header-1),
    var(--color-header-2),
    var(--color-header-3),
    var(--color-header-4),
    var(--color-header-5),
    var(--color-header-6),
    var(--color-header-7));
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.25);
  z-index: 50;
  overflow-y: auto;
}

.sidebar-content {
  padding: 24px 0;
}

.sidebar-title {
  font-size: 20px;
  font-weight: 700;
  padding: 0 24px 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(226, 235, 240, 0.2);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.sidebar-item {
  display: block;
  padding: 12px 16px;
  color: #E2EBF0;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.sidebar-item:hover {
  background: rgba(226, 235, 240, 0.1);
  color: #FFFFFF;
  transform: translateX(4px);
}

.sidebar-item:active,
.sidebar-item.active {
  background: rgba(226, 235, 240, 0.15);
  color: #FFFFFF;
  border-left: 3px solid #E2EBF0;
}

/* Adjust content when sidebar is present */
body.has-sidebar {
  padding-left: 0;
  overflow-x: hidden;
}

body.has-sidebar .section-form {
  margin-left: 250px;
  padding-left: 24px;
  padding-right: 24px;
}

/* Ensure header and footer are full width even with sidebar */
body.has-sidebar header.site-header {
  position: relative;
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  left: 0;
  right: 0;
  clear: both;
  float: none;
}

body.has-sidebar header.site-header .container {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

body.has-sidebar footer.site-footer,
body.has-sidebar footer {
  position: relative;
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  left: 0;
  right: 0;
  clear: both;
  float: none;
}

body.has-sidebar footer.site-footer .container,
body.has-sidebar footer .container {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

body.has-sidebar footer.site-footer > p,
body.has-sidebar footer > p {
  margin-left: 0;
  padding-left: 0;
}

@media (max-width: 768px) {
  .sidebar-menu {
    float: none;
    width: 100%;
  }
  
  body.has-sidebar .section-form {
    margin-left: 0;
    padding-left: 24px;
  }
}

.section-form-page {
  background: transparent !important;
}

.section-form .form-card {
  margin-top: 24px;
}

.site-footer {
  background: linear-gradient(90deg,
    var(--color-header-1),
    var(--color-header-2),
    var(--color-header-3),
    var(--color-header-4),
    var(--color-header-5),
    var(--color-header-6),
    var(--color-header-7));
  color: var(--color-text-main);
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  position: relative;
}

footer {
  background: linear-gradient(90deg,
    var(--color-header-1),
    var(--color-header-2),
    var(--color-header-3),
    var(--color-header-4),
    var(--color-header-5),
    var(--color-header-6),
    var(--color-header-7)) !important;
  color: var(--color-text-main) !important;
  width: 100% !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* ============================================
   Navigation Styles
   ============================================ */
.nav-link {
  color: var(--color-text-main);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-white);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-white);
}

.nav-link.active::after {
  width: 100%;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary {
  color: var(--color-text-main);
}

.text-orange {
  color: var(--color-text-main);
}

.gradient-text {
  background: linear-gradient(135deg,
    #3B7491,
    #3C7190,
    #39758F,
    #398595,
    #3B7992);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.bg-primary {
  background: linear-gradient(135deg, var(--color-button-1), var(--color-button-2));
}

.bg-card-blue {
  background-color: var(--color-card-blue);
}

.error-message {
  color: var(--color-red);
  background: rgba(220, 38, 38, 0.1);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  border-left: 4px solid var(--color-red);
}

.success-message {
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .form-card {
    padding: 24px 16px;
  }
  
  .hero-composite {
    background-size: cover, 100% 33.33%, 100% 33.33%, 100% 33.33%;
    background-position: center, left top, left center, left bottom;
    min-height: 300px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ============================================
   Legacy Support (for existing table forms)
   ============================================ */
.body1 {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg,
    var(--color-bg-1) 0%,
    var(--color-bg-2) 20%,
    var(--color-bg-3) 40%,
    var(--color-bg-4) 60%,
    var(--color-bg-5) 100%);
  padding: 20px;
}

.buttons {
  align-content: center;
}

.button1 {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-button-1), var(--color-button-2));
  color: var(--color-text-main);
  cursor: pointer;
  margin: 0 5px;
  transition: background 0.2s;
}

.button1:hover {
  background: var(--color-button-2);
}
