/* ==================================================
   شركة الأمواج الذهبية للصيانة والخدمات العامة
   التصميم العام للتطبيق
   ================================================== */

:root {
  --primary: #0b5ed7;
  --primary-dark: #073b8e;
  --primary-light: #eaf3ff;

  --secondary: #d4a514;
  --secondary-light: #fff7d6;

  --success: #188038;
  --success-light: #e7f6ec;

  --warning: #d97706;
  --warning-light: #fff4df;

  --danger: #d93025;
  --danger-dark: #a51d16;
  --danger-light: #fff0ef;

  --purple: #6f42c1;
  --purple-light: #f2ebff;

  --text: #172033;
  --muted: #64748b;

  --background: #edf4fc;
  --surface: #ffffff;

  --border: #d8e3f0;
  --border-dark: #bccde0;

  --shadow-small: 0 4px 14px rgba(20, 55, 95, 0.08);
  --shadow-medium: 0 12px 32px rgba(20, 55, 95, 0.12);
  --shadow-large: 0 22px 55px rgba(20, 55, 95, 0.16);

  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-large: 24px;
}

/* ===========================
   الإعدادات العامة
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  background:
    linear-gradient(
      180deg,
      #f7fbff 0%,
      var(--background) 100%
    );
  color: var(--text);
  line-height: 1.7;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* ===========================
   صفحة تسجيل الدخول
   =========================== */

.app {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 14px;
}

.login-card {
  width: min(450px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow-large);
}

.logo-box {
  width: 150px;
  height: 150px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border: 4px solid var(--secondary);
  box-shadow: 0 8px 25px rgba(212, 165, 20, 0.22);
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-card h1 {
  margin-bottom: 10px;
  text-align: center;
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.4;
}

.company-subtitle {
  margin: 4px 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.company-slogan {
  margin: 8px 0 25px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.9;
}

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

label {
  display: block;
  margin-bottom: 7px;
  color: #243652;
  font-size: 16px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: 13px;
  padding: 13px 14px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.12);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.login-button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 9px 20px rgba(11, 94, 215, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(11, 94, 215, 0.3);
}

.login-message {
  min-height: 25px;
  margin-top: 16px;
  text-align: center;
  color: var(--danger);
  font-weight: 700;
}

/* ===========================
   رأس صفحة العميل
   =========================== */

.customer-header {
  position: relative;
  z-index: 10;
  padding: 15px max(18px, calc((100% - 1180px) / 2));
  background:
    linear-gradient(
      120deg,
      #072f70,
      #0b5ed7 58%,
      #438de8
    );
  color: #ffffff;
  box-shadow: 0 5px 22px rgba(7, 47, 112, 0.18);
}

.customer-header > div,
.customer-header {
  align-items: center;
}

.customer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 5px;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.customer-brand h1 {
  margin: 0;
  color: #ffd761;
  font-size: clamp(20px, 3vw, 31px);
  text-align: right;
}

.customer-brand p {
  margin-top: 4px;
  color: #eaf3ff;
  font-size: 16px;
}

.brand-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      #f6c842,
      #d49c05
    );
  color: #101624;
  font-size: 30px;
  font-weight: 900;
}

.emergency-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 9px 15px;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      #e33b31,
      #a91f18
    );
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(169, 31, 24, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.emergency-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 25px rgba(169, 31, 24, 0.35);
}

.emergency-button span {
  font-size: 24px;
}

.emergency-button div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.emergency-button small {
  font-size: 12px;
  opacity: 0.9;
}

.emergency-button strong {
  font-size: 16px;
}

/* ===========================
   الصفحة الرئيسية للعميل
   =========================== */

.customer-page {
  width: min(1180px, calc(100% - 28px));
  margin: 26px auto 55px;
  padding-bottom: 100px;
}

.welcome-section {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-large);
  padding: 30px;
  background:
    linear-gradient(
      135deg,
      #073b8e,
      #0b5ed7 60%,
      #55a3f5
    );
  color: #ffffff;
  box-shadow: var(--shadow-medium);
}

.welcome-section::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -70px;
  bottom: -130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.welcome-section p {
  position: relative;
  z-index: 1;
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 700;
  color: #d9ebff;
}

.welcome-section h2 {
  position: relative;
  z-index: 1;
  margin: 8px 0;
  color: #ffd665;
  font-size: clamp(27px, 5vw, 39px);
}

.welcome-section span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.9;
}

.services-section,
.orders-section,
.account-section {
  margin-top: 32px;
}

.section-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 28px;
}

.section-heading p,
.services-section .section-heading p,
.orders-section .section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.services-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
}

.service-card {
  min-height: 155px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow-small);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #edf6ff
    );
  color: var(--primary-dark);
  box-shadow: var(--shadow-medium);
}

.service-icon {
  font-size: 44px;
  line-height: 1;
}

.orders-list,
.account-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  padding: 10px 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.empty-orders {
  padding: 32px 18px;
  border: 1px dashed var(--border-dark);
  border-radius: 16px;
  background: #f8fbff;
  color: var(--muted);
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.account-card p {
  margin: 10px 0;
  color: #40516a;
  font-size: 16px;
}

.account-card strong {
  color: var(--primary-dark);
}

.logout-button {
  margin-top: 17px;
  border: none;
  border-radius: 13px;
  padding: 12px 19px;
  background: var(--danger-light);
  color: var(--danger);
  font-size: 15px;
  font-weight: 800;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.logout-button:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ===========================
   الطلبات المصغرة في الرئيسية
   =========================== */

.home-order-card {
  border: 1px solid var(--border);
  border-right: 5px solid var(--primary);
  border-radius: 17px;
  padding: 17px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(20, 55, 95, 0.07);
}

.home-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.home-order-service {
  color: var(--primary-dark);
  font-size: 18px;
}

.request-type-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 68px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}

.request-normal {
  background: var(--primary-light);
  color: var(--primary);
}

.request-emergency {
  background: var(--danger-light);
  color: var(--danger);
}

.home-order-details p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  color: var(--muted);
}

.home-order-details strong {
  color: var(--text);
}

.view-all-orders {
  display: block;
  border-radius: 13px;
  padding: 12px;
  background: var(--primary-light);
  color: var(--primary);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.view-all-orders:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ===========================
   شريط التنقل السفلي
   =========================== */

.bottom-nav {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  gap: clamp(30px, 12vw, 100px);
  border-top: 1px solid rgba(11, 94, 215, 0.15);
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -6px 24px rgba(20, 55, 95, 0.1);
  backdrop-filter: blur(10px);
}

.bottom-nav a {
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 25px;
}

.bottom-nav span {
  font-size: 12px;
  font-weight: 700;
}

/* ===========================
   الأزرار والحالات المشتركة
   =========================== */

.order-status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-review {
  background: var(--warning-light);
  color: var(--warning);
}

.status-accepted {
  background: var(--primary-light);
  color: var(--primary);
}

.status-technician {
  background: var(--purple-light);
  color: var(--purple);
}

.status-onway {
  background: #e3f4ff;
  color: #0873b9;
}

.status-working {
  background: #fff7d8;
  color: #9b6a00;
}

.status-completed {
  background: var(--success-light);
  color: var(--success);
}

.status-cancelled {
  background: var(--danger-light);
  color: var(--danger);
}

/* ===========================
   صفحة إنشاء الطلب
   =========================== */

.request-page {
  min-height: 100vh;
  padding: 28px 14px;
}

.request-card {
  width: min(760px, 100%);
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 25px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.request-header,
.orders-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.request-header > div,
.orders-header > div {
  flex: 1;
}

.request-header h1,
.orders-header h1 {
  margin: 0 0 4px;
  color: var(--primary-dark);
  font-size: 27px;
  text-align: right;
}

.request-header p,
.orders-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #ccdef4;
  border-radius: 12px;
  padding: 8px 14px;
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.back-button:hover {
  background: var(--primary);
  color: #ffffff;
}

.customer-info-box,
.selected-service-box {
  border: 1px solid #d6e6fa;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 18px;
  background: #f2f7ff;
}

.customer-info-box h2 {
  margin: 0 0 11px;
  color: var(--primary-dark);
  font-size: 20px;
}

.customer-info-box p {
  margin: 7px 0;
  color: #40516a;
  font-size: 16px;
}

.selected-service-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 5px solid var(--primary);
}

.selected-service-box span {
  color: var(--muted);
  font-size: 12px;
}

.selected-service-box strong {
  color: var(--primary-dark);
  font-size: 21px;
}

.request-type-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.request-type-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 2px solid var(--border);
  border-radius: 17px;
  padding: 14px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.request-type-card:hover {
  transform: translateY(-2px);
}

.request-type-card input {
  width: auto;
  margin-top: 6px;
}

.request-type-card span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.request-type-card strong {
  color: var(--text);
  font-size: 17px;
}

.request-type-card small {
  color: var(--muted);
  line-height: 1.6;
}

.normal-request:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.emergency-request:has(input:checked) {
  border-color: var(--danger);
  background: var(--danger-light);
}

.emergency-notice {
  display: none;
  margin: 12px 0 0;
  border-radius: 13px;
  padding: 12px;
  background: var(--danger-light);
  color: var(--danger-dark);
  font-weight: 800;
  line-height: 1.7;
}

.emergency-notice.show {
  display: block;
}

.request-card .form-group {
  margin-bottom: 18px;
}

.request-card label {
  font-size: 16px;
}

.location-button,
.submit-request-button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 17px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.location-button {
  margin-bottom: 10px;
  background: var(--primary-light);
  color: var(--primary);
}

.submit-request-button {
  margin-top: 10px;
  background:
    linear-gradient(
      135deg,
      var(--primary),
      var(--primary-dark)
    );
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(11, 94, 215, 0.2);
}

.location-button:hover,
.submit-request-button:hover {
  transform: translateY(-2px);
}

.location-message,
.request-message {
  min-height: 25px;
  margin-top: 8px;
  text-align: center;
  font-weight: 800;
}

.location-message {
  color: var(--primary);
}

.request-message {
  color: var(--success);
}

/* ===========================
   صفحة طلباتي
   =========================== */

.orders-page {
  min-height: 100vh;
  padding: 28px 14px;
}

.orders-card {
  width: min(850px, 100%);
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 25px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.orders-message {
  min-height: 25px;
  margin-bottom: 10px;
  color: var(--success);
  text-align: center;
  font-weight: 800;
}

.order-card {
  margin: 0;
  border: 1px solid var(--border);
  border-right: 5px solid var(--primary);
  border-radius: 18px;
  padding: 19px;
  background: #ffffff;
  box-shadow: var(--shadow-small);
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e9eff6;
}

.order-top h3 {
  color: var(--primary-dark);
  font-size: 20px;
}

.order-card p {
  margin: 9px 0;
  color: #4a5c74;
}

.order-card p strong {
  color: #243652;
}

.cancel-order-button,
.delete-order-button {
  width: 100%;
  margin-top: 15px;
  border: none;
  border-radius: 13px;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
}

.cancel-order-button {
  background: var(--danger);
  color: #ffffff;
}

.cancel-order-button:hover {
  background: var(--danger-dark);
}

.delete-order-button {
  border: 1px solid #f1b8b4;
  background: var(--danger-light);
  color: var(--danger);
}

.delete-order-button:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ==================================================
   صفحة العمليات - شرائط الطلبات ونافذة التفاصيل
   ================================================== */

body.modal-open {
  overflow: hidden;
}

/* قائمة الطلبات */

.operations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.operation-order-strip {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.4fr)
    minmax(130px, 1fr)
    minmax(100px, 0.8fr)
    minmax(140px, 1fr)
    minmax(130px, 1fr)
    minmax(110px, auto);
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid #dbe3ec;
  border-right: 5px solid #c9a33b;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.operation-order-strip:hover {
  transform: translateY(-2px);
  border-color: #c9a33b;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.11);
}

.operation-order-strip.emergency-order-strip {
  border-right-color: #dc2626;
  background:
    linear-gradient(
      90deg,
      rgba(254, 242, 242, 0.65),
      #ffffff 35%
    );
}

.order-strip-service,
.order-strip-phone,
.order-strip-type,
.order-strip-status,
.order-strip-amount,
.order-strip-action {
  min-width: 0;
}

.order-strip-service,
.order-strip-phone,
.order-strip-type,
.order-strip-status,
.order-strip-amount {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strip-label {
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.order-strip-service strong,
.order-strip-phone strong,
.order-strip-amount strong {
  color: #172033;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.order-strip-amount strong {
  color: #8b6817;
}

.order-strip-action {
  display: flex;
  justify-content: flex-end;
}

.show-details-button {
  width: 100%;
  min-height: 43px;
  padding: 9px 16px;
  border: none;
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      #172033,
      #28344c
    );
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.show-details-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.24);
}

/* نوع الطلب */

.request-type-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.request-normal {
  background: #eef4ff;
  color: #2556a8;
}

.request-emergency {
  background: #fee2e2;
  color: #b91c1c;
}

/* حالة الطلب */

.order-status {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-review {
  background: #fff7d6;
  color: #8a6500;
}

.status-accepted {
  background: #e0ecff;
  color: #1d4f9c;
}

.status-technician {
  background: #ede9fe;
  color: #6d28d9;
}

.status-onway {
  background: #cffafe;
  color: #0e7490;
}

.status-working {
  background: #ffedd5;
  color: #c2410c;
}

.status-completed {
  background: #dcfce7;
  color: #15803d;
}

.status-cancelled {
  background: #f1f5f9;
  color: #64748b;
}

/* نافذة التفاصيل */

.order-details-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
}

.order-details-modal.show {
  display: flex;
}

.order-details-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 30, 0.72);
  backdrop-filter: blur(4px);
}

.order-details-box {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid rgba(201, 163, 59, 0.55);
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.order-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background:
    linear-gradient(
      135deg,
      #172033,
      #2b3853
    );
  color: #ffffff;
}

.order-details-header h2 {
  margin: 0 0 5px;
  font-size: 25px;
}

.order-details-header p {
  margin: 0;
  color: #d7ddea;
  font-size: 13px;
}

.close-details-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.close-details-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.order-details-content {
  max-height: calc(100vh - 145px);
  overflow-y: auto;
  padding: 10px 8px;
}

.full-order-card {
  overflow: hidden;
  border: 1px solid #dde4ed;
  border-radius: 20px;
  background: #ffffff;
}

.full-order-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 8px;
  border-bottom: 1px solid #e4e9f0;
}

.full-order-label {
  display: block;
  margin-bottom: 5px;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.full-order-title h3 {
  margin: 0;
  color: #172033;
  font-size: 24px;
}

.full-order-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.full-order-number {
  padding: 13px 20px;
  background: #f7f3e8;
  color: #6e5517;
  font-size: 14px;
}

.full-order-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 8px;
}

.order-detail-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  background: #f8fafc;
}

.order-detail-item.full-width {
  grid-column: 1 / -1;
}

.order-detail-item span {
  display: block;
  margin-bottom: 6px;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.order-detail-item strong {
  display: block;
  color: #172033;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* تغيير حالة الطلب */

.details-status-section {
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid #e4d39f;
  border-radius: 16px;
  background: #fffaf0;
}

.details-status-section label {
  display: block;
  margin-bottom: 9px;
  color: #614b15;
  font-size: 14px;
  font-weight: 800;
}

.details-status-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.details-status-select {
  width: 100%;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid #d7c078;
  border-radius: 11px;
  background: #ffffff;
  color: #172033;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.details-status-select:focus {
  border-color: #a8801f;
  box-shadow: 0 0 0 3px rgba(201, 163, 59, 0.18);
}

.details-save-status-button {
  min-height: 45px;
  padding: 9px 20px;
  border: none;
  border-radius: 11px;
  background: #b38b27;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* أزرار التفاصيل */

.full-order-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
.full-order-actions a,
.full-order-actions button {
  width: auto;
  min-width: max-content;
  white-space: nowrap;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.print-order-button,
.details-call-button,
.details-location-button,
.details-close-bottom-button,
.details-action-unavailable {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.print-order-button {
  border: none;
  background: #172033;
  color: #ffffff;
  cursor: pointer;
}

.details-call-button {
  background: #dcfce7;
  color: #166534;
}

.details-location-button {
  background: #e0ecff;
  color: #1d4f9c;
}

.details-close-bottom-button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
}

.details-action-unavailable {
  background: #f1f5f9;
  color: #94a3b8;
}

/* الحالة الفارغة */

.empty-orders {
  padding: 35px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 17px;
  background: #ffffff;
  color: #718096;
  text-align: center;
  font-weight: 700;
}

/* الأجهزة المتوسطة */

@media (max-width: 1050px) {
  .operation-order-strip {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .order-strip-action {
    justify-content: stretch;
  }
}

/* الهواتف */

@media (max-width: 700px) {
  .operation-order-strip {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .order-strip-action {
    grid-column: 1 / -1;
  }

  .full-order-title {
    flex-direction: column;
  }

  .full-order-badges {
    justify-content: flex-start;
  }

  .full-order-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .order-detail-item.full-width {
    grid-column: auto;
  }

  .details-status-section {
    margin: 0 14px 14px;
  }

  .details-status-controls {
    grid-template-columns: 1fr;
  }

  .full-order-actions {
    grid-template-columns: 1fr 1fr;
    padding: 0 14px 14px;
  }

  .order-details-modal {
    padding: 10px;
  }

  .order-details-box {
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .order-details-content {
    max-height: calc(100vh - 120px);
    padding: 12px;
  }
}

/* الهواتف الصغيرة جدًا */

@media (max-width: 430px) {
  .operation-order-strip {
    grid-template-columns: 1fr;
  }

  .order-strip-action {
    grid-column: auto;
  }

  .full-order-actions {
    grid-template-columns: 1fr;
  }

  .order-details-header {
    padding: 17px;
  }

  .order-details-header h2 {
    font-size: 21px;
  }
}/* ==================================================
   إصلاح نهائي لتخطيط صفحة العمليات
   ================================================== */

.operations-page {
  width: 100%;
  min-height: 100vh;
  padding: 30px 20px 60px;
  background: #f4f7fb;
}

.operations-card {
  width: min(1250px, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.operations-header {
  width: 100%;
  margin-bottom: 20px;
  padding: 24px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, #172033, #2c3954);
  color: #ffffff;
  text-align: right;
}

.operations-header h1 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 30px;
}

.operations-header p {
  margin: 0;
  color: #d8dfeb;
  font-size: 15px;
}

.operations-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 18px;
}

.stat-box {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid #e1e7ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  text-align: center;
}

.stat-box h2 {
  margin: 0 0 7px;
  color: #172033;
  font-size: 24px;
}

.stat-box span {
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

.operations-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  width: 100%;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid #e1e7ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.operations-filters input,
.operations-filters select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #cfd8e3;
  border-radius: 12px;
  background: #ffffff;
  color: #172033;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.operations-filters input:focus,
.operations-filters select:focus {
  border-color: #b9912e;
  box-shadow: 0 0 0 3px rgba(185, 145, 46, 0.15);
}

.operations-list {
  width: 100%;
}

.operation-order-strip {
  width: 100%;
}

@media (max-width: 800px) {
  .operations-page {
    padding: 16px 10px 40px;
  }

  .operations-header {
    padding: 20px 18px;
  }

  .operations-stats {
    grid-template-columns: 1fr;
  }

  .operations-filters {
    grid-template-columns: 1fr;
  }
}/* ===========================
   جدول العمليات - النظام القديم
=========================== */

.operations-table-wrapper{
    width:100%;
    overflow-x:auto;
    margin-top:20px;
}

.operations-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    min-width:1200px;
}

.operations-table thead{
    background:#17324d;
    color:#fff;
}

.operations-table th{
    padding:16px;
    text-align:center;
    font-size:15px;
    font-weight:700;
    white-space:nowrap;
}

.operations-table td{
    padding:14px 10px;
    text-align:center;
    border-bottom:1px solid #ececec;
    font-size:14px;
    vertical-align:middle;
}

.operations-table tbody tr:hover{
    background:#f7f9fc;
}

.order-number{
    color:#c49519;
    font-weight:bold;
    font-size:15px;
}

.order-phone-link{
    color:#17324d;
    text-decoration:none;
    font-weight:bold;
}

.maintenance-amount{
    color:#11823b;
    font-weight:bold;
}

.show-details-button{
    background:#17324d;
    color:white;
    border:none;
    padding:9px 18px;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
}

.show-details-button:hover{
    background:#21496f;
}

.order-command-button{
    background:#c49519;
    color:#fff;
    border:none;
    padding:9px 18px;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
}

.order-command-button:hover{
    background:#aa7f11;
}

.order-command-button:disabled{
    background:#bdbdbd;
    cursor:not-allowed;
}

.emergency-order-row{
    background:#fff4f4;
}

.request-emergency{
    background:#d62828;
    color:#fff;
}

.request-normal{
    background:#0b8d4c;
    color:#fff;
}

.request-type-badge{
    padding:5px 10px;
    border-radius:20px;
    font-size:13px;
    font-weight:bold;
}

.status-review{
    color:#555;
}

.status-accepted{
    color:#1565c0;
}

.status-assigned{
    color:#7b1fa2;
}

.status-onway{
    color:#ef6c00;
}

.status-arrived{
    color:#00897b;
}

.status-inspected{
    color:#5d4037;
}

.status-working{
    color:#2e7d32;
}

.status-finished{
    color:#00838f;
}

.status-completed{
    color:#1b5e20;
    font-weight:bold;
}

.status-cancelled{
    color:#d32f2f;
    font-weight:bold;
}/* ===========================
   تبويبات العمليات
=========================== */

.orders-tabs{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.orders-tab-button{
    flex:1;
    min-width:170px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 18px;
    border:1px solid #d8e0ea;
    border-radius:14px;
    background:#ffffff;
    color:#17324d;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:.25s;
}

.orders-tab-button:hover{
    border-color:#c49519;
    transform:translateY(-2px);
}

.orders-tab-button.active{
    background:#17324d;
    color:#ffffff;
    border-color:#17324d;
}

.orders-tab-button span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:34px;
    height:34px;
    border-radius:50%;
    background:#c49519;
    color:#fff;
    font-size:13px;
    font-weight:bold;
}

.orders-tab-button.active span{
    background:#ffffff;
    color:#17324d;
}

@media(max-width:768px){

    .orders-tabs{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .orders-tab-button{
        min-width:auto;
    }

}

@media(max-width:500px){

    .orders-tabs{
        grid-template-columns:1fr;
    }

}/* ===========================
   قسم حالات الموظفين
=========================== */

.employees-section {
  margin-top: 45px;
  padding-top: 28px;
  border-top: 3px solid #b9912e;
}

.employees-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px 22px;
  background: #172033;
  border-radius: 12px;
}

.employees-section-header h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 24px;
}

.employees-section-header p {
  margin: 0;
  color: #d9dee7;
  font-size: 14px;
}

.add-employee-button {
  border: none;
  border-radius: 9px;
  padding: 11px 20px;
  background: #b9912e;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.add-employee-button:hover {
  background: #a37d20;
}

.employees-table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(23, 32, 51, 0.08);
}

.employees-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  text-align: center;
}

.employees-table thead {
  background: #f3f5f8;
}

.employees-table th {
  padding: 16px 12px;
  color: #172033;
  font-size: 15px;
  font-weight: bold;
  border-bottom: 2px solid #b9912e;
}

.employees-table td {
  padding: 16px 12px;
  color: #394150;
  font-size: 15px;
  border-bottom: 1px solid #e5e9ef;
}

.employees-table tbody tr:last-child td {
  border-bottom: none;
}

.employees-table tbody tr:hover {
  background: #faf8f1;
}

.empty-employees {
  padding: 30px !important;
  color: #7b8494 !important;
  text-align: center;
}

.delete-employee-button {
  border: none;
  border-radius: 7px;
  padding: 8px 15px;
  background: #b42318;
  color: #ffffff;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}

.delete-employee-button:hover {
  background: #8f1c14;
}

/* حالة الموظف */

.employee-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.employee-status-available {
  background: #dcfce7;
  color: #15803d;
}

.employee-status-busy {
  background: #fee2e2;
  color: #b42318;
}

@media (max-width: 700px) {
  .employees-section-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .add-employee-button {
    width: 100%;
  }
}/*==========================
  زر تصدير Excel
==========================*/

.export-excel-bar {
    display: flex;
    justify-content: flex-end;
    margin: 18px 0;
}

/*==========================
   شريط أدوات العمليات
==========================*/

.operations-toolbar{
    display:flex;
    justify-content:flex-start;
    gap:12px;
    margin:20px 0;
}

.toolbar-button{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 18px;
    border:none;
    border-radius:10px;
    font-family:inherit;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
}

.toolbar-button:hover{
    transform:translateY(-2px);
}

.excel-button{
    background:#107C41;
    color:#fff;
}

.pdf-button{
    background:#D32F2F;
    color:#fff;
}

.print-button{
    background:#172033;
    color:#fff;
}/* =========================
   تسجيل دخول الموظفين
========================= */

.employee-login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    background:
        linear-gradient(
            135deg,
            rgba(13, 27, 42, 0.96),
            rgba(27, 67, 88, 0.92)
        );
}

.employee-login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.employee-login-card h1 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 28px;
}

.employee-login-card > p {
    margin: 0 0 30px;
    color: #667085;
    font-size: 17px;
}

#employeeLoginForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#employeeLoginForm input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: 0.2s;
}

#employeeLoginForm input:focus {
    border-color: #c89b3c;
    box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.15);
}

#employeeLoginForm button {
    border: none;
    padding: 14px;
    border-radius: 10px;
    background: #c89b3c;
    color: #ffffff;
    font-size: 17px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

#employeeLoginForm button:hover {
    background: #ad812b;
    transform: translateY(-1px);
}

#employeeLoginMessage {
    min-height: 24px;
    margin-top: 18px;
    font-weight: bold;
}

.employee-login-error {
    color: #c62828;
}

.employee-login-success {
    color: #17803d;
}

@media (max-width: 500px) {
    .employee-login-card {
        padding: 30px 20px;
    }

    .employee-login-card h1 {
        font-size: 23px;
    }
}.hidden{
    display:none;
}

.employee-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:9999;
}

.employee-modal-content{

    width:420px;
    max-width:95%;

    background:#fff;

    border-radius:15px;

    padding:25px;

    box-shadow:0 20px 40px rgba(0,0,0,.2);

}

.employee-modal-content h2{

    margin-bottom:20px;

}

.employee-modal-content input{

    width:100%;

    margin-bottom:15px;

    padding:12px;

    border:1px solid #ccc;

    border-radius:8px;

    box-sizing:border-box;

}

.employee-modal-actions{

    display:flex;

    gap:10px;

}

.employee-modal-actions button{

    flex:1;

    padding:12px;

    border:none;

    border-radius:8px;

    cursor:pointer;

}

.save-employee-button{

    background:#0b8f43;

    color:white;

}

.cancel-employee-button{

    background:#d32f2f;

    color:white;

}.employee-modal.hidden {
    display: none;
}

/* زر إدارة حسابات الموظفين في شريط العمليات */
.employees-management-button {
    background: #c89b3c;
    color: #ffffff;
    text-decoration: none;
}

.employees-management-button:hover {
    background: #ad812b;
}

/* =========================
   صفحة إدارة الموظفين - النسخة المرتبة
========================= */
.employees-body {
    margin: 0;
    min-height: 100vh;
    background: #f3f5f8;
    color: #172033;
}

.employees-page {
    width: min(1500px, calc(100% - 32px));
    margin: 32px auto;
}

.employees-card {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 16px 45px rgba(23, 32, 51, 0.08);
}

.employees-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid #edf0f4;
}

.employees-page-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(24px, 3vw, 34px);
}

.employees-page-header p {
    margin: 0;
    color: #667085;
}

.employees-kicker {
    color: #ad812b;
    font-weight: 800;
    font-size: 14px;
}

.back-to-operations,
.add-employee-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.back-to-operations {
    background: #172033;
    color: #ffffff;
}

.add-employee-button {
    background: #c89b3c;
    color: #ffffff;
}

.employees-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.employee-stat-box {
    border: 1px solid #e7eaf0;
    border-radius: 15px;
    padding: 18px;
    background: #fafbfc;
}

.employee-stat-box span {
    color: #667085;
    font-weight: 700;
}

.employee-stat-box h2 {
    margin: 8px 0 0;
    font-size: 30px;
}

.active-stat h2 { color: #138a4b; }
.stopped-stat h2 { color: #c62828; }

.employees-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.employee-search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    border: 1px solid #d9dee7;
    border-radius: 11px;
    padding: 0 14px;
    background: #ffffff;
}

.employee-search-box input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    font: inherit;
    background: transparent;
}

.employees-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e8ee;
    border-radius: 14px;
}

.employees-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.employees-table th,
.employees-table td {
    padding: 15px 13px;
    text-align: right;
    vertical-align: middle;
    border-bottom: 1px solid #edf0f4;
}

.employees-table th {
    background: #172033;
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
}

.employees-table tbody tr:hover {
    background: #faf8f2;
}

.employees-table tbody tr:last-child td {
    border-bottom: 0;
}

.employee-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.employee-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f2e5c9;
    color: #8c651d;
    font-weight: 900;
}

.username-code {
    background: #eef1f5;
    color: #172033;
    padding: 5px 8px;
    border-radius: 7px;
    font-family: inherit;
    font-weight: 800;
}

.table-password-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.password-value {
    min-width: 72px;
    font-weight: 800;
    letter-spacing: 1px;
}

.employee-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.status-active {
    background: #e8f7ee;
    color: #137840;
}

.status-stopped {
    background: #fdecec;
    color: #b42318;
}

.employee-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.small-action-button {
    border: 0;
    border-radius: 8px;
    padding: 7px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.view-password-button,
.edit-employee-button {
    background: #e9eef6;
    color: #24324d;
}

.stop-employee-button {
    background: #fff0d9;
    color: #9a5d00;
}

.activate-employee-button {
    background: #e4f6eb;
    color: #137840;
}

.delete-employee-button {
    background: #d32f2f;
    color: #ffffff;
}

.empty-employees {
    padding: 36px !important;
    text-align: center !important;
    color: #7a8494;
    font-weight: 700;
}

.employee-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    z-index: 9999;
}

.employee-modal.hidden {
    display: none;
}

.employee-modal-content {
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.employee-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.employee-modal-header h2 {
    margin: 0 0 6px;
}

.employee-modal-header p {
    margin: 0;
    color: #667085;
}

.modal-close-icon {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: #f0f2f5;
    color: #172033;
    font-size: 25px;
    cursor: pointer;
}

#employeeForm label {
    display: block;
    margin: 0 0 7px;
    font-weight: 800;
}

#employeeForm > input,
.password-field-wrap input {
    width: 100%;
    min-height: 44px;
    margin-bottom: 14px;
    padding: 0 13px;
    border: 1px solid #d5dae3;
    border-radius: 10px;
    box-sizing: border-box;
    font: inherit;
    outline: 0;
}

#employeeForm input:focus {
    border-color: #c89b3c;
    box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.14);
}

.password-field-wrap {
    position: relative;
}

.password-field-wrap input {
    padding-left: 75px;
}

.toggle-password-button {
    position: absolute;
    left: 6px;
    top: 6px;
    min-height: 32px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    background: #e9eef6;
    color: #24324d;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.employee-form-message {
    min-height: 22px;
    color: #c62828;
    font-weight: 800;
}

.employee-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.employee-modal-actions button {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.save-employee-button {
    background: #138a4b;
    color: #ffffff;
}

.cancel-employee-button {
    background: #e9edf2;
    color: #172033;
}

@media (max-width: 760px) {
    .employees-page {
        width: min(100% - 18px, 1500px);
        margin: 12px auto;
    }

    .employees-card {
        padding: 16px;
    }

    .employees-page-header,
    .employees-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .employees-stats {
        grid-template-columns: 1fr;
    }
}


/* =========================
   لوحة حالة الفنيين في العمليات
========================= */

.technicians-status-panel {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.technicians-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.technicians-status-header h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 22px;
}

.technicians-status-header p {
    margin: 0;
    color: #667085;
}

.technicians-status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.technician-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.available-chip {
    background: #e7f8ef;
    color: #147a45;
}

.busy-chip {
    background: #fff0e5;
    color: #b65309;
}

.stopped-chip {
    background: #f1f3f6;
    color: #586174;
}

.technicians-status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.technician-status-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 17px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #ffffff;
}

.technician-status-card::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    content: "";
}

.technician-available::before {
    background: #1a9b58;
}

.technician-busy::before {
    background: #e57925;
}

.technician-stopped::before {
    background: #8992a3;
}

.technician-card-top,
.technician-identity {
    display: flex;
    align-items: center;
}

.technician-card-top {
    justify-content: space-between;
    gap: 12px;
}

.technician-identity {
    min-width: 0;
    gap: 11px;
}

.technician-avatar {
    display: grid;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 50%;
    background: #172033;
    color: #ffffff;
    font-size: 19px;
    font-weight: 900;
}

.technician-identity h3 {
    overflow: hidden;
    margin: 0 0 3px;
    color: #172033;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.technician-identity p {
    overflow: hidden;
    margin: 0;
    color: #667085;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.technician-state-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.technician-available .technician-state-badge {
    background: #e7f8ef;
    color: #147a45;
}

.technician-busy .technician-state-badge {
    background: #fff0e5;
    color: #b65309;
}

.technician-stopped .technician-state-badge {
    background: #f1f3f6;
    color: #586174;
}

.technician-card-details {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid #edf0f4;
}

.technician-card-details div {
    min-width: 0;
}

.technician-card-details span,
.technician-card-details strong,
.technician-card-details small {
    display: block;
}

.technician-card-details span {
    margin-bottom: 4px;
    color: #7a8495;
    font-size: 12px;
}

.technician-card-details strong {
    overflow-wrap: anywhere;
    color: #253148;
    font-size: 14px;
}

.technician-card-details small {
    margin-top: 4px;
    color: #b65309;
    font-weight: 800;
}

.technicians-empty-state {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px dashed #ccd4df;
    border-radius: 12px;
    background: #ffffff;
    color: #667085;
    text-align: center;
}

.technicians-empty-state a {
    color: #9a711c;
    font-weight: 900;
}

@media (max-width: 760px) {
    .technicians-status-panel {
        padding: 16px;
    }

    .technicians-status-header {
        align-items: stretch;
        flex-direction: column;
    }

    .technicians-status-summary {
        width: 100%;
    }

    .technician-summary-chip {
        flex: 1;
        justify-content: center;
    }

    .technicians-status-list {
        grid-template-columns: 1fr;
    }
}

/* المرحلة الرابعة: ملخص الفنيين داخل العمليات */
.operations-technicians-summary {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    background: #f8fafc;
}
.operations-technicians-summary-title,
.technicians-monitor-header,
.technicians-page-actions,
.operations-technicians-counts,
.technicians-monitor-filters {
    display: flex;
    align-items: center;
}
.operations-technicians-summary-title,
.technicians-monitor-header {
    justify-content: space-between;
    gap: 16px;
}
.operations-technicians-summary h2 { margin: 0 0 5px; color: #172033; }
.operations-technicians-summary p { margin: 0; color: #667085; }
.operations-technicians-counts { gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.view-technicians-button,
.primary-page-button,
.secondary-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 900;
}
.view-technicians-button,
.primary-page-button { background: #172033; color: #fff; }
.secondary-page-button { border: 1px solid #d5dce6; background: #fff; color: #253148; }
.technicians-monitor-button { background: #172033; color: #fff; }

/* صفحة متابعة الفنيين */
.technicians-page { min-height: 100vh; padding: 28px; background: #eef2f7; }
.technicians-monitor-card { max-width: 1500px; margin: auto; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 14px 40px rgba(23,32,51,.08); }
.technicians-monitor-header { margin-bottom: 20px; }
.technicians-monitor-header h1 { margin: 0 0 6px; color: #172033; }
.technicians-monitor-header p { margin: 0; color: #667085; }
.technicians-page-actions { gap: 10px; flex-wrap: wrap; }
.technicians-monitor-stats { display: grid; grid-template-columns: repeat(4, minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.monitor-stat { padding: 16px; border: 1px solid #e3e8ef; border-radius: 14px; background: #f8fafc; }
.monitor-stat strong, .monitor-stat span { display: block; }
.monitor-stat strong { margin-bottom: 5px; color: #172033; font-size: 26px; }
.monitor-stat span { color: #667085; font-weight: 800; }
.available-stat { background: #edf9f2; }
.busy-stat { background: #fff5eb; }
.stopped-stat { background: #f2f4f7; }
.technicians-monitor-filters { gap: 12px; margin-bottom: 16px; }
.technicians-monitor-filters input,
.technicians-monitor-filters select { min-height: 45px; border: 1px solid #d5dce6; border-radius: 10px; background: #fff; padding: 10px 13px; font: inherit; }
.technicians-monitor-filters input { flex: 1; }
.technicians-monitor-filters select { min-width: 180px; }
.technicians-table-wrapper { overflow-x: auto; border: 1px solid #e1e7ef; border-radius: 14px; }
.technicians-monitor-table { width: 100%; min-width: 1350px; border-collapse: collapse; }
.technicians-monitor-table th,
.technicians-monitor-table td { padding: 13px 12px; border-bottom: 1px solid #edf0f4; text-align: right; white-space: nowrap; }
.technicians-monitor-table th { position: sticky; top: 0; background: #172033; color: #fff; font-size: 13px; }
.technicians-monitor-table tbody tr:hover { background: #f8fafc; }
.monitor-status-badge { display: inline-flex; min-width: 72px; justify-content: center; padding: 6px 10px; border-radius: 999px; font-weight: 900; }
.monitor-available { background: #e7f8ef; color: #147a45; }
.monitor-busy { background: #fff0e5; color: #b65309; }
.monitor-stopped { background: #f1f3f6; color: #586174; }
.work-stage-cell { font-weight: 900; color: #253148; }
.technicians-table-empty { padding: 34px !important; color: #667085; text-align: center !important; }
@media (max-width: 800px) {
    .technicians-page { padding: 12px; }
    .technicians-monitor-card { padding: 15px; }
    .technicians-monitor-header,
    .operations-technicians-summary-title,
    .technicians-monitor-filters { align-items: stretch; flex-direction: column; }
    .technicians-monitor-stats { grid-template-columns: repeat(2, 1fr); }
    .technicians-monitor-filters select { width: 100%; }
}

/* المرحلة الخامسة: تعيين الفني داخل تفاصيل الطلب */
.technician-assignment-panel {
  grid-column: 1 / -1;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8dee9;
  border-radius: 14px;
  background: #f8fafc;
}

.technician-assignment-panel > label,
.technician-assignment-panel > strong,
.technician-assignment-panel span {
  display: block;
  margin-bottom: 8px;
}

.technician-assignment-panel.assigned {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-color: #b8d8c4;
  background: #f1fbf5;
}

.technician-assignment-panel.waiting {
  border-color: #ead6a3;
  background: #fffaf0;
}

.technician-assignment-panel.waiting p {
  margin: 6px 0 0;
  color: #6b7280;
}

.technician-assignment-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.technician-assignment-controls select {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.confirm-technician-assignment-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #172033;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.confirm-technician-assignment-button:hover {
  opacity: .92;
}

@media (max-width: 700px) {
  .technician-assignment-panel.assigned {
    grid-template-columns: 1fr;
  }

  .technician-assignment-controls,
  .confirm-technician-assignment-button {
    width: 100%;
  }
}

/* ===== المرحلة 6.1: لوحة الفني ===== */
.employee-login-message { margin-top: 14px; min-height: 24px; text-align: center; font-weight: 700; }
.employee-login-message.error { color: #b42318; }
.employee-login-message.success { color: #067647; }
.employee-dashboard-body { min-height: 100vh; background: #f3f6f8; color: #17212b; }
.employee-dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(18px,4vw,55px); background: #102b3f; color: #fff; box-shadow: 0 5px 18px rgba(16,43,63,.18); }
.employee-dashboard-brand { display: flex; align-items: center; gap: 14px; }
.employee-dashboard-brand img { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 14px; padding: 5px; }
.employee-dashboard-brand h1 { margin: 0 0 5px; font-size: 1.35rem; }
.employee-dashboard-brand p { margin: 0; opacity: .78; font-size: .9rem; }
.employee-logout-button { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; border-radius: 10px; padding: 10px 17px; cursor: pointer; font-weight: 700; }
.employee-logout-button:hover { background: rgba(255,255,255,.16); }
.employee-dashboard-main { width: min(1180px, calc(100% - 30px)); margin: 28px auto 55px; }
.employee-welcome-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; background: #fff; border-radius: 18px; box-shadow: 0 8px 26px rgba(17,40,56,.08); border: 1px solid #e5ebef; }
.employee-welcome-label { color: #64748b; font-size: .9rem; }
.employee-welcome-card h2 { margin: 5px 0; font-size: 1.55rem; }
.employee-welcome-card p { margin: 0; color: #64748b; }
.employee-work-badge { min-width: 100px; text-align: center; border-radius: 999px; padding: 10px 17px; font-weight: 800; }
.employee-work-badge.available { background: #dcfae6; color: #067647; }
.employee-work-badge.busy { background: #fee4e2; color: #b42318; }
.employee-assigned-section { margin-top: 24px; }
.employee-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.employee-section-heading h2 { margin: 0 0 4px; }
.employee-section-heading p { margin: 0; color: #64748b; }
.employee-requests-count { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; background: #d9a928; color: #17212b; font-weight: 900; }
.employee-requests-list { display: grid; gap: 18px; }
.employee-request-card { background: #fff; border: 1px solid #dfe7ec; border-radius: 18px; padding: 22px; box-shadow: 0 7px 22px rgba(17,40,56,.07); }
.employee-request-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #edf1f3; }
.employee-request-number { display: inline-block; color: #8a6500; font-weight: 800; margin-bottom: 6px; }
.employee-request-card-head h3 { margin: 0; font-size: 1.25rem; }
.employee-request-status { padding: 8px 13px; border-radius: 999px; background: #eaf2f8; color: #175c82; font-weight: 800; white-space: nowrap; }
.employee-request-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.employee-request-grid > div { background: #f7f9fa; border-radius: 12px; padding: 13px; }
.employee-request-grid span, .employee-request-description span { display: block; color: #667785; font-size: .84rem; margin-bottom: 5px; }
.employee-request-grid strong { overflow-wrap: anywhere; }
.employee-request-description { margin-top: 14px; background: #fbfaf5; border: 1px solid #eee7ce; border-radius: 12px; padding: 14px; }
.employee-request-description p { margin: 0; line-height: 1.8; white-space: pre-wrap; }
.employee-next-stage-note { margin-top: 14px; color: #667785; font-size: .87rem; }
.employee-empty-state { text-align: center; background: #fff; border: 1px dashed #cbd6dd; border-radius: 18px; padding: 55px 20px; }
.employee-empty-icon { width: 58px; height: 58px; margin: auto; display: grid; place-items: center; background: #dcfae6; color: #067647; border-radius: 50%; font-size: 1.6rem; font-weight: 900; }
.employee-empty-state h3 { margin: 15px 0 7px; }
.employee-empty-state p { margin: 0; color: #667785; }
@media (max-width: 680px) {
  .employee-dashboard-header, .employee-welcome-card, .employee-section-heading, .employee-request-card-head { align-items: stretch; flex-direction: column; }
  .employee-logout-button { width: 100%; }
  .employee-request-grid { grid-template-columns: 1fr; }
  .employee-work-badge { align-self: flex-start; }
}

/* المرحلة 6.2 - مراحل عمل الفني */
.employee-progress-wrap {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .22);
}
.employee-progress-wrap h4 { margin: 0 0 14px; font-size: 15px; }
.employee-progress-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.employee-progress-step {
  min-width: 105px;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  opacity: .62;
}
.employee-progress-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, .18);
}
.employee-progress-step.done { opacity: 1; border-color: rgba(34, 197, 94, .45); }
.employee-progress-step.done .employee-progress-icon { background: rgba(34, 197, 94, .18); }
.employee-progress-step.current { opacity: 1; border-color: rgba(59, 130, 246, .65); box-shadow: 0 0 0 2px rgba(59, 130, 246, .10); }
.employee-progress-step.current .employee-progress-icon { background: rgba(59, 130, 246, .18); }
.employee-stage-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.employee-stage-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #d7a928;
  color: #17120a;
}
.employee-stage-button:hover:not(:disabled) { transform: translateY(-1px); }
.employee-stage-button:disabled { cursor: not-allowed; opacity: .58; }
.employee-stage-button.completion-pending { background: rgba(148, 163, 184, .22); color: inherit; }
.employee-stage-complete { padding: 10px 14px; border-radius: 10px; background: rgba(34, 197, 94, .14); font-weight: 800; }
@media (max-width: 700px) {
  .employee-stage-actions { justify-content: stretch; }
  .employee-stage-button { width: 100%; }
}


/* المرحلة 6.3 - إنهاء المهمة والسعر والملاحظات */
.employee-completion-form { width: 100%; margin-top: 2px; padding: 18px; border: 1px solid #e4d7a7; border-radius: 15px; background: #fffdf5; }
.employee-completion-heading h4 { margin: 0 0 5px; font-size: 1rem; }
.employee-completion-heading p { margin: 0 0 15px; color: #667785; font-size: .88rem; }
.employee-completion-grid { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(300px,1.3fr); gap: 14px; }
.employee-completion-grid label { display: flex; flex-direction: column; gap: 7px; font-weight: 800; font-size: .88rem; }
.employee-completion-grid input, .employee-completion-grid textarea { width: 100%; box-sizing: border-box; border: 1px solid #cfd9df; border-radius: 11px; padding: 11px 12px; font: inherit; background: #fff; color: inherit; }
.employee-completion-grid input:focus, .employee-completion-grid textarea:focus { outline: 2px solid rgba(215,169,40,.22); border-color: #d7a928; }
.employee-completion-grid textarea { resize: vertical; min-height: 96px; }
.employee-completion-error { min-height: 22px; margin-top: 8px; color: #b42318; font-weight: 800; font-size: .87rem; }
.employee-complete-button { margin-inline-start: auto; display: block; background: #16835f; color: #fff; }
.employee-completion-summary { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.employee-completion-summary .employee-stage-complete { grid-column: 1 / -1; }
.employee-completion-summary > div { padding: 12px; border-radius: 11px; background: #f4faf7; border: 1px solid #d9ede3; }
.employee-completion-summary > div span { display: block; color: #667785; font-size: .8rem; margin-bottom: 5px; }
.employee-completion-summary .wide { grid-column: 1 / -1; }
.employee-completion-summary .wide strong { white-space: pre-wrap; line-height: 1.7; }
@media (max-width: 700px) {
  .employee-completion-grid, .employee-completion-summary { grid-template-columns: 1fr; }
  .employee-completion-summary .wide { grid-column: auto; }
  .employee-complete-button { width: 100%; }
}

/* متابعة الفنيين - عرض مختصر */
.technicians-monitor-table td:first-child strong{display:block}.technicians-monitor-table td:first-child small{display:block;color:#718096;margin-top:4px}.monitor-pending{background:#fff3cd;color:#7a5b00}.monitor-offline{background:#edf2f7;color:#4a5568}.technician-details-button{border:0;border-radius:8px;padding:8px 14px;cursor:pointer;background:#173f5f;color:#fff;font-weight:700}.technician-details-modal{display:none;position:fixed;inset:0;z-index:1000}.technician-details-modal.show{display:block}.technician-details-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}.technician-details-dialog{position:relative;z-index:1;width:min(850px,calc(100% - 28px));max-height:88vh;overflow:auto;margin:6vh auto;background:#fff;border-radius:18px;padding:24px;box-shadow:0 24px 60px rgba(0,0,0,.25)}.technician-details-close{position:absolute;left:18px;top:14px;border:0;background:#edf2f7;width:36px;height:36px;border-radius:50%;font-size:24px;cursor:pointer}.technician-details-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-top:22px}.technician-details-grid>div{background:#f7fafc;border:1px solid #e2e8f0;border-radius:12px;padding:13px}.technician-details-grid span{display:block;color:#718096;font-size:13px;margin-bottom:6px}.technician-history-title{margin:24px 0 10px}.technician-history-list{display:grid;gap:8px}.technician-history-list>div{display:grid;grid-template-columns:120px 1fr 180px;gap:10px;align-items:center;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px}.technician-history-list small{color:#718096}@media(max-width:650px){.technician-history-list>div{grid-template-columns:1fr}.technicians-monitor-table th:nth-child(4),.technicians-monitor-table td:nth-child(4),.technicians-monitor-table th:nth-child(5),.technicians-monitor-table td:nth-child(5){display:none}}


/* إصلاح واجهة لوحة الفني: بطاقات مضغوطة */
.employee-requests-list { gap: 10px; }
.employee-request-card { padding: 12px 14px; border-radius: 13px; box-shadow: 0 3px 12px rgba(17,40,56,.06); }
.employee-request-card-head { align-items: center; padding-bottom: 9px; gap: 10px; }
.employee-request-number { margin-bottom: 2px; font-size: .82rem; }
.employee-request-card-head h3 { font-size: 1rem; }
.employee-request-status { padding: 5px 9px; font-size: .78rem; }
.employee-request-grid-compact { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 9px; }
.employee-request-grid-compact > div { padding: 8px 9px; border-radius: 9px; min-height: 52px; }
.employee-request-grid-compact span { font-size: .73rem; margin-bottom: 2px; }
.employee-request-grid-compact strong { font-size: .88rem; }
.employee-address-field { grid-column: span 2; }
.employee-location-link, .employee-location-missing { display: inline-flex; margin-top: 8px; padding: 7px 10px; border-radius: 9px; font-size: .82rem; font-weight: 800; }
.employee-location-link { background: #eef7ff; border: 1px solid #cfe5f7; color: #135f8c; text-decoration: none; }
.employee-location-missing { background: #f7f8f9; color: #788690; }
.employee-description-compact { margin-top: 8px; padding: 8px 10px; }
.employee-description-compact summary { cursor: pointer; font-weight: 800; font-size: .84rem; }
.employee-description-compact p { margin-top: 7px; font-size: .87rem; line-height: 1.55; }
.employee-progress-wrap { margin-top: 9px; padding: 10px; }
.employee-progress-wrap h4 { margin-bottom: 8px; font-size: .85rem; }
.employee-progress-track { gap: 5px; }
.employee-progress-step { min-height: 38px; padding: 6px; font-size: .72rem; }
.employee-progress-icon { width: 23px; height: 23px; font-size: .72rem; }
.employee-stage-actions { margin-top: 9px; }
.employee-completion-form { padding: 11px; }
.employee-completion-heading p { margin-bottom: 9px; }
.employee-completion-grid textarea { min-height: 68px; }
@media (max-width: 800px) {
  .employee-request-grid-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .employee-address-field { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .employee-request-card { padding: 10px; }
  .employee-request-grid-compact { grid-template-columns: 1fr; }
  .employee-address-field { grid-column: auto; }
}

/* إصلاح واجهة الفني: شريط طلب مضغوط وواضح */
.employee-requests-list {
  display: grid;
  gap: 8px;
}

.employee-request-card {
  padding: 9px 11px !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(17, 40, 56, 0.05) !important;
}

.employee-request-card-head {
  align-items: center !important;
  padding-bottom: 7px !important;
  gap: 8px !important;
}

.employee-request-card-head h3 {
  margin-top: 2px !important;
  font-size: 0.95rem !important;
}

.employee-request-number,
.employee-request-status {
  font-size: 12px !important;
}

.employee-request-grid.employee-request-grid-compact {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) !important;
  gap: 6px !important;
  margin: 7px 0 !important;
}

.employee-request-grid.employee-request-grid-compact > div {
  min-height: 0 !important;
  padding: 6px 8px !important;
  border: 1px solid #edf1f3;
  border-radius: 7px;
  background: #fafcfd;
}

.employee-request-grid.employee-request-grid-compact span {
  margin-bottom: 2px !important;
  font-size: 10px !important;
}

.employee-request-grid.employee-request-grid-compact strong {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.employee-address-field {
  grid-column: span 2 !important;
}

.employee-location-link,
.employee-location-missing {
  display: inline-flex !important;
  width: auto !important;
  margin: 2px 0 5px !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}

.employee-request-description {
  margin: 4px 0 !important;
  padding: 5px 8px !important;
}

.employee-request-description summary,
.employee-request-description p {
  font-size: 11px !important;
}

.employee-progress-wrap {
  margin-top: 5px !important;
  padding-top: 5px !important;
}

.employee-progress-wrap h4 {
  margin: 0 0 4px !important;
  font-size: 11px !important;
}

.employee-progress-track {
  gap: 4px !important;
}

.employee-progress-step {
  min-height: 32px !important;
  padding: 4px 5px !important;
  font-size: 10px !important;
}

.employee-progress-icon {
  width: 19px !important;
  height: 19px !important;
  font-size: 10px !important;
}

.employee-stage-actions {
  margin-top: 6px !important;
}

.employee-stage-button {
  min-height: 34px !important;
  padding: 6px 11px !important;
  font-size: 12px !important;
}

@media (max-width: 1100px) {
  .employee-request-grid.employee-request-grid-compact {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}

@media (max-width: 650px) {
  .employee-request-grid.employee-request-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .employee-address-field {
    grid-column: 1 / -1 !important;
  }
}


/* النسخة 12: طباعة موثوقة من الصفحة نفسها */
.request-print-area { display: none; }
@media print {
  body.printing-request > *:not(#requestPrintArea) { display: none !important; }
  body.printing-request #requestPrintArea { display: block !important; direction: rtl; color: #172033; font-family: Tahoma, Arial, sans-serif; }
  .receipt-print-card { width: 100%; border: 2px solid #b9912e; }
  .receipt-print-header { padding: 18px; background: #172033 !important; color: white !important; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt-print-header h1 { margin: 0 0 6px; }
  .receipt-print-header p { margin: 0; }
  .receipt-print-title { padding: 14px; text-align: center; border-bottom: 1px solid #d9dee7; }
  .receipt-print-title h2 { margin: 0 0 6px; }
  .receipt-print-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; padding: 15px; }
  .receipt-print-grid > div { padding: 9px 4px; border-bottom: 1px dashed #cbd5e1; break-inside: avoid; }
  .receipt-print-grid > div.full { grid-column: 1 / -1; }
  .receipt-print-grid span { display: block; color: #64748b; font-size: 11px; margin-bottom: 3px; }
  .receipt-print-grid strong { font-size: 13px; overflow-wrap: anywhere; }
  .receipt-print-footer { padding: 12px; border-top: 1px solid #d9dee7; text-align: center; }
  @page { size: A4; margin: 10mm; }
}

/* النسخة 12: طلب الفني كشريط صغير بدل البطاقة الكبيرة */
.employee-requests-list { display: grid !important; gap: 6px !important; }
.employee-request-strip { background: #fff; border: 1px solid #dfe7ec; border-radius: 9px; box-shadow: 0 2px 7px rgba(17,40,56,.04); overflow: hidden; }
.employee-request-strip.is-completed { opacity: .82; }
.employee-request-strip-main { display: grid; grid-template-columns: .8fr 1fr 1fr 1fr 2.2fr 1fr auto; align-items: stretch; }
.employee-strip-cell { min-width: 0; padding: 7px 8px; border-inline-end: 1px solid #edf1f3; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.employee-strip-cell span { color: #667785; font-size: 10px; line-height: 1.2; }
.employee-strip-cell strong { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.employee-strip-cell.address-cell strong { font-size: 11px; }
.employee-strip-cell.status-cell strong { color: #175c82; }
.employee-strip-details { display: contents; }
.employee-strip-details > summary { list-style: none; cursor: pointer; min-width: 92px; padding: 8px; display: grid; place-items: center; background: #172033; color: #fff; font-size: 11px; font-weight: 800; }
.employee-strip-details > summary::-webkit-details-marker { display: none; }
.employee-strip-details[open] > summary { background: #b9912e; color: #172033; }
.employee-strip-expanded { grid-column: 1 / -1; padding: 9px; background: #fafcfd; border-top: 1px solid #e6edf1; }
.employee-strip-times { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.employee-strip-times > div { padding: 6px 8px; border-radius: 7px; background: #fff; border: 1px solid #edf1f3; }
.employee-strip-times span, .employee-strip-description span { display: block; color: #667785; font-size: 10px; margin-bottom: 2px; }
.employee-strip-times strong { font-size: 11px; }
.employee-strip-links { margin-top: 6px; }
.employee-strip-description { margin-top: 6px; padding: 7px 8px; border-radius: 7px; background: #fff; border: 1px solid #edf1f3; }
.employee-strip-description p { margin: 0; font-size: 11px; line-height: 1.45; white-space: pre-wrap; }
.compact-progress { margin: 6px 0 0 !important; padding: 6px !important; }
.employee-request-strip .employee-progress-step { min-height: 28px !important; padding: 3px 4px !important; font-size: 9px !important; }
.employee-request-strip .employee-progress-icon { width: 17px !important; height: 17px !important; font-size: 9px !important; }
.employee-request-strip .employee-stage-actions { margin-top: 6px !important; }
.employee-request-strip .employee-completion-form { padding: 8px !important; }
@media (max-width: 1000px) {
  .employee-request-strip-main { grid-template-columns: repeat(3, 1fr); }
  .employee-strip-cell.address-cell { grid-column: span 2; }
  .employee-strip-details > summary { min-height: 48px; }
}
@media (max-width: 620px) {
  .employee-request-strip-main { grid-template-columns: repeat(2, 1fr); }
  .employee-strip-cell.address-cell { grid-column: 1 / -1; }
  .employee-strip-details > summary { grid-column: 1 / -1; min-height: 34px; }
  .employee-strip-times { grid-template-columns: 1fr; }
}


/* Security and roles */
.operations-user-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:14px;padding:10px 12px;border-radius:12px;background:#f5f7fb;font-weight:700}.secure-login-body{min-height:100vh;background:#f4f6fa}.secure-login-page{min-height:100vh;display:grid;place-items:center;padding:20px}.secure-login-card{width:min(430px,100%);background:#fff;border-radius:20px;padding:28px;box-shadow:0 15px 45px rgba(0,0,0,.1)}.secure-login-card h1{margin:8px 0}.secure-login-card form{display:grid;gap:10px;margin-top:22px}.secure-login-card input,.secure-login-card select{width:100%;padding:12px;border:1px solid #ccd3df;border-radius:10px}.secure-login-icon{font-size:42px}.first-login-note{margin-top:18px;padding:12px;border-radius:10px;background:#fff8df;line-height:1.8;font-size:14px}.first-login-note code{direction:ltr;display:inline-block}.admin-only[hidden]{display:none!important}

/* Operations layout v1.5 */
.requests-table-wrap{margin-top:18px;overflow-x:auto;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.requests-table{width:100%;border-collapse:collapse;min-width:1180px}.requests-table th,.requests-table td{padding:13px 10px;text-align:center;border-bottom:1px solid #edf0f3;vertical-align:middle}.requests-table th{background:#f7f9fb;font-size:14px;white-space:nowrap}.requests-table td{font-size:14px}.add-request-main-button{background:#0b6b3a!important;color:#fff!important;border-color:#0b6b3a!important;font-weight:700}.request-form-modal{max-width:780px}.request-entry-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:20px}.request-entry-form label{display:flex;flex-direction:column;gap:7px;font-weight:700}.request-entry-form input,.request-entry-form select,.request-entry-form textarea{width:100%;padding:11px 12px;border:1px solid #d7dce2;border-radius:10px;font:inherit;background:#fff}.request-entry-form input[readonly]{background:#f4f6f8}.form-wide{grid-column:1/-1}.request-form-actions{display:flex;justify-content:flex-end;gap:10px}.inline-tech-assign{display:flex;gap:6px;align-items:center;justify-content:center}.inline-tech-assign select{max-width:125px;padding:7px;border:1px solid #d6dbe1;border-radius:8px}.mini-action-button{border:0;border-radius:8px;padding:7px 10px;cursor:pointer;background:#135f91;color:white;font-family:inherit;white-space:nowrap}.details-button{background:#525a65}.assigned-tech-name{font-weight:700;color:#176b3a}.request-type-chip{display:inline-block;padding:5px 9px;border-radius:999px;background:#eef2f6}.order-details-modal[hidden]{display:none!important}.modal-open{overflow:hidden}.order-detail-item.full-width{grid-column:1/-1}.operations-user-bar{gap:8px;flex-wrap:wrap}
@media(max-width:700px){.request-entry-form{grid-template-columns:1fr}.form-wide{grid-column:auto}.operations-filters{display:grid!important;grid-template-columns:1fr}.operations-filters>*{width:100%!important}.request-form-actions{flex-direction:column-reverse}}

/* إصلاحات واجهة العمليات v1.6 */
.home-return-button{background:#17324d;color:#fff;text-decoration:none}.home-return-button:hover{color:#fff}.order-details-modal.show{display:flex!important}.order-details-modal[hidden]{display:none!important}


/* v1.7 - نافذة إضافة الطلب المصححة */
.order-details-modal {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.order-details-modal.show {
  display: flex !important;
}
.order-details-box.request-form-modal {
  width: min(850px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}
.request-form-modal .order-details-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.request-entry-form {
  align-items: start;
  padding-bottom: 26px;
}
.request-entry-form textarea {
  resize: vertical;
  min-height: 72px;
}
.request-form-actions {
  position: sticky;
  bottom: -1px;
  z-index: 4;
  margin: 4px -20px -26px;
  padding: 14px 20px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
@media (max-width: 700px) {
  .order-details-modal { padding: 0; align-items: stretch; }
  .order-details-box.request-form-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }
  .request-entry-form { padding: 14px; }
  .request-form-actions { margin: 4px -14px -14px; padding: 12px 14px; }
}

/* v1.8 - operations verification workflow */
.details-section-title{grid-column:1/-1;font-size:17px;font-weight:800;color:#17324d;border-bottom:2px solid #e7edf2;padding:12px 0 7px;margin-top:6px}
.operations-verification-form{grid-column:1/-1;background:#f6faf7;border:1px solid #cfe5d6;border-radius:14px;padding:16px;display:grid;grid-template-columns:2fr 1fr;gap:14px}
.operations-verification-form label{display:flex;flex-direction:column;gap:7px;font-weight:700}
.operations-verification-form textarea,.operations-verification-form select{width:100%;padding:11px 12px;border:1px solid #cbd5dc;border-radius:10px;font:inherit;background:#fff}
.complete-operation-button{grid-column:1/-1;justify-self:end;background:#0b6b3a!important;color:#fff!important;border-color:#0b6b3a!important;font-weight:800;padding:11px 22px}
@media(max-width:700px){.operations-verification-form{grid-template-columns:1fr}.complete-operation-button{width:100%;justify-self:stretch}}
#technicianFields:not(.hidden){display:grid;gap:8px;margin-top:10px;padding:12px;border:1px solid rgba(148,163,184,.35);border-radius:12px;background:rgba(248,250,252,.7)}

/* Password visibility controls - v1.10 */
.password-input-wrap{display:flex;gap:8px;align-items:stretch}.password-input-wrap input{flex:1;min-width:0}.password-eye-button{border:1px solid #cbd5e1;background:#f8fafc;border-radius:10px;padding:0 14px;font-family:inherit;font-weight:700;cursor:pointer;white-space:nowrap}.password-eye-button:hover{background:#eef2f7}.password-hint{margin:6px 0 2px;font-size:13px;line-height:1.7;color:#64748b}.password-display-button{white-space:nowrap}@media(max-width:600px){.password-input-wrap{flex-direction:column}.password-eye-button{min-height:42px}}

/* ===== Technician dashboard v1.11 ===== */
.tech-modern-body { background: linear-gradient(180deg,#eef4f7 0,#f7f9fb 42%,#edf2f5 100%); }
.tech-modern-header { position: sticky; top: 0; z-index: 40; padding-top: 13px; padding-bottom: 13px; }
.tech-header-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tech-live-clock { min-width:145px; padding:8px 13px; border:1px solid rgba(255,255,255,.16); border-radius:12px; background:rgba(255,255,255,.08); text-align:center; }
.tech-live-clock span { display:block; font-size:.72rem; opacity:.72; margin-bottom:2px; }
.tech-live-clock strong { font-size:1rem; font-variant-numeric:tabular-nums; }
.tech-home-button,.tech-header-actions .employee-logout-button { display:inline-flex; align-items:center; justify-content:center; min-height:43px; padding:0 17px; border-radius:11px; text-decoration:none; font-weight:800; border:1px solid rgba(255,255,255,.2); }
.tech-home-button { background:#fff; color:#102b3f; }
.tech-header-actions .employee-logout-button { margin:0; }
.tech-modern-main { width:min(1320px,calc(100% - 28px)); }
.tech-profile-card { background:linear-gradient(135deg,#fff,#f8fbfc); border:1px solid #dce7ec; box-shadow:0 12px 32px rgba(22,55,73,.08); }
.tech-profile-info h2 { font-size:1.65rem; }
.tech-new-request-alert { margin:18px 0; padding:17px 20px; border-radius:16px; display:flex; align-items:center; justify-content:space-between; gap:18px; background:linear-gradient(135deg,#e8fff2,#f5fffa); border:1px solid #a9e7c2; box-shadow:0 8px 22px rgba(23,117,69,.08); color:#155b38; }
.tech-new-request-alert[hidden] { display:none; }
.tech-new-request-alert strong { font-size:1.05rem; }
.tech-new-request-alert p { margin:4px 0 0; }
.tech-new-request-alert button { border:0; border-radius:10px; background:#16834f; color:#fff; padding:11px 18px; font-weight:800; cursor:pointer; white-space:nowrap; }
.tech-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
.tech-stat-card { min-height:118px; padding:20px; border-radius:18px; background:#fff; border:1px solid #dfe8ed; box-shadow:0 9px 24px rgba(23,54,70,.07); position:relative; overflow:hidden; }
.tech-stat-card:before { content:""; position:absolute; inset-inline-start:0; top:0; bottom:0; width:6px; background:#6e8797; }
.tech-stat-card span { display:block; color:#61717c; font-weight:700; }
.tech-stat-card strong { display:block; margin-top:12px; font-size:2.1rem; color:#142c3b; }
.tech-stat-card.new:before { background:#2e75d4; }.tech-stat-card.active:before { background:#e7a128; }.tech-stat-card.waiting:before { background:#e77828; }.tech-stat-card.done:before { background:#279763; }
.tech-requests-panel { background:#fff; border:1px solid #dce7ec; border-radius:20px; box-shadow:0 14px 35px rgba(19,47,62,.08); overflow:hidden; }
.tech-section-heading { padding:22px 24px; margin:0; border-bottom:1px solid #e6edf1; background:#fbfcfd; }
.tech-list-tools { display:flex; align-items:center; gap:10px; }
.tech-list-tools select { min-width:190px; height:43px; padding:0 12px; border:1px solid #cad8df; border-radius:10px; background:#fff; font-family:inherit; }
.tech-request-table-wrap { overflow:auto; }
.tech-request-table { width:100%; border-collapse:collapse; min-width:1020px; }
.tech-request-table th { padding:14px 15px; text-align:right; background:#f4f8fa; color:#536672; font-size:.84rem; border-bottom:1px solid #dfe7eb; white-space:nowrap; }
.tech-request-table td { padding:16px 15px; border-bottom:1px solid #edf1f3; vertical-align:middle; color:#243946; max-width:290px; }
.tech-request-table tbody tr:hover { background:#fbfdfe; }
.tech-request-table td small { display:block; margin-top:5px; color:#758691; }
.tech-order-number { color:#0d5f91; font-size:1.02rem; }
.tech-priority,.tech-status { display:inline-flex; padding:6px 10px; border-radius:999px; font-size:.78rem; font-weight:800; white-space:nowrap; }
.tech-priority { background:#edf2f5; color:#405867; }.tech-priority.طارئ { background:#ffe7e7; color:#a72d2d; }.tech-priority.مستعجل { background:#fff1d9; color:#955d00; }.tech-priority.مجدول { background:#e8efff; color:#2f5dab; }
.tech-status.status-new { background:#e8f1ff; color:#245fa9; }.tech-status.status-active { background:#fff1dc; color:#95600b; }.tech-status.status-waiting { background:#ffeadc; color:#a65018; }.tech-status.status-completed { background:#e5f8ed; color:#207348; }
.tech-open-request { border:0; background:#126f9d; color:#fff; padding:9px 15px; border-radius:9px; font-weight:800; cursor:pointer; }
.tech-open-request:hover,.tech-primary-action:hover { filter:brightness(.94); transform:translateY(-1px); }
.tech-request-modal[hidden] { display:none; }
.tech-request-modal { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:22px; }
.tech-request-modal-backdrop { position:absolute; inset:0; background:rgba(5,21,31,.72); backdrop-filter:blur(5px); }
.tech-request-modal-panel { position:relative; width:min(1240px,100%); max-height:calc(100vh - 44px); background:#f3f7f9; border-radius:22px; overflow:hidden; box-shadow:0 28px 90px rgba(0,0,0,.34); display:flex; flex-direction:column; }
.tech-modal-header { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 22px; color:#fff; background:linear-gradient(135deg,#0d3047,#145779); }
.tech-modal-header span { opacity:.75; font-size:.82rem; }.tech-modal-header h2 { margin:4px 0 0; font-size:1.4rem; }
.tech-modal-close { width:43px; height:43px; border-radius:50%; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.1); color:#fff; font-size:1.7rem; cursor:pointer; }
.tech-modal-content { padding:20px; overflow:auto; }
.tech-modal-open { overflow:hidden; }
.tech-detail-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(290px,.75fr); gap:18px; align-items:start; }
.tech-detail-main,.tech-detail-side { display:grid; gap:16px; }
.tech-detail-side { position:sticky; top:0; }
.tech-detail-card { background:#fff; border:1px solid #dae5ea; border-radius:17px; padding:19px; box-shadow:0 7px 20px rgba(25,55,70,.055); }
.tech-card-title { display:flex; align-items:center; gap:9px; margin-bottom:17px; padding-bottom:12px; border-bottom:1px solid #e8eef1; }.tech-card-title h3 { margin:0; font-size:1.06rem; color:#193748; }.tech-card-title>span { font-size:1.2rem; }
.tech-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.tech-info-grid>div { padding:13px; border-radius:11px; background:#f5f8fa; border:1px solid #e7edf0; }.tech-info-grid>div.wide { grid-column:1/-1; }
.tech-info-grid span { display:block; color:#71818b; font-size:.78rem; margin-bottom:6px; }.tech-info-grid strong { display:block; color:#1d3543; line-height:1.7; word-break:break-word; }
.tech-contact-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }.tech-contact-actions a,.tech-contact-actions span { padding:10px 14px; border-radius:9px; text-decoration:none; font-weight:800; background:#e9f4fa; color:#14658d; }.tech-contact-actions a:first-child { background:#e7f8ed; color:#227246; }
.tech-status-card { text-align:center; background:linear-gradient(135deg,#0e6c94,#154c68); color:#fff; border:0; }.tech-status-card span { display:block; opacity:.75; margin-bottom:6px; }.tech-status-card strong { font-size:1.2rem; }
.tech-timeline { display:grid; gap:0; }.tech-timeline-step { display:grid; grid-template-columns:38px 1fr; gap:10px; position:relative; min-height:67px; }.tech-timeline-step:not(:last-child):before { content:""; position:absolute; top:33px; bottom:-1px; right:18px; width:2px; background:#dce5e9; }.tech-timeline-marker { width:37px; height:37px; display:grid; place-items:center; border-radius:50%; background:#edf2f4; color:#73838d; z-index:1; border:2px solid #dce5e9; }.tech-timeline-step strong { display:block; padding-top:3px; color:#354b57; }.tech-timeline-step span { display:block; color:#8a989f; font-size:.72rem; margin-top:3px; }.tech-timeline-step.done .tech-timeline-marker { background:#299764; border-color:#299764; color:#fff; }.tech-timeline-step.done:not(:last-child):before { background:#8fd1ae; }.tech-timeline-step.current .tech-timeline-marker { background:#fff3d9; border-color:#e5a52b; color:#935f00; box-shadow:0 0 0 5px rgba(229,165,43,.12); }.tech-timeline-step.current strong { color:#9a6200; }
.tech-action-card { border-color:#cfe0e8; }.tech-primary-action { min-height:49px; padding:0 22px; border:0; border-radius:11px; background:linear-gradient(135deg,#10749d,#0e5d84); color:#fff; font-family:inherit; font-weight:900; font-size:1rem; cursor:pointer; transition:.18s ease; }
.tech-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }.tech-form-grid label { display:grid; gap:7px; font-weight:800; color:#425a67; }.tech-form-grid label.wide { grid-column:1/-1; }.tech-form-grid input,.tech-form-grid textarea { width:100%; border:1px solid #cbd9df; border-radius:10px; padding:11px 12px; font-family:inherit; background:#fff; }.tech-form-grid input:focus,.tech-form-grid textarea:focus { outline:3px solid rgba(17,111,157,.12); border-color:#267da5; }.tech-form-hint { color:#6d7e88; font-size:.85rem; }.tech-form-error { color:#b12c2c; min-height:22px; font-weight:800; }
.tech-waiting-box,.tech-complete-box { border-radius:12px; padding:17px; }.tech-waiting-box { background:#fff3e7; color:#945119; border:1px solid #f0cfb0; }.tech-complete-box { background:#e8f8ef; color:#237148; border:1px solid #bce3cb; }.tech-waiting-box p,.tech-complete-box p { margin:6px 0 0; line-height:1.7; }
@media (max-width:980px) { .tech-stat-grid { grid-template-columns:repeat(2,1fr); }.tech-detail-layout { grid-template-columns:1fr; }.tech-detail-side { position:static; grid-row:1; }.tech-modern-header { position:static; }.tech-header-actions { width:100%; }.tech-live-clock { margin-inline-start:auto; } }
@media (max-width:650px) { .tech-modern-main { width:min(100% - 18px,1320px); margin-top:15px; }.tech-modern-header { align-items:stretch; flex-direction:column; }.tech-header-actions { display:grid; grid-template-columns:1fr 1fr; }.tech-live-clock { grid-column:1/-1; width:100%; }.tech-stat-grid { grid-template-columns:1fr 1fr; gap:9px; }.tech-stat-card { min-height:100px; padding:15px; }.tech-stat-card strong { font-size:1.7rem; }.tech-new-request-alert,.tech-section-heading { align-items:stretch; flex-direction:column; }.tech-list-tools { width:100%; }.tech-list-tools select { flex:1; min-width:0; }.tech-request-modal { padding:0; }.tech-request-modal-panel { max-height:100vh; height:100vh; border-radius:0; }.tech-modal-content { padding:12px; }.tech-info-grid,.tech-form-grid { grid-template-columns:1fr; }.tech-info-grid>div.wide,.tech-form-grid label.wide { grid-column:auto; }.tech-detail-card { padding:15px; }.tech-contact-actions a,.tech-contact-actions span { flex:1; text-align:center; }.tech-profile-card { padding:18px; } }

/* GWMS update v2.2.2: Excel export and printable maintenance order */
.details-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.print-request-button{background:#0f766e!important;color:#fff!important}
.export-excel-button{background:#166534!important;color:#fff!important}
@media(max-width:700px){.details-header-actions{width:100%;justify-content:space-between}.print-request-button{flex:1}.order-details-header{align-items:stretch!important}}

/* GWMS update v2.2.3: compact operations actions */
.operations-filters{grid-template-columns:minmax(260px,1fr) 230px auto;align-items:center}
.operations-action-buttons{display:flex;align-items:center;gap:10px;justify-content:flex-start;flex-wrap:nowrap}
.operations-action-buttons .toolbar-button{width:auto!important;min-width:154px;min-height:46px;padding:0 16px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;font-weight:800}
.add-request-main-button{background:#1769aa!important;color:#fff!important;border-color:#1769aa!important}
.export-excel-button{background:#15803d!important;color:#fff!important;border-color:#15803d!important}
.excel-button-icon{width:23px;height:23px;border-radius:4px;display:inline-grid;place-items:center;background:#fff;color:#15803d;font-family:Arial,sans-serif;font-size:14px;font-weight:900}
@media(max-width:950px){.operations-filters{grid-template-columns:1fr 220px}.operations-action-buttons{grid-column:1/-1}.operations-action-buttons .toolbar-button{flex:0 0 auto}}
@media(max-width:700px){.operations-filters{grid-template-columns:1fr!important}.operations-action-buttons{grid-column:auto;display:grid;grid-template-columns:1fr 1fr;width:100%}.operations-action-buttons .toolbar-button{min-width:0;width:100%!important;padding:0 9px;font-size:13px}}

/* GWMS v2.2.4: separate detail actions */
.details-header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.save-pdf-request-button{background:#0f766e!important;color:#fff!important;border-color:#0f766e!important}
.print-request-button{background:#172033!important;color:#fff!important;border-color:#172033!important}


/* Technician maintenance price input */
.tech-money-input-wrap{display:flex;align-items:center;border:1px solid #cbd5e1;border-radius:12px;background:#fff;overflow:hidden;direction:ltr}
.tech-money-input-wrap:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.tech-money-input-wrap input{border:0!important;box-shadow:none!important;outline:0;width:100%;padding:12px 14px;text-align:left;font-weight:800;font-size:1rem;background:transparent}
.tech-money-input-wrap span{padding:12px 14px;background:#f1f5f9;color:#334155;font-weight:800;white-space:nowrap;border-left:1px solid #e2e8f0}

/* Technician modal header actions v2.2.9 */
.tech-modal-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tech-modal-print,.tech-modal-close{min-height:42px;border-radius:10px;padding:9px 16px;font-family:inherit;font-size:.92rem;font-weight:800;cursor:pointer;white-space:nowrap}
.tech-modal-print{border:1px solid rgba(255,255,255,.42);background:#fff;color:#123f5c;box-shadow:0 5px 15px rgba(0,0,0,.12)}
.tech-modal-print:hover{background:#eef7fc}
.tech-modal-close{width:auto;height:auto;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:#fff;font-size:.92rem}
.tech-modal-close:hover{background:rgba(255,255,255,.22)}
@media(max-width:650px){.tech-modal-header{align-items:flex-start;flex-direction:column}.tech-modal-header-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.tech-modal-print,.tech-modal-close{width:100%;padding:9px 8px}}


/* ===== GWMS Beta foundation ===== */
.gwms-beta-version{position:fixed;right:14px;bottom:12px;z-index:9998;padding:7px 11px;border:1px solid #d7e2ec;border-radius:10px;background:rgba(255,255,255,.94);color:#35506a;font:700 11px Arial,sans-serif;box-shadow:0 5px 18px rgba(15,48,78,.10);direction:ltr}
.gwms-beta-status{position:fixed;left:14px;bottom:12px;z-index:9999;border:0;border-radius:10px;padding:8px 12px;color:#fff;font:700 12px Arial,sans-serif;cursor:pointer;box-shadow:0 5px 18px rgba(15,48,78,.18)}
.gwms-beta-status.is-online{background:#16794b}.gwms-beta-status.is-offline{background:#b42318}.gwms-beta-status.is-checking{background:#6b7280}
.gwms-update-notice{position:fixed;left:50%;bottom:58px;transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:18px;width:min(520px,calc(100% - 28px));padding:14px 16px;border-radius:16px;background:#0b3d6e;color:#fff;box-shadow:0 14px 35px rgba(0,0,0,.24)}
.gwms-update-notice div{display:grid;gap:3px;flex:1}.gwms-update-notice small{color:#dbeafe}.gwms-update-notice button{border:0;border-radius:10px;background:#fff;color:#0b3d6e;padding:9px 14px;font-weight:800;cursor:pointer;white-space:nowrap}
@media(max-width:600px){.gwms-beta-version{right:8px;bottom:8px}.gwms-beta-status{left:8px;bottom:8px}.gwms-update-notice{bottom:52px}}

/* GWMS Beta 3.0.002 - Audit log inside employee management */
.audit-panel{margin-top:28px;padding-top:24px;border-top:1px solid #dbe4ef}
.audit-panel-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.audit-panel-header h2{margin:4px 0 6px;color:#0b2f59;font-size:25px}
.audit-panel-header p{margin:0;color:#65758a}
.audit-header-actions{display:flex;gap:10px;flex-wrap:wrap}
.audit-refresh-button,.audit-export-button,.audit-filter-button,.audit-clear-button{border:0;border-radius:10px;padding:11px 17px;font-weight:800;cursor:pointer;font-family:inherit}
.audit-refresh-button,.audit-filter-button{background:#0b3d78;color:#fff}
.audit-export-button{background:#148542;color:#fff}
.audit-clear-button{background:#eef2f7;color:#334155}
.audit-filters{display:grid;grid-template-columns:minmax(240px,2fr) minmax(160px,1fr) minmax(145px,1fr) minmax(145px,1fr) auto auto;gap:10px;align-items:center;margin-bottom:12px}
.audit-filters input,.audit-filters select{width:100%;min-height:43px;border:1px solid #cbd6e3;border-radius:10px;padding:9px 12px;background:#fff;font-family:inherit}
.audit-summary{display:flex;justify-content:flex-end;align-items:center;gap:8px;color:#64748b;margin:8px 0 10px}
.audit-summary strong{display:inline-grid;place-items:center;min-width:36px;height:30px;border-radius:20px;background:#e8f0fb;color:#0b3d78}
.audit-table-wrapper{max-height:470px;overflow:auto}
.audit-table{min-width:1050px}
.audit-table thead th{position:sticky;top:0;z-index:2;background:#0b315f!important;color:#fff!important;white-space:nowrap}
.audit-table td{vertical-align:top;line-height:1.55}
.audit-detail-cell{min-width:260px;white-space:normal!important}
.audit-action-badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#e8f0fb;color:#0b3d78;font-weight:800;white-space:nowrap}
.audit-reference{font-family:Consolas,monospace;direction:ltr;display:inline-block}
@media(max-width:900px){.audit-panel-header{align-items:flex-start;flex-direction:column}.audit-filters{grid-template-columns:1fr 1fr}.audit-filters input[type="search"]{grid-column:1/-1}}
@media(max-width:560px){.audit-filters{grid-template-columns:1fr}.audit-filters input[type="search"]{grid-column:auto}.audit-header-actions{width:100%}.audit-header-actions button{flex:1}}


/* GWMS Beta 3.0.003 — employee audit hotfix */
.employee-tool-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.open-audit-button{border:0;border-radius:12px;padding:12px 18px;background:#0b3d6e;color:#fff;font-weight:800;cursor:pointer;box-shadow:0 7px 18px rgba(11,61,110,.18)}
.open-audit-button:hover{filter:brightness(1.08)}
#auditPanel{scroll-margin-top:18px}
@media(max-width:700px){.employee-tool-actions{width:100%}.employee-tool-actions button{flex:1}}


/* GWMS 3.0.008 - technician task cancellation */
.tech-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start}.tech-current-action{min-width:0}.tech-current-action>.tech-primary-action,.tech-current-action>.tech-completion-form{width:100%}.tech-cancel-action{min-height:49px;padding:0 22px;border:1px solid #bb2d3b;border-radius:11px;background:#fff;color:#a51f2d;font-family:inherit;font-weight:900;font-size:1rem;cursor:pointer;white-space:nowrap}.tech-cancel-action:hover{background:#fff1f2;transform:translateY(-1px)}
.tech-cancel-modal{position:fixed;inset:0;z-index:1600;display:grid;place-items:center;padding:18px}.tech-cancel-modal[hidden]{display:none}.tech-cancel-backdrop{position:absolute;inset:0;background:rgba(8,24,35,.68);backdrop-filter:blur(3px)}.tech-cancel-panel{position:relative;width:min(540px,100%);border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.3);overflow:hidden}.tech-cancel-panel header{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 20px;background:#8e1e2b;color:#fff}.tech-cancel-panel header span{font-size:.82rem;opacity:.82}.tech-cancel-panel header h2{margin:4px 0 0}.tech-cancel-panel header button{width:38px;height:38px;border:1px solid rgba(255,255,255,.3);border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:1.5rem;cursor:pointer}.tech-cancel-panel form{display:grid;gap:15px;padding:20px}.tech-cancel-panel label{display:grid;gap:7px;font-weight:800;color:#233d4b}.tech-cancel-panel select,.tech-cancel-panel textarea{width:100%;border:1px solid #c8d5dd;border-radius:10px;padding:11px 12px;font:inherit;background:#fff}.tech-cancel-panel textarea{resize:vertical}.tech-cancel-actions{display:flex;justify-content:flex-end;gap:10px}.tech-cancel-back,.tech-cancel-confirm{min-height:44px;padding:0 18px;border-radius:10px;font:inherit;font-weight:900;cursor:pointer}.tech-cancel-back{border:1px solid #b8c5cd;background:#fff;color:#334c59}.tech-cancel-confirm{border:0;background:#a32332;color:#fff}.cancellation-details-title{color:#a32332!important}.status-cancelled{background:#fde8ea!important;color:#9f1f2d!important;border-color:#efb5bc!important}
@media(max-width:650px){.tech-action-row{grid-template-columns:1fr}.tech-cancel-action{width:100%}.tech-cancel-modal{padding:10px}.tech-cancel-actions{display:grid;grid-template-columns:1fr 1fr}.tech-cancel-back,.tech-cancel-confirm{padding:0 8px}}

/* GWMS 3.0.009 - workflow approval, multi-request technicians, status colors */
.order-status{display:inline-flex;align-items:center;justify-content:center;min-width:120px;padding:7px 11px;border:1px solid transparent;border-radius:999px;font-weight:900;line-height:1.25;text-align:center;box-shadow:0 3px 10px rgba(15,23,42,.07)}
.order-status.status-gray{background:#eef2f6;color:#475569;border-color:#cbd5e1}
.order-status.status-teal{background:#dcfce7;color:#166534;border-color:#86efac}
.order-status.status-blue{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}
.order-status.status-cyan{background:#cffafe;color:#0e7490;border-color:#67e8f9}
.order-status.status-purple{background:#f3e8ff;color:#7e22ce;border-color:#d8b4fe}
.order-status.status-yellow{background:#fef3c7;color:#92400e;border-color:#fcd34d}
.order-status.status-orange{background:#ffedd5;color:#c2410c;border-color:#fdba74}
.order-status.status-red-orange{background:#fee2e2;color:#b91c1c;border-color:#fca5a5;box-shadow:0 0 0 3px rgba(239,68,68,.08)}
.order-status.status-red{background:#b91c1c;color:#fff;border-color:#991b1b}
.order-status.status-green{background:#15803d;color:#fff;border-color:#166534}
.operations-cancellation-form{display:grid;gap:14px;padding:18px;border:1px solid #fecaca;border-radius:14px;background:#fff7f7}
.operations-cancellation-form label{display:grid;gap:7px;font-weight:800;color:#3f3f46}
.operations-cancellation-form textarea{width:100%;border:1px solid #d6b3b7;border-radius:10px;padding:11px 12px;font:inherit;resize:vertical;background:#fff}
.operations-cancellation-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.approve-cancellation-button{background:#b91c1c!important;color:#fff!important;border-color:#991b1b!important}
.reject-cancellation-button{background:#fff!important;color:#334155!important;border:1px solid #94a3b8!important}
.cancellation-pending-box{background:#fff7ed!important;border-color:#fdba74!important;color:#9a3412!important}
.tech-cancelled-box{padding:16px;border:1px solid #fecaca;border-radius:12px;background:#fff1f2;color:#9f1239}
@media(max-width:650px){.operations-cancellation-actions{display:grid;grid-template-columns:1fr}.operations-cancellation-actions button{width:100%}}

/* GWMS 3.0.011 - operations direct request cancellation */
.operations-direct-cancel {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .35);
}
.operations-cancel-request-button {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.operations-cancel-request-button:hover {
  background: #991b1b;
  border-color: #991b1b;
}
.operations-direct-cancel-form {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(220, 38, 38, .35);
  border-radius: 14px;
  background: rgba(254, 242, 242, .9);
}
.operations-direct-cancel-form[hidden] { display: none !important; }
.operations-direct-cancel-form label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  font-weight: 700;
}
.operations-direct-cancel-form select,
.operations-direct-cancel-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.operations-direct-cancel-form textarea { resize: vertical; }

/* GWMS 3.0.021 - smart customer lookup in operations */
.customer-lookup-field{position:relative}.customer-suggestions{position:absolute;z-index:30;top:100%;right:0;left:0;margin-top:5px;background:#fff;border:1px solid #d7dce2;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.14);max-height:280px;overflow:auto}.customer-suggestion{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:3px;padding:11px 12px;border:0;border-bottom:1px solid #edf0f3;background:#fff;font:inherit;text-align:right;cursor:pointer}.customer-suggestion:last-child{border-bottom:0}.customer-suggestion:hover,.customer-suggestion:focus{background:#f3f8f5;outline:0}.customer-suggestion span{font-size:12px;color:#64748b}.customer-suggestion-empty{padding:13px;color:#64748b;font-weight:600}.customer-insight{border:1px solid #b8dcc7;background:#f0faf4;border-radius:12px;padding:12px 14px}.customer-insight>div{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.customer-insight strong{color:#0b6b3a}.customer-insight span{color:#334155;font-size:14px}.request-entry-form input[readonly]#customerActivity{background:#f0f7f3;color:#174f32;font-weight:700}


/* Finance Salaries V3 - monthly timesheet, print and Excel */
.salary-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.salary-tools input{min-height:44px;border:1px solid #ccd6e0;border-radius:10px;padding:9px 12px;font:inherit}.timesheet-panel{margin-top:24px;padding-top:20px;border-top:2px solid #e2e8f0;scroll-margin-top:16px}.timesheet-legend{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 14px}.timesheet-legend span{padding:6px 10px;border-radius:999px;background:#eef4fa;color:#234;font-weight:800}.timesheet-wrap{max-height:620px}.timesheet-table{min-width:2600px}.timesheet-table th,.timesheet-table td{min-width:58px;padding:5px;text-align:center}.timesheet-table thead th{position:sticky;top:0;z-index:4}.timesheet-sticky-name{position:sticky!important;right:0;z-index:5!important;min-width:180px!important;background:#fff!important}.timesheet-table thead .timesheet-sticky-name{background:#0b315f!important;color:#fff!important;z-index:7!important}.timesheet-sticky-name small{display:block;color:#64748b;margin-top:3px}.attendance-select{width:48px;max-width:48px;height:34px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;font-size:0;color:transparent;cursor:pointer}.attendance-select option{font-size:14px;color:#111}.attendance-code{display:block;margin-top:-27px;pointer-events:none;font-weight:900}.attendance-select.work+.attendance-code{color:#15803d}.attendance-select.paid+.attendance-code{color:#2563eb}.attendance-select.unpaid+.attendance-code{color:#b45309}.attendance-select.absent+.attendance-code{color:#dc2626}.attendance-select.penalty+.attendance-code{color:#7c3aed}@media(max-width:700px){.salary-tools>*{flex:1 1 145px}.timesheet-sticky-name{min-width:145px!important}}


/* Salaries V4: compact action bar, compact timesheet, polished print controls */
.salary-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 10px;padding:7px 8px;border:1px solid #d8e2ee;border-radius:10px;background:#f8fafc;flex-wrap:wrap}
.salary-filter-group{display:flex;align-items:center;gap:6px;min-width:300px;flex:1 1 330px}
.salary-filter-group input{height:36px!important;min-height:36px!important;border-radius:8px!important;padding:6px 9px!important;font-size:12px!important}
.salary-filter-group #salaryMonth{max-width:150px}
.salary-filter-group #salarySearch{min-width:190px;flex:1}
.salary-action-bar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.salary-action{height:36px!important;min-height:36px!important;padding:6px 10px!important;border-radius:8px!important;font-size:11px!important;font-weight:800!important;white-space:nowrap;border:0!important;color:#fff!important;box-shadow:0 2px 5px rgba(15,23,42,.12)}
.salary-action.timesheet{background:#0b5ca8!important}.salary-action.print-sheet{background:#475569!important}.salary-action.print-payroll{background:#7c3aed!important}.salary-action.excel{background:#087443!important}.salary-action.add-employee{background:#0b315f!important}
.salary-action:hover{filter:brightness(.95);transform:translateY(-1px)}
#salariesPage .finance-page-head{margin-bottom:8px!important;padding-bottom:4px!important}
#salariesPage .salary-summary{gap:7px!important;margin-bottom:8px!important}
#salariesPage .salary-summary .finance-card{padding:8px 10px!important;min-height:58px!important}
#salariesPage .salary-summary .finance-card span{font-size:10px!important}
#salariesPage .salary-summary .finance-card strong{font-size:16px!important;margin-top:3px!important}
#salariesPage .finance-panel{padding:12px!important}
#salariesPage .finance-panel-head{margin-bottom:6px!important}
.timesheet-panel{margin-top:12px!important;padding-top:10px!important}
.timesheet-panel .finance-panel-head{margin-bottom:3px!important;align-items:center}
.timesheet-panel .finance-panel-head h2{font-size:15px!important;margin:0 0 2px!important}
.timesheet-panel .finance-panel-head p{font-size:10px!important;margin:0!important}
.timesheet-legend{gap:5px!important;margin:5px 0 7px!important}
.timesheet-legend span{padding:3px 7px!important;font-size:9px!important}
.timesheet-wrap{max-height:520px!important}
.timesheet-table{min-width:2050px!important}
.timesheet-table th,.timesheet-table td{min-width:43px!important;padding:2px!important;height:32px!important;font-size:9px!important}
.timesheet-sticky-name{min-width:145px!important;max-width:145px!important;padding:3px 5px!important}
.timesheet-sticky-name strong{font-size:10px!important;line-height:1.15}
.timesheet-sticky-name small{font-size:8px!important;margin-top:1px!important}
.attendance-select{width:38px!important;max-width:38px!important;height:27px!important;border-radius:5px!important}
.attendance-code{margin-top:-22px!important;font-size:10px!important}
@media(max-width:900px){.salary-toolbar{align-items:stretch}.salary-filter-group{min-width:100%;flex-basis:100%}.salary-action-bar{justify-content:flex-start}.salary-action{flex:1 1 130px}.timesheet-table{min-width:1950px!important}}

/* Salaries V5: timesheet tools + individual salary slip */
.timesheet-head{gap:12px;align-items:center;flex-wrap:wrap}
.timesheet-head-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-start}
.timesheet-head-actions .finance-btn{min-height:34px;padding:7px 11px;font-size:12px;white-space:nowrap}
@media (max-width:760px){.timesheet-head-actions{width:100%}.timesheet-head-actions .finance-btn{flex:1 1 140px}}

/* Salaries V6: smaller centered timesheet cells with status colors */
.timesheet-table th,
.timesheet-table td {
  min-width: 36px !important;
  width: 36px !important;
  height: 28px !important;
  padding: 1px !important;
  font-size: 8.5px !important;
  text-align: center !important;
  vertical-align: middle !important;
}
.timesheet-table td:not(.timesheet-sticky-name) {
  position: relative !important;
}
.timesheet-table th:not(.timesheet-sticky-name) {
  min-width: 36px !important;
  width: 36px !important;
}
.timesheet-sticky-name {
  min-width: 135px !important;
  width: 135px !important;
  max-width: 135px !important;
}
.attendance-select {
  display: block !important;
  width: 32px !important;
  max-width: 32px !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border-radius: 5px !important;
  border-width: 1px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  text-align: center !important;
}
.attendance-code {
  position: absolute !important;
  inset: 50% auto auto 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: 32px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  pointer-events: none !important;
}
.attendance-select.work { background: #dcfce7 !important; border-color: #86efac !important; }
.attendance-select.paid { background: #dbeafe !important; border-color: #93c5fd !important; }
.attendance-select.unpaid { background: #fef3c7 !important; border-color: #fcd34d !important; }
.attendance-select.absent { background: #fee2e2 !important; border-color: #fca5a5 !important; }
.attendance-select.penalty { background: #ede9fe !important; border-color: #c4b5fd !important; }
.attendance-select:not(.work):not(.paid):not(.unpaid):not(.absent):not(.penalty) {
  background: #f8fafc !important;
}
.timesheet-wrap { max-height: 500px !important; }
.timesheet-table { min-width: 1750px !important; }
@media (max-width: 900px) {
  .timesheet-table { min-width: 1680px !important; }
  .timesheet-sticky-name { min-width: 125px !important; width: 125px !important; max-width: 125px !important; }
}


/* Commission orders shown directly beneath each representative */
.commission-orders-row td{background:#f4f8fc;padding:7px 10px!important;border-top:0!important}
.commission-orders-inline{display:flex;align-items:flex-start;gap:10px;min-width:0}
.commission-orders-inline>strong{white-space:nowrap;color:#123968;font-size:12px;padding-top:5px}
.commission-order-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.commission-order-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #b8c9dc;background:#fff;border-radius:7px;padding:4px 7px;font-size:11px;line-height:1.2;color:#334155}
.commission-order-chip b{color:#123968}
.commission-order-chip span{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.commission-order-chip em{font-style:normal;font-weight:800;color:#087443;white-space:nowrap}
.commission-no-orders{color:#64748b;font-size:11px;padding-top:5px}
.modal-action.edit{background:#7c3aed;color:#fff}
@media(max-width:800px){.commission-orders-inline{display:block}.commission-orders-inline>strong{display:block;margin-bottom:6px}.commission-order-chip{width:100%;justify-content:space-between}.commission-order-chip span{max-width:none;flex:1}}


/* Commission profit-based calculation */
.commission-pending-note{display:block;margin-top:3px;color:#b45309;font-size:10px;font-weight:700}
.commission-cost-table{min-width:1180px}
.commission-cost-editor{display:flex;align-items:center;justify-content:center;gap:5px;min-width:170px}
.commission-cost-editor input{width:105px;min-width:0;padding:6px 7px;border:1px solid #b7c7d9;border-radius:7px;text-align:center;font-weight:700;background:#fff}
.commission-cost-editor button{border:0;border-radius:7px;background:#123968;color:#fff;padding:7px 10px;font-weight:800;cursor:pointer}
.commission-cost-editor button:hover{background:#0b2b51}
.commission-cost-state{display:inline-block;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;white-space:nowrap}
.commission-cost-state.waiting,.commission-status.cost-pending{background:#fff3cd;color:#8a5a00;border:1px solid #f5d77a}
.commission-cost-state.ready{background:#dcfce7;color:#166534;border:1px solid #86efac}
.commission-cost-state.loss{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}
.commission-status.empty{background:#e2e8f0;color:#475569}
@media(max-width:700px){.commission-cost-editor{min-width:145px}.commission-cost-editor input{width:85px}}


/* ==================================================
   صفحة دخول بيانات العملاء - تنسيق مستقل
   ================================================== */
body.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(11, 94, 215, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eaf2fb 100%);
}

.login-page .login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-page .login-card {
  width: min(420px, 100%);
  padding: 28px 30px 26px;
  text-align: center;
  border: 1px solid #d4e0ef;
  border-top: 5px solid var(--primary-dark);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(20, 55, 95, 0.16);
}

.login-page .login-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 14px;
  padding: 5px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 3px solid var(--secondary);
  box-shadow: 0 8px 22px rgba(11, 94, 215, 0.14);
}

.login-page .login-card h1 {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 25px;
  font-weight: 900;
}

.login-page .login-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-page .login-form {
  display: grid;
  gap: 8px;
  text-align: right;
}

.login-page .login-form label {
  margin: 4px 2px 0;
  font-size: 14px;
}

.login-page .login-form input {
  height: 46px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 15px;
  background: #fdfefe;
}

.login-page .login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 94, 215, 0.11);
}

.login-page .login-error {
  min-height: 22px;
  margin: 2px 0 0;
  color: var(--danger);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.login-page .primary-login-button,
.login-page .login-back-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.login-page .primary-login-button {
  margin-top: 2px;
  border: 0;
  color: #fff;
  background: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(7, 59, 142, 0.2);
}

.login-page .primary-login-button:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

.login-page .login-back-link {
  margin-top: 10px;
  color: #334155;
  background: #eef3f8;
  border: 1px solid #d6e0eb;
}

.login-page .login-back-link:hover {
  background: #e4ecf5;
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .login-page .login-layout { padding: 14px; }
  .login-page .login-card { padding: 24px 20px 22px; border-radius: 18px; }
  .login-page .login-logo { width: 88px; height: 88px; }
  .login-page .login-card h1 { font-size: 22px; }
}


/* GWMS unified main login interfaces v1 */
.login-page .login-card {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-page .login-form {
  width: 100%;
}
.login-page .login-form label {
  width: 100%;
  text-align: right;
}
.login-page .primary-login-button,
.login-page .login-back-link {
  max-width: 340px;
  margin-right: auto;
  margin-left: auto;
  min-height: 48px;
  font-size: 15px;
  text-align: center;
}
.login-page .primary-login-button {
  margin-top: 8px;
  border: 2px solid #073b8e;
}
.login-page .login-back-link {
  margin-top: 12px;
  border: 2px solid #c8d5e5;
}
.login-page .primary-login-button:focus-visible,
.login-page .login-back-link:focus-visible {
  outline: 4px solid rgba(11,94,215,.2);
  outline-offset: 2px;
}

/* إدارة الحسابات والصلاحيات المخصصة */
.accounts-tabs{display:flex;gap:10px;justify-content:center;margin:18px 0 22px;flex-wrap:wrap}.accounts-tab{border:1px solid #c9d7e8;background:#eef4fb;color:#12395e;border-radius:10px;padding:10px 22px;font-family:inherit;font-weight:800;cursor:pointer}.accounts-tab.active{background:#12395e;color:#fff;border-color:#12395e}.permissions-modal{max-width:720px}.permissions-fieldset{margin:16px 0;border:1px solid #cbd8e6;border-radius:14px;padding:14px;background:#f8fbff}.permissions-fieldset legend{padding:0 8px;font-weight:900;color:#12395e}.permission-all{display:flex;align-items:center;gap:8px;font-weight:800;margin-bottom:12px}.permissions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.permissions-grid label{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #dbe5ef;border-radius:9px;padding:10px}.permissions-grid input,.permission-all input{width:18px;height:18px}.permissions-note{margin:12px 0 0;color:#7a4a00;background:#fff5da;border-radius:8px;padding:9px;font-size:13px}.permission-chips{display:flex;flex-wrap:wrap;gap:5px}.permission-chip{display:inline-block;background:#e5f0fb;color:#12395e;border:1px solid #c6d9ec;border-radius:999px;padding:3px 8px;font-size:11px;white-space:nowrap}.permission-chip.muted{background:#f1f1f1;color:#666;border-color:#ddd}.activity-filters{display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) 145px 145px auto;gap:10px;align-items:end;margin:8px 0 14px}.activity-filters input,.activity-filters select{min-height:40px;border:1px solid #c8d5e3;border-radius:9px;padding:8px 10px;font-family:inherit}.activity-summary{display:flex;gap:7px;align-items:center;margin:0 0 10px;color:#456}.activity-summary strong{font-size:21px;color:#12395e}.activity-table td{vertical-align:middle}.activity-empty{text-align:center;color:#777;padding:24px!important}.status-idle{background:#eceff2;color:#58616a}@media(max-width:900px){.activity-filters{grid-template-columns:1fr 1fr}.permissions-grid{grid-template-columns:1fr}}@media(max-width:560px){.activity-filters{grid-template-columns:1fr}}


/* إدارة الحسابات وحالة المستخدمين - تصميم موحد */
.accounts-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(170px,1fr));
  max-width:620px;
  margin:18px auto 22px;
  padding:5px;
  gap:5px;
  border:1px solid #c8d8e8;
  border-radius:14px;
  background:#edf4fb;
  box-shadow:0 8px 22px rgba(18,57,94,.08);
}
.accounts-tab{
  border:0;
  background:transparent;
  color:#234866;
  border-radius:10px;
  padding:11px 18px;
  font-family:inherit;
  font-weight:900;
  cursor:pointer;
  transition:.18s ease;
}
.accounts-tab:hover{background:#dceaf6}
.accounts-tab.active{background:#12395e;color:#fff;box-shadow:0 5px 13px rgba(18,57,94,.22)}
.accounts-command-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 16px;
  padding:13px 15px;
  border:1px solid #cbd9e7;
  border-radius:14px;
  background:linear-gradient(135deg,#f7fbff,#eaf3fb);
}
.accounts-command-copy h2{margin:0 0 3px;color:#12395e;font-size:18px}
.accounts-command-copy p{margin:0;color:#62788b;font-size:13px}
.accounts-command-bar .add-employee-button{margin:0;min-width:155px}
.presence-command-bar{background:linear-gradient(135deg,#f8fbfe,#eef6fb)}
.presence-refresh-button{min-height:40px;padding-inline:18px}
.presence-search-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.presence-search-row input{width:min(430px,100%);min-height:42px;border:1px solid #c8d5e3;border-radius:10px;padding:9px 12px;font-family:inherit;background:#fff}
.presence-search-row .activity-summary{margin:0;white-space:nowrap;background:#edf5fc;border:1px solid #d2e1ef;border-radius:10px;padding:7px 13px}
.presence-table th{background:#12395e!important;color:#fff!important}
.presence-table td{vertical-align:middle}
.presence-online{box-shadow:0 0 0 3px rgba(35,164,90,.12)}
@media(max-width:700px){
  .accounts-tabs{grid-template-columns:1fr;max-width:none}
  .accounts-command-bar,.presence-search-row{align-items:stretch;flex-direction:column}
  .accounts-command-bar .add-employee-button,.presence-search-row input{width:100%}
}


/* النسخ الاحتياطي داخل إدارة الحسابات */
.accounts-tabs{grid-template-columns:repeat(3,minmax(160px,1fr));max-width:820px}
.backup-main-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.backup-status-card{display:grid;grid-template-columns:2fr 1.3fr .7fr;gap:10px;margin:0 0 14px}.backup-status-card>div{background:#f7fbff;border:1px solid #d3e1ee;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:4px}.backup-status-card span{font-size:12px;color:#688095;font-weight:800}.backup-status-card strong{color:#12395e;overflow-wrap:anywhere}.backup-message{min-height:22px;margin:5px 0 10px;color:#157347;font-weight:800}.backup-message.error{color:#b42318}.backup-table th{background:#12395e!important;color:#fff!important}.backup-download{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.backup-warning{margin:13px 0 0;padding:10px 12px;border-radius:10px;background:#fff4db;border:1px solid #f1d28b;color:#785000;font-weight:800;font-size:13px}@media(max-width:760px){.accounts-tabs{grid-template-columns:1fr}.backup-status-card{grid-template-columns:1fr}.backup-main-actions{width:100%;justify-content:stretch}.backup-main-actions>*{flex:1}}
