* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

:root {
  --blue: #16169b;
  --blue-dark: #0e0e6e;
  --green: #7fc41e;
  --green-dark: #5fa314;
  --white: #ffffff;
}

body {
  background: #1a1a1a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ---------- Phone frame wrapper ---------- */
.phone {
  width: 100%;
  max-width: 400px;
  min-height: 720px;
  background: var(--green);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- Top blue bar ---------- */
.topbar {
  background: var(--blue);
  color: var(--white);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
}

/* ---------- LOGIN PAGE ---------- */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  gap: 18px;
}

.login-logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue);
  background: var(--white);
  padding: 14px 28px;
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.login-card {
  width: 100%;
  background: var(--blue);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.login-card h2 {
  color: var(--white);
  text-align: center;
  font-size: 19px;
  margin-bottom: 20px;
  font-weight: 600;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  color: #d7ffb0;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 15px;
  background: var(--white);
  color: #222;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 13px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
}

.btn-green {
  background: var(--green);
  margin-top: 6px;
}
.btn-green:hover { background: var(--green-dark); }

.error-msg {
  background: #ffe1e1;
  color: #a30000;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
}

.hint {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

/* ---------- DASHBOARD ---------- */
.dashboard-body {
  flex: 1;
  background: var(--green);
  padding: 22px 18px 18px;
  position: relative;
}

.flag {
  width: 40px;
  height: 26px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: absolute;
  left: 18px;
  top: 22px;
}
.flag span { flex: 1; }
.flag .r { background: #d90012; }
.flag .b { background: #0033a0; }
.flag .o { background: #f2a800; }

.menu-icon {
  position: absolute;
  right: 18px;
  top: 22px;
  color: var(--white);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  z-index: 20;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.menu-icon:hover,
.menu-icon:active {
  background: rgba(255,255,255,0.15);
}

.action-btn {
  display: block;
  width: 100%;
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 18px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  margin-top: 60px;
  border: none;
  text-decoration: none;
  cursor: pointer;
}
.action-btn.second { margin-top: 14px; }

.arrow-bg {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}
.arrow-bg svg { opacity: 0.9; }

/* ---------- Info Card (popup) ---------- */
.info-overlay {
  position: absolute;
  top: 130px;
  left: 12px;
  right: 12px;
  background: var(--blue);
  border: 2px solid #9fe04a;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  z-index: 10;
}

.info-overlay.hidden {
  display: none;
}

.info-overlay h3 {
  color: var(--white);
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  padding: 6px 0;
}

.info-row .val {
  font-weight: 700;
}

.amount-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.unit-box {
  border: 2px solid #cfd6ff;
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  min-width: 70px;
  text-align: center;
}

.save-btn {
  flex: 1;
  background: #d9d9d9;
  color: #8a8a8a;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: not-allowed;
}

.overlay-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-actions .btn-green {
  margin-top: 0;
  font-size: 17px;
  padding: 14px;
}

.version-tag {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  margin-top: 16px;
}

.logout-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.back-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

/* ---------- Նոր գործարք (New Order) page ---------- */
.order-body {
  flex: 1;
  background: #f4f6f5;
  padding: 20px 18px 90px;
  overflow-y: auto;
}

.order-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.order-title-row h1 {
  font-size: 24px;
  color: #1a1a2e;
  font-weight: 700;
}

.order-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-flag {
  width: 34px;
  height: 24px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.mini-flag span { flex: 1; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.icon-btn-green { background: #2fae8c; }
.icon-btn-teal  { background: #3aa0a0; font-size: 20px; font-weight: 700; }

.driver-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a1a2e;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
}

.driver-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e4ecff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%23666' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>") no-repeat right 14px center;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select:disabled {
  background-color: #f4f6f5;
  color: #999;
}

.form-group select.no-chevron {
  background-image: none;
}

.totals-box {
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  padding: 16px 14px;
  margin: 20px 0;
}

.totals-box h2 {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: #333;
}

.totals-val {
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
}

.totals-row-input input {
  border: none;
  border-bottom: 1px solid #d8dde3;
  padding: 4px 2px;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  outline: none;
}

.btn-danger {
  display: block;
  width: 100%;
  background: #c0392b;
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger:hover { background: #a4291d; }

.fab-scroll-top {
  position: fixed;
  right: calc(50% - 190px);
  bottom: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 30;
}
