* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5fbfc;
  color: #1d2635;
}

.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #07152f;
  color: #ffffff;
  padding: 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  overflow: auto;
}

.sidebar h2 {
  margin: 0 0 6px;
}

.sidebar p {
  color: #c7dce2;
  margin: 0 0 20px;
  font-size: 13px;
}

.sidebar a {
  display: block;
  color: #d3e6eb;
  text-decoration: none;
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 6px;
  font-weight: 600;
}

.sidebar a:hover,
.sidebar a.active {
  background: #0f7f8f;
  color: #ffffff;
}

/* Main content */
.content {
  margin-left: 260px;
  width: calc(100% - 260px);
  padding: 28px;
}

.topbar {
  background: #ffffff;
  padding: 18px 22px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(7, 21, 47, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  color: #07152f;
}

/* Cards */
.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(7, 21, 47, 0.08);
  margin-bottom: 20px;
  border: 1px solid #dbe8ec;
  overflow-x: auto;
}

/* Dashboard layout */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(7, 21, 47, 0.08);
  border: 1px solid #dbe8ec;
}

.stat h3 {
  margin: 0;
  color: #0f7f8f;
  font-size: 30px;
}

.stat p {
  margin: 6px 0 0;
  color: #667085;
}

/* Forms */
label {
  font-weight: 700;
  display: block;
  margin: 13px 0 7px;
  color: #07152f;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #dbe8ec;
  border-radius: 10px;
  font: inherit;
  background: #ffffff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type="file"] {
  background: #ffffff;
}

/* Buttons */
.btn {
  display: inline-block;
  border: 0;
  background: #07152f;
  color: #ffffff;
  padding: 11px 17px;
  border-radius: 25px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  margin-top: 12px;
  line-height: 1.2;
}

.btn:hover {
  opacity: 0.92;
}

.btn.secondary {
  background: #0f7f8f;
  color: #ffffff;
}

.btn.danger {
  background: #b42318;
  color: #ffffff;
}

.btn.light {
  background: #eef8fa;
  color: #07152f;
}

.btn.send-btn {
  background: #0f7f8f;
  color: #ffffff;
  border: none;
}

/* Messages */
.message {
  background: #e8f7fa;
  border-left: 4px solid #0f7f8f;
  padding: 13px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 15px 0;
  font-weight: 600;
}

.alert.success {
  background: #e8f8ef;
  color: #146c2e;
  border: 1px solid #b7ebc7;
}

.alert.error {
  background: #fdecea;
  color: #a61916;
  border: 1px solid #f5b7b1;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #dbe8ec;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f5fbfc;
  color: #07152f;
}

.actions {
  white-space: nowrap;
}

.actions a {
  margin-right: 8px;
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #07152f, #0f7f8f);
}

.login-box {
  width: 420px;
  background: #ffffff;
  padding: 34px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
  margin-top: 0;
  color: #07152f;
}

.small {
  font-size: 13px;
  color: #667085;
  line-height: 1.5;
}

.image-note {
  font-size: 13px;
  color: #667085;
  margin-top: 8px;
}

/* Image preview */
.thumb {
  max-width: 160px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: 1px solid #dbe8ec;
  border-radius: 10px;
  padding: 6px;
  background: #ffffff;
  margin-top: 8px;
}

.card img {
  max-width: 160px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border: 1px solid #dbe8ec;
  border-radius: 10px;
  padding: 6px;
  background: #ffffff;
  margin-top: 8px;
}

/* Reply panel */
.reply-panel {
  margin-top: 10px;
  display: block;
}

.reply-panel summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}

.reply-panel summary::-webkit-details-marker {
  display: none;
}

.reply-btn {
  margin-top: 10px;
}

.reply-form {
  margin-top: 12px;
  background: #f7fbfc;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #dbe8ec;
  min-width: 340px;
  max-width: 520px;
}

.reply-form label {
  display: block;
  font-weight: 700;
  margin: 8px 0 6px;
  color: #10233f;
}

.reply-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9dce3;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}

.reply-form textarea {
  width: 100%;
  min-height: 130px;
  padding: 10px 12px;
  border: 1px solid #c9dce3;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

/* New message badge */
.msg-badge {
  background: #c9241b;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  margin-left: 8px;
  font-weight: 700;
  display: inline-block;
}

/* Mobile responsive */
@media screen and (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .admin-wrap {
    display: block;
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  .grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .two-col {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: block;
  }

  .topbar .btn {
    margin-top: 15px;
  }

  .card {
    overflow-x: auto;
  }

  table {
    min-width: 760px;
  }

  .reply-form {
    min-width: 300px;
    max-width: 100%;
  }
}