/* ================= GENERAL LAYOUT ================= */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.vh-100 {
  height: 100vh !important;
}

.container,
.container-fluid {
  padding-top: 30px;
  padding-bottom: 30px;
}

/* ================= SIDEBAR STYLING ================= */
#sidebar .nav-link,
#mobileSidebar .nav-link {
  color: #ffffff; /* Sidebar links remain white */
}

#sidebar .nav-link.active,
#mobileSidebar .nav-link.active {
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#sidebar .nav-link:hover,
#mobileSidebar .nav-link:hover {
  color: #e2e6ea;
}

/* ================= CARD STYLING ================= */
.card {
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  background-color: #0d6efd;
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
}

/* ================= BUTTON STYLING ================= */
.btn-primary {
  background-color: #0056b3;
  border: none;
  padding: 8px 20px;
  font-weight: 500;
  border-radius: 8px;
}

.btn-primary:hover {
  background-color: #004a99;
}

.btn-sm i {
  margin-left: 4px;
}

/* ================= TABLE STYLING ================= */
.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.table thead {
  background-color: #0d6efd;
  color: white;
}

.table td,
.table th {
  padding: 0.25rem 0.4rem !important;
  font-size: 0.875rem;
  vertical-align: middle;
}

.table-responsive {
    max-height: 590px;
    overflow-y: auto;
    position: relative; /* ensures dropdowns, buttons, and modals stack correctly */
}

.table td .btn {
    z-index: 1; /* ensures action buttons are clickable above table rows */
}


th.actions-col, td.actions-col {
  width: 90px;
  text-align: center;
}

.table td input,
.table td select {
  width: 100%;
  padding: 6px;
  font-size: 0.95rem;
}

tr:hover {
  background-color: #f1f1f1;
}

/* ================= FORM STYLING ================= */
form {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#offices_form {
  position: absolute;
  padding: 12px;
}

form label {
  font-weight: 500;
}

form input,
form select,
form button {
  margin-bottom: 15px;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

a {
  text-decoration: none;
  color: #0d6efd;
}

a:hover {
  text-decoration: underline;
}

/* ================= FOOTER ================= */
.footer {
  padding: 20px 0;
  background: #0d6efd;
  color: white;
  text-align: center;
  margin-top: 60px;
}

.btn-group-sm .btn {
  padding: 2px 6px;
  font-size: 0.75rem;
  justify-content: center;
}

/* ===== Tabs Styles ===== */
#submissionTabs {
    border-bottom: 2px solid #e0e0e0;
    background-color: #fff;
}
#submissionTabs .nav-link {
    color: #495057 !important;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}
#submissionTabs .nav-link:hover {
    color: #0d6efd !important;
}
#submissionTabs .nav-link.active {
    color: #0d6efd !important;
    font-weight: 600;
}
#submissionTabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 3px;
    background-color: #0d6efd;
    border-radius: 2px 2px 0 0;
    transition: width 0.3s;
}

/* ===== File Preview Modal ===== */
#previewContent iframe {
    width: 100%;
    height: 100%; /* fill the flex-grow area */
    border: 1px solid #ccc;
    border-radius: 4px;
}
#fileButtons a {
    min-width: 150px;
    text-align: center;
    word-break: break-word;
}
#fileButtons a i {
    font-size: 1.5rem;
}
#fileButtons a small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}


/* ================= RESPONSIVE ================= */
@media screen and (max-width:500px) {
  #forms{
    width: 290px;
  }
}

@media screen and (max-width:990px) {
  #dashboard{
    margin: 5vh 0 !important;
  }
}
