/* =========================================================
   AL SEER MARINE - COMPLETE MODERN osTicket THEME
   FINAL CLEAN MERGED VERSION
   ========================================================= */

/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #dfe6ee;
  color: #1f2a44;
  line-height: 1.5;
}

/* ===== CONTAINER ===== */
#container {
  width: 100%;
 /* max-width: 1600px;*/
 /* margin: 16px auto; */
}

/* ===== HEADER ===== */
#headerWrap {
 /* border-radius: 20px 20px 0 0;*/
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#header {
  background: #002254 !important;
  border-bottom: 1px solid #e6edf6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 35px;
  min-height: 110px;
}

#logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

#logo img {
  max-height: 66px !important;
  max-width: 300px !important;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.user-links {
  color: #FFF !important;
  font-weight: 600;
  font-size: 15px;
}

.user-links a {
  color: #FFF !important;
  text-decoration: none;
}

.user-links a:hover {
  text-decoration: underline;
}

/* ===== NAV ===== */
#topNav {
  padding: 15px 30px;
  background: #ffffff;
  border-bottom: 1px solid #e6edf6;
}

#topNav #nav {
  display: flex !important;
  gap: 15px;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-wrap: wrap;
}

#topNav #nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#topNav #nav li a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: 12px;
  background: #f4f7fb;
  border: 1px solid #dbe4f2;
  font-weight: 600;
  text-decoration: none;
  color: #1b4ea3;
  transition: all 0.2s ease;
}

#topNav #nav li a.active,
#topNav #nav li a:hover {
 /* background: linear-gradient(135deg, #2c64e5, #3b82f6);*/
 background: #002254;
  color: #ffffff;
  border-color: #2c64e5;
}

/* ===== CONTENT ===== */
#content {
  background: #eef3f8;
  padding: 25px;
}

/* ===== ALERTS ===== */
.error_bar,
.warning_bar,
.notice_bar,
#msg_error,
#msg_notice,
#msg_warning {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.error_bar,
#msg_error,
.error {
  background: #fee2e2;
  color: #991b1b;
}

.warning_bar,
#msg_warning {
  background: #fef3c7;
  color: #92400e;
}

.notice_bar,
#msg_notice {
  background: #dbeafe;
  color: #1e40af;
}

/* ===== GENERIC CARDS ===== */
.main-content,
.thread-body,
.ticket-view,
.form-view {
  background: #ffffff;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

/* ===== HEADINGS ===== */
h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 20px;
  color: #132b5c;
  font-weight: 800;
}

h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 15px;
  color: #16376f;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 12px;
  color: #16376f;
}

p {
  margin: 0 0 16px;
  color: #425575;
}

/* ===== LANDING ===== */
#landing_page {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.main-copy {
  flex: 1;
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.main-copy p {
  font-size: 18px;
  color: #4a5b77;
}

.sidebar-actions {
  width: 350px;
  min-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 16px;
  border-radius: 12px;
  color: #ffffff !important;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
/*  background: linear-gradient(135deg, #2c64e5, #3b82f6);*/
  
  background:#002254 !important;
}

.btn-success {
  background: linear-gradient(135deg, #6dbb00, #84cc16);
}

/* ===== FORMS ===== */
label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1f2a44;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 95%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dbe4f2;
  background: #ffffff;
  color: #1f2a44;
  font-size: 15px;
  transition: all 0.2s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2c64e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 100, 229, 0.12);
}

/* ===== BUTTONS ===== */
input[type="submit"],
button:not(.secondary),
.button:not(.secondary) {
  background: linear-gradient(135deg, #2c64e5, #3b82f6);
  color: #ffffff !important;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="submit"]:hover,
button:not(.secondary):hover,
.button:not(.secondary):hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

input[type="reset"],
input[type="button"],
.secondary,
button.secondary {
  background: #f1f5fb;
  border: 1px solid #cfd8e6;
  color: #2b3a55 !important;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

input[type="reset"]:hover,
input[type="button"]:hover,
.secondary:hover,
button.secondary:hover {
  background: #e9eff7;
}

/* Prevent buttons from stretching full width */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Button spacing */
form input[type="submit"],
form input[type="reset"],
form input[type="button"],
form button {
  margin-top: 10px;
  margin-right: 10px;
}

.form-actions,
.buttons,
#ticketForm .buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== SEARCH ===== */
.search-form {
  margin-bottom: 20px;
}

.search-form form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-form input.search,
input.search {
  flex: 1;
  min-height: 46px;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th {
  background: #f1f5fb;
  padding: 12px;
  text-align: left;
  color: #22385d;
  font-weight: 700;
  border-bottom: 1px solid #dde7f3;
}

td {
  padding: 12px;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
  color: #304564;
}

tr:hover td {
  background: #f9fbff;
}

/* ===== TICKET VIEW ===== */
.thread-entry {
  border-bottom: 1px solid #eef2f7;
  padding: 15px;
}

.thread-entry:last-child {
  border-bottom: none;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  max-width: 1200px;
}

.login-intro {
  color: #3f5377;
  font-size: 16px;
  margin-bottom: 26px;
}

#clientLogin.login-wrapper {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: nowrap;
}

.login-box {
  width: 420px;
  max-width: 420px;
  flex: 0 0 420px;
  background: #ffffff;
  border: 1px solid #e1e9f3;
  border-radius: 24px;
  padding: 44px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.login-error {
  display: block;
  color: #b91c1c;
  margin-bottom: 14px;
  font-weight: 700;
}

.form-row + .form-row {
  margin-top: 18px;
}

.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"] {
  width: 100%;
  min-height: 58px;
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 16px;
  background: #ffffff;
  box-shadow: none;
}

.login-box input[type="submit"] {
  width: auto !important;
  min-width: 140px;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  background: linear-gradient(135deg, #2c64e5, #3b82f6);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(44, 100, 229, 0.18);
}

.login-help {
  flex: 1 1 auto;
  min-width: 320px;
  max-width: 520px;
  padding-top: 0;
}

.external-auth {
  margin-bottom: 16px;
  font-size: 16px;
}

.external-auth a,
.login-help a,
a[href*="azure"],
a[href*="microsoftonline"] {
  color: #245ad6;
  text-decoration: none;
}

.external-auth a:hover,
.login-help a:hover,
a[href*="azure"]:hover,
a[href*="microsoftonline"]:hover {
  text-decoration: underline;
}

.login-separator {
  border: 0;
  border-top: 1px solid #e3eaf3;
  margin: 16px 0 18px;
}

.register-block,
.agent-block {
  color: #425575;
  font-size: 16px;
  margin-bottom: 14px;
}

.login-note {
  margin-top: 28px;
  color: #425575;
  font-size: 15px;
}

/* ===== KB / FEATURED ===== */
.kb-featured-wrap {
  padding-top: 10px;
}

.featured-category.front-page {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.category-name {
  font-weight: 700;
  color: #16376f;
  margin: 10px 0 16px;
}

.article-title a {
  color: #184a97;
  text-decoration: none;
  font-weight: 600;
}

.article-title a:hover {
  text-decoration: underline;
}

.article-teaser {
  color: #5d6f8d;
  font-size: 14px;
}

/* ===== LINKS ===== */
a {
  color: #245ad6;
}

a:hover {
  color: #1848b8;
}

/* ===== FOOTER ===== */
#footer {
  text-align: center;
  padding: 20px;
  background: #eef3f8;
  color: #607089;
  border-radius: 0 0 20px 20px;
}

/* ===== UTILITY ===== */
.clear {
  clear: both;
}

hr {
  border: 0;
  border-top: 1px solid #e3eaf3;
}

/* ===== TICKETS PAGE ===== */
#content form[action*="tickets.php"] {
  display: grid;
 /* grid-template-columns: minmax(0, 1fr) 150px;*/
  gap: 14px 18px;
  align-items: end;
  margin-bottom: 26px;
}

#content form[action*="tickets.php"] br {
  display: none;
}

#content form[action*="tickets.php"] label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #334767;
}

#content form[action*="tickets.php"] input[type="text"],
#content form[action*="tickets.php"] input.search,
#content input[name="query"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cfdced;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 16px;
  font-size: 15px;
  color: #1f2a44;
}

#content form[action*="tickets.php"] input[type="submit"],
#content form[action*="tickets.php"] button,
#content form[action*="tickets.php"] .button {
  width: 100% !important;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #2c64e5, #3b82f6);
  color: #ffffff !important;
  font-weight: 700;
}

#content form[action*="tickets.php"] select {
  width: 100%;
  max-width: 400px;
  min-height: 52px;
  border: 1px solid #cfdced;
  border-radius: 14px;
  background: #ffffff;
  padding: 0 14px;
  font-size: 15px;
  color: #1f2a44;
}

#content h1 a,
#content h2 a {
  text-decoration: none;
}

#content > h1,
#content > h2 {
  margin-top: 8px;
  margin-bottom: 10px;
}

#content .status-tabs,
#content .ticket-tabs,
#content .ticket-status-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

#content .results-count,
#content .tickets-count,
#content .count,
#content .pager,
#content .pagination,
#content center {
  color: #425575;
  font-size: 15px;
}

table.ticket-filter,
table.list,
table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  margin-top: 14px;
}

table.ticket-filter th,
table.list th,
table.data th {
  background: #f4f7fb;
  color: #29405f;
  font-size: 14px;
  font-weight: 700;
  padding: 18px 16px;
  border-bottom: 1px solid #e3ebf5;
  white-space: nowrap;
  text-align: left;
}

table.ticket-filter td,
table.list td,
table.data td {
  background: #ffffff;
  color: #304564;
  font-size: 15px;
  padding: 18px 16px;
  border-bottom: 1px solid #edf2f8;
  vertical-align: middle;
}

table.ticket-filter tr:last-child td,
table.list tr:last-child td,
table.data tr:last-child td {
  border-bottom: none;
}

table.ticket-filter tr:hover td,
table.list tr:hover td,
table.data tr:hover td {
  background: #f9fbff;
}

table a {
  color: #245ad6;
  text-decoration: none;
  font-weight: 600;
}

table a:hover {
  text-decoration: underline;
}

a[href*="status=open"],
a[href*="tickets.php?status="] {
  font-weight: 700;
  text-decoration: none;
}

#content .page-numbers,
#content .pagination,
#content .pager {
  margin-top: 14px;
  color: #425575;
  font-size: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  #landing_page {
    flex-direction: column;
  }

  .sidebar-actions {
    width: 100%;
    min-width: 0;
  }

  #clientLogin.login-wrapper {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .login-box {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .login-help {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #content form[action*="tickets.php"] {
    grid-template-columns: 1fr;
  }

  #content form[action*="tickets.php"] select {
    max-width: 100%;
  }

  table.ticket-filter,
  table.list,
  table.data {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  #container {
    width: 100%;
    margin: 0;
  }

  #headerWrap,
  #footer {
    border-radius: 0;
  }

  #header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
  }

  .header-right {
    align-items: flex-start;
  }

  #topNav {
    padding: 14px 20px;
  }

  #topNav #nav {
    flex-direction: column;
  }

  #topNav #nav li a {
    width: 100%;
    justify-content: flex-start;
  }

  #content {
    padding: 20px;
  }

  .login-box {
    padding: 28px;
  }

  h1 {
    font-size: 30px;
  }
}