/* ===== style.css ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f4f7fc;
  color: #1a2b3c;
}

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

/* ===== SIDEBAR (широкий экран) ===== */
.sidebar {
  width: 260px;
  background: #0b1a2b;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #1e3347;
  transition: transform 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  padding-left: 0.5rem;
  color: #fff;
}
.logo i {
  color: #d4a373;
}

.nav-menu {
  list-style: none;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 6px;
  font-weight: 500;
  color: #a0b8cc;
  cursor: pointer;
  transition: 0.2s;
}
.nav-item i {
  width: 22px;
  font-size: 1.1rem;
}
.nav-item:hover {
  background: #1e3347;
  color: #fff;
}
.nav-item.active {
  background: #1e3347;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 0.5rem;
  border-top: 1px solid #1e3347;
  margin-top: 1rem;
}
.user-profile img {
  border-radius: 50%;
}
.user-profile span {
  font-weight: 500;
}
.user-profile small {
  font-size: 0.7rem;
  color: #7a94b0;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f4f7fc;
}

.top-header {
  background: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9edf2;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-left i {
  font-size: 1.3rem;
  color: #1a2b3c;
  cursor: pointer;
}
.header-left h1 {
  font-size: 1.4rem;
  font-weight: 600;
}
.header-right {
  display: flex;
  gap: 18px;
  font-size: 1.2rem;
  color: #4a5b6e;
}

/* ===== TABS ===== */
.tab-content {
  padding: 2rem;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fade 0.2s ease;
}
.tab-pane.active {
  display: block;
}

@keyframes fade {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SETTINGS ===== */
.settings-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  max-width: 540px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.setting-item {
  margin-bottom: 2rem;
}
.setting-item label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #2c3e50;
}
.setting-item select {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid #dce1e8;
  background: #f9fbfc;
  font-size: 1rem;
}

/* ===== REQUESTS ===== */
.requests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 12px;
}

.request-form {
  background: #fff;
  border-radius: 20px;
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.request-form.hidden {
  display: none;
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  color: #2c3e50;
}
.form-group textarea,
.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid #dce1e8;
  font-size: 1rem;
  background: #f9fbfc;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 0.5rem;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.request-item {
  background: #fff;
  padding: 1.2rem 1.5rem;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  border-left: 4px solid #d4a373;
}
.request-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.request-title {
  font-weight: 600;
}
.request-jurisdiction {
  background: #edf2f9;
  padding: 0.2rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  color: #1a2b3c;
}
.request-deadline {
  color: #6a7b8e;
  font-size: 0.9rem;
}
.status {
  padding: 0.25rem 1.2rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 500;
}
.status-new {
  background: #e9f0fd;
  color: #1f4f8a;
}
.status-inprogress {
  background: #fef3e8;
  color: #b45f2b;
}
.status-done {
  background: #e2f3e4;
  color: #1d7a3e;
}

/* ===== MESSAGES ===== */
.messages-container {
  display: flex;
  gap: 2rem;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  min-height: 480px;
}
.dialogs-list {
  width: 280px;
  border-right: 1px solid #eef2f6;
  padding: 1rem 0;
  overflow-y: auto;
  flex-shrink: 0;
}
.dialog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: 0.15s;
  border-left: 3px solid transparent;
}
.dialog-item:hover {
  background: #f4f7fc;
}
.dialog-item.active {
  background: #edf2f9;
  border-left-color: #d4a373;
}
.dialog-item i {
  font-size: 0.6rem;
  margin-right: 2px;
}
.status-online { color: #2e9b5c; }
.status-offline { color: #a0b8cc; }
.dialog-info {
  flex: 1;
}
.dialog-name {
  font-weight: 600;
  display: block;
}
.dialog-last {
  font-size: 0.8rem;
  color: #6a7b8e;
}
.dialog-time {
  font-size: 0.7rem;
  color: #8a9bb0;
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fafcfe;
}
.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  background: #fff;
}
.chat-messages {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  background: #fafcfe;
}
.message {
  max-width: 70%;
  padding: 0.7rem 1.2rem;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 0.95rem;
}
.message.received {
  background: #eef2f6;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.message.sent {
  background: #d4a373;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input {
  display: flex;
  gap: 8px;
  padding: 0.8rem 1.5rem;
  background: #fff;
  border-top: 1px solid #eef2f6;
}
.chat-input input {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 40px;
  border: 1px solid #dce1e8;
  outline: none;
}
.chat-input button {
  background: #d4a373;
  color: #fff;
  border: none;
  width: 44px;
  border-radius: 40px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: 0.2s;
}
.chat-input button:hover {
  background: #b8895c;
}

/* ===== WALLET ===== */
.wallet-card {
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  max-width: 560px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.balance {
  margin-bottom: 2rem;
}
.balance span {
  color: #6a7b8e;
  font-weight: 500;
}
.balance strong {
  font-size: 2.6rem;
  display: block;
  margin-top: 4px;
  color: #0b1a2b;
}
.wallet-actions {
  margin-bottom: 2rem;
}
.transaction-list {
  border-top: 1px solid #edf2f6;
  padding-top: 1.2rem;
}
.transaction-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f4f7fc;
}
.amount.positive { color: #2e9b5c; }
.amount.negative { color: #b45f2b; }
.date { color: #8a9bb0; font-size: 0.8rem; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: #0b1a2b;
  color: #fff;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 40px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.95rem;
}
.btn-primary:hover {
  background: #1e3347;
}
.btn-secondary {
  background: #eef2f6;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 40px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.btn-secondary:hover {
  background: #dce1e8;
}

/* ===== BOTTOM NAV (мобильная) ===== */
.bottom-nav {
  display: none;
  background: #fff;
  border-top: 1px solid #e9edf2;
  padding: 0.4rem 0.5rem;
  justify-content: space-around;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}
.bottom-nav .nav-item {
  flex-direction: column;
  gap: 2px;
  font-size: 0.6rem;
  padding: 0.4rem 0.2rem;
  background: transparent;
  color: #7a94b0;
  border-radius: 12px;
  margin: 0;
  text-align: center;
}
.bottom-nav .nav-item i {
  font-size: 1.2rem;
}
.bottom-nav .nav-item.active {
  color: #0b1a2b;
  background: transparent;
}

/* ===== АДАПТИВ ===== */
@media screen and (max-width: 840px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 100;
    width: 270px;
    height: 100vh;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .bottom-nav {
    display: flex;
  }
  .top-header {
    padding: 0.8rem 1.2rem;
  }
  .tab-content {
    padding: 1.2rem;
  }
  .messages-container {
    flex-direction: column;
    min-height: 400px;
  }
  .dialogs-list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eef2f6;
    max-height: 180px;
  }
  .chat-window {
    min-height: 260px;
  }
  .request-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .requests-header {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-card {
    padding: 1.2rem;
  }
}

@media screen and (max-width: 480px) {
  .top-header h1 {
    font-size: 1.1rem;
  }
  .tab-content {
    padding: 1rem 0.8rem;
  }
  .wallet-card {
    padding: 1.2rem;
  }
  .balance strong {
    font-size: 2rem;
  }
  .dialog-item {
    padding: 0.6rem 0.8rem;
  }
}