/* ============================================================================
   Developer Signature Bar — Eng. Ahmed Amr Abo_ Alhaj
   تصميم عصري فاخر متناسق مع هوية المنصة (كحلي عميق + فيروزي + لمسة ذهبية)
   ========================================================================== */
.dev-sig {
   --g1: #22D3EE;
   --g2: #FFB02E;
   --ds-bg: linear-gradient(105deg, #06101E 0%, #12123A 50%, #092A36 100%);
   --ds-ink: #F0F8F7;
   --ds-mut: #9AB3C4;
   box-sizing: border-box;
   width: 100%;
   margin-top: auto;
   padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
   background:
      radial-gradient(34% 160% at 8% 50%, rgba(43, 208, 192, .10), transparent 70%),
      radial-gradient(34% 160% at 92% 50%, rgba(255, 176, 46, .08), transparent 70%),
      var(--ds-bg);
   color: var(--ds-mut);
   direction: ltr;
   text-align: center;
   font: 600 12.5px/1.4 'Cairo', 'Segoe UI', system-ui, sans-serif;
   position: relative;
   z-index: 1;
   clear: both;
   border-top: 1px solid rgba(43, 208, 192, .18);
}

.dev-sig * {
   box-sizing: border-box
}

.dev-sig::before {
   content: "";
   position: absolute;
   inset: -1px 0 auto;
   height: 1.5px;
   background: linear-gradient(90deg, transparent 5%, var(--g1) 35%, var(--g2) 50%, var(--g1) 65%, transparent 95%);
   opacity: .72;
   pointer-events: none;
}

.ds-in {
   margin: 0;
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   align-items: center;
   gap: 8px 10px;
}

.ds-in>span:not(.ds-code) {
   color: var(--ds-mut);
   font-weight: 600;
   letter-spacing: .02em;
}

.ds-code {
   font: 700 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
   color: var(--g1);
   padding: 4px 9px;
   border: 1px solid rgba(43, 208, 192, .35);
   border-radius: 8px;
   background: rgba(43, 208, 192, .09);
   box-shadow: 0 0 14px -6px rgba(43, 208, 192, .5);
   animation: ds-pulse 4s ease-in-out infinite;
}

.ds-name {
   position: relative;
   display: inline-flex;
   align-items: center;
   gap: 7px;
   padding: 6px 15px;
   border-radius: 999px;
   border: 1px solid rgba(43, 208, 192, .28);
   background: rgba(255, 255, 255, .05);
   backdrop-filter: blur(6px);
   -webkit-backdrop-filter: blur(6px);
   box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
   text-decoration: none;
   color: var(--ds-ink);
   font-weight: 700;
   font-size: 13.5px;
   letter-spacing: .25px;
   transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
   -webkit-tap-highlight-color: transparent;
}

.ds-name b {
   font: 800 13.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
   color: var(--g2);
   transition: transform .28s ease;
}

.ds-name span {
   color: var(--ds-ink)
}

.ds-name svg {
   width: 16px;
   height: 16px;
   flex: none;
   fill: var(--g1);
   filter: drop-shadow(0 0 6px rgba(43, 208, 192, .45));
   transition: transform .28s ease, fill .28s ease;
}

.ds-name:hover,
.ds-name:focus-visible {
   transform: translateY(-2px);
   border-color: rgba(255, 176, 46, .55);
   background: rgba(43, 208, 192, .1);
   box-shadow: 0 10px 24px -10px rgba(43, 208, 192, .4);
}

.ds-name:hover b:first-child,
.ds-name:focus-visible b:first-child {
   transform: translateX(-2px)
}

.ds-name:hover b:last-of-type,
.ds-name:focus-visible b:last-of-type {
   transform: translateX(2px)
}

.ds-name:hover svg,
.ds-name:focus-visible svg {
   transform: scale(1.18) rotate(-8deg);
   fill: #25D366
}

.ds-name:focus-visible {
   outline: 2px solid var(--g1);
   outline-offset: 2px
}

@keyframes ds-pulse {

   0%,
   100% {
      box-shadow: 0 0 0 0 rgba(43, 208, 192, 0)
   }

   50% {
      box-shadow: 0 0 14px 0 rgba(43, 208, 192, .28)
   }
}

/* Admin: زر هادئ بجانب التوقيع + نافذة كلمة المرور */
.ds-admin {
   font: 700 11.5px/1 'Cairo', 'Segoe UI', system-ui, sans-serif;
   color: var(--ds-mut);
   background: rgba(255, 255, 255, .04);
   border: 1px solid rgba(255, 255, 255, .16);
   border-radius: 999px;
   padding: 6px 12px;
   min-height: 28px;
   cursor: pointer;
   transition: color .2s, border-color .2s, background .2s;
}

.ds-admin:hover,
.ds-admin[aria-expanded=true] {
   color: var(--g2);
   border-color: rgba(255, 176, 46, .45);
   background: rgba(255, 176, 46, .1);
}

.ds-admin:focus-visible {
   color: var(--ds-ink);
   outline: 2px solid var(--g1);
   outline-offset: 2px;
}

.ds-pop {
   position: absolute;
   left: 50%;
   bottom: calc(100% + 10px);
   transform: translateX(-50%);
   z-index: 50;
   width: min(250px, calc(100vw - 24px));
   padding: 14px;
   background: #fff;
   color: #12123A;
   border: 1px solid rgba(11, 28, 51, .14);
   border-radius: 14px;
   box-shadow: 0 14px 36px rgba(11, 28, 51, .28);
   direction: rtl;
   text-align: right;
   font: 600 13px/1.5 'Cairo', 'Segoe UI', system-ui, sans-serif;
}

.ds-pop[hidden] {
   display: none
}

.ds-pop label {
   display: block;
   margin-bottom: 6px
}

.ds-pop input {
   box-sizing: border-box;
   width: 100%;
   min-height: 38px;
   padding: 6px 10px;
   border: 1px solid rgba(11, 28, 51, .3);
   border-radius: 8px;
   font: 600 15px 'Cairo', system-ui, sans-serif;
   color: #12123A;
   direction: ltr;
   text-align: center;
   letter-spacing: 2px;
}

.ds-pop input:focus {
   outline: 2px solid #22D3EE;
   outline-offset: 1px;
   border-color: #4338CA
}

.ds-pop button {
   margin-top: 8px;
   width: 100%;
   min-height: 36px;
   border: 0;
   border-radius: 8px;
   background: #4338CA;
   color: #fff;
   font: 700 13px 'Cairo', system-ui, sans-serif;
   cursor: pointer;
}

.ds-pop button:disabled {
   opacity: .6;
   cursor: wait
}

.ds-msg {
   min-height: 18px;
   margin-top: 6px;
   color: #B42318;
   font-size: 12.5px
}

@media(max-width:520px) {
   .dev-sig {
      padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
      font-size: 12px
   }

   .ds-in {
      gap: 8px
   }

   .ds-name {
      padding: 7px 14px;
      font-size: 13px
   }
}

@media(prefers-reduced-motion:reduce) {
   .dev-sig * {
      transition: none !important;
      animation: none !important
   }
}

@media print {
   .dev-sig {
      display: none !important
   }
}

/* dashboard: body is a flex row with a fixed right sidebar */
body:has(>.sidebar~.dev-sig) {
   flex-wrap: wrap
}

body>.sidebar~.dev-sig {
   flex: 1 1 100%;
   margin-right: 260px
}

@media(max-width:768px) {
   body>.sidebar~.dev-sig {
      margin-right: 0
   }
}

body:has(>.sidebar~.dev-sig)>.main {
   flex: 1 1 1px;
   min-width: 1px
}