:root {
  --app-bg: #f6f8fc;
  --surface: #ffffff;
  --surface-muted: #f1f4fb;
  --text-main: #162032;
  --text-muted: #5f6b7a;
  --border-soft: #e0e6f2;
  --accent: #d84c3d;
  --accent-strong: #c13a2c;
  --success: #1f9d55;
  --warning: #d69708;
  --danger: #ce3a3a;
  --info: #0d96bf;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 12px 35px rgba(19, 35, 62, 0.08);
  --shadow-hover: 0 20px 40px rgba(19, 35, 62, 0.12);
  --focus-ring: 0 0 0 0.2rem rgba(216, 76, 61, 0.2);
}

html,
body {
  min-height: 100vh;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 76, 61, 0.11), transparent 38%),
    radial-gradient(circle at 90% 100%, rgba(31, 157, 85, 0.11), transparent 35%),
    var(--app-bg);
  color: var(--text-main);
  font-size: 16px;
}

a {
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
.breadcrumbs a:hover {
  text-decoration: none;
}

.app-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(17, 30, 50, 0.06);
}

.app-navbar .navbar-toggler {
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.5rem;
}

.app-navbar .brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
}

.app-navbar .nav-center {
  gap: 0.35rem;
}

.app-navbar .nav-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.5rem 0.9rem !important;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: var(--text-main);
  background: var(--surface-muted);
}

.app-navbar .user-chip {
  background: var(--surface-muted);
  color: var(--text-main);
}

.app-navbar .dropdown-menu {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  margin-top: 0.6rem;
}

.app-header {
  min-height: 76px;
  margin: 1.1rem 1.1rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  animation: slide-in 0.35s ease;
}

.container1 {
  margin: 1.1rem;
}

.app-content,
.content2 {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.content1 {
  padding: 1.25rem;
  animation: rise-in 0.35s ease;
}

.breadcrumbs {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
  font-weight: 600;
}

.breadcrumbs a:not(:last-child)::after {
  content: "/";
  margin: 0 0.55rem;
  opacity: 0.5;
}

.breadcrumbs a:last-child {
  color: var(--text-main);
  cursor: default;
}

.menu {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
}

.menu a,
.menu .dropdown1 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
}

.menu a:hover,
.menu .dropdown1:hover {
  border-color: rgba(216, 76, 61, 0.32);
  box-shadow: 0 8px 22px rgba(216, 76, 61, 0.14);
}

.menu a.btn-danger-action {
  background-color: #dc3545 !important;
  background: #dc3545 !important;
  border: 1px solid #dc3545 !important;
  color: #fff !important;
}

.menu a.btn-danger-action:hover {
  background-color: #c82333 !important;
  background: #c82333 !important;
  border: 1px solid #bd2130 !important;
  color: #fff !important;
}

.form-control,
.custom-select,
textarea,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"] {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  min-height: 42px;
  color: var(--text-main);
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.form-control,
textarea {
  min-height: 92px;
}

.form-control:focus,
.custom-select:focus,
textarea:focus,
select:focus,
input:focus {
  border-color: rgba(216, 76, 61, 0.45);
  box-shadow: var(--focus-ring);
}

label,
.label,
th {
  font-weight: 700;
  color: #2a3650;
}

fieldset {
  border: 1px solid var(--border-soft);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.1rem;
}

legend {
  font-size: 1rem;
  width: auto;
  margin-bottom: 0;
  padding: 0 0.4rem;
}

.btn {
  border-radius: 999px;
  padding: 0.52rem 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-width: 1px;
  box-shadow: 0 10px 20px rgba(216, 76, 61, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 26px rgba(216, 76, 61, 0.24);
}

.btn-small,
.btn-sm {
  padding: 0.25rem 0.62rem !important;
}

.badge {
  border-radius: 999px;
  padding: 0.36rem 0.55rem;
  font-size: 0.72rem;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0 !important;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table thead th {
  background: #f4f7fc;
  color: #2a3650;
  border-bottom: 1px solid var(--border-soft);
  border-top: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table th,
.table td {
  vertical-align: middle !important;
  border-color: #edf1f7;
}

.table-hover tbody tr:hover {
  background-color: #fafcff;
}

.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.card .card-header {
  border-bottom: 1px solid var(--border-soft);
}

.alert {
  border: 1px solid transparent;
  border-radius: 12px;
}

.alert-success {
  border-color: rgba(31, 157, 85, 0.25);
  background: rgba(31, 157, 85, 0.1);
}

.alert-danger {
  border-color: rgba(206, 58, 58, 0.23);
  background: rgba(206, 58, 58, 0.1);
}

.alert-warning {
  border-color: rgba(214, 151, 8, 0.25);
  background: rgba(214, 151, 8, 0.1);
}

.alert-info {
  border-color: rgba(13, 150, 191, 0.26);
  background: rgba(13, 150, 191, 0.1);
}

ul.form-view,
ul.form-list {
  list-style: none;
  margin-bottom: 0;
  padding: 0;
}

ul.form-view li {
  padding-bottom: 10px;
  clear: both;
}

ul.form-view li .label,
ul.form-view li .value {
  display: block;
  overflow: hidden;
  vertical-align: top;
}

ul.form-view li .label {
  width: 33%;
  float: left;
}

ul.form-view li .value,
.gray {
  color: var(--text-muted);
}

ul.form-list li:not(:last-child) {
  padding-bottom: 14px;
}

.mrow {
  display: flex;
  flex-wrap: wrap;
}

.mcol {
  flex: 0 50%;
  padding: 0.5rem 0;
}

.mcol:nth-child(odd) {
  padding-right: 0.85rem;
}

.mcol:nth-child(even) {
  padding-left: 0.85rem;
}

.action-wrapper {
  position: relative;
}

.action-wrapper .action {
  position: absolute;
  right: 8px;
  top: 18%;
  display: none;
}

.action-wrapper .action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.action-wrapper .action a:not(:first-child) {
  margin-left: 10px;
}

.action-wrapper:hover .action {
  display: block;
}

.title {
  font-size: 1.4rem;
  font-weight: 700;
}

.suggestion {
  color: var(--text-muted);
  padding-top: 3px;
  font-size: 0.88em;
}

.error {
  color: var(--danger);
}

.border2 .mcol:first-child {
  display: flex;
  border-right: 1px solid var(--border-soft);
}

.border2 .mcol:nth-child(2) {
  padding-left: 2.5em;
}

.public {
  align-items: center;
}

.public .container1 {
  width: min(100%, 460px);
}

.public .content1 {
  padding: 1.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 25px 45px rgba(17, 30, 50, 0.16);
}

.public input {
  border-radius: 12px;
  padding: 0.72rem 0.85rem;
}

.public .btn {
  padding: 0.62rem;
}

.public .suggestion,
.public .error {
  margin-left: 0.4rem;
}

.dashboard {
  display: flex;
  gap: 0.9rem;
}

.dashboard a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: right;
  margin: 0;
  height: 110px;
  color: #fff;
  font-size: 1.1em;
  letter-spacing: 0.015em;
  border-radius: var(--radius-md);
  padding: 1em;
}

.dashboard a i {
  font-size: 2.1em;
  padding-right: 0.2em;
}

.dashboard a > div {
  flex: 1;
  text-align: right;
  width: 100%;
}

.dashboard a:nth-child(1) {
  background: linear-gradient(115deg, #f8961e, #ef5d17);
}

.dashboard a:nth-child(2) {
  background: linear-gradient(115deg, #41b983, #1f9d55);
}

.dashboard a:nth-child(3) {
  background: linear-gradient(115deg, #ee6352, #cb3f32);
}

.dashboard a:nth-child(4) {
  background: linear-gradient(115deg, #379ec8, #217fb0);
}

.hide {
  display: none;
}

.vcenter {
  display: flex;
}

@media print {
  body * {
    visibility: hidden;
  }

  #printableArea * {
    visibility: visible;
  }

  #printableArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

@media only screen and (max-width: 992px) {
  .app-navbar .nav-center {
    margin-top: 0.75rem;
  }

  .app-navbar .navbar-nav {
    gap: 0.45rem;
  }
}

@media only screen and (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .app-header {
    margin: 0.8rem 0.8rem 0;
    display: block;
    min-height: auto;
  }

  .container1 {
    margin: 0.8rem;
  }

  .menu {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 0.8rem;
  }

  .public .content1 {
    padding: 1.15rem;
    margin: 0.8rem;
  }

  .mcol {
    flex: 0 100%;
    padding: 0.7rem 0;
  }

  .mcol:nth-child(odd),
  .mcol:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
  }

  .border2 .mcol:first-child {
    display: block;
    border-right: none;
    text-align: center;
    border-bottom: 1px dashed var(--border-soft);
    padding-bottom: 1rem;
  }

  .border2 .mcol:nth-child(2) {
    padding-left: 0;
  }

  .table td,
  .table th {
    padding: 0.55rem;
  }

  .dashboard {
    display: block;
  }

  .dashboard a {
    margin: 0 auto 0.9rem;
    max-width: 320px;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
