/* --- الأساسيات - Professional Design --- */
html, body { 
    margin: 0; 
    padding: 0; 
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body { 
    background: #0a0a0a; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; 
    font-size: 16px; 
    color: #fff; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#boh-ai-app { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%; 
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    direction: rtl;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    outline: none; 
}

.boh-view { 
  width: 100%; 
  height: 100%; 
  display: none; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  opacity: 0; 
  margin: 0;
  padding: 0;
  /* ✅ تحسين الأداء */
  will-change: opacity;
  transform: translateZ(0);
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.boh-view.active { opacity: 1; }

/* Chat view - remove all spacing */
#view-chat {
  justify-content: flex-start;
  align-items: stretch;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
}

/* Remove any black bar at the top */
#view-chat > * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-layout {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#view-chat .chat-header {
  margin-top: 0 !important;
  padding-top: 14px !important;
  background: transparent !important;
}

.top-nav-plans { position: absolute; top: 25px; right: 25px; left: auto; z-index: 100; }
.nav-btn { background: rgba(255,255,255,0.08); padding: 8px 15px; border-radius: 15px; color: #fff; text-decoration: none; font-size: 1rem; display: flex; align-items: center; gap: 8px; transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid #f4920e; cursor: pointer; will-change: background, box-shadow; }
.nav-btn:hover { background: rgba(244, 146, 14, 0.2); box-shadow: 0 0 10px rgba(244, 146, 14, 0.3); }

.plans-wrapper{
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 50%, #000 100%);
  /* رفع الشريط العلوي لفوق شوية + مساحة مريحة */
  padding: 50px 20px 80px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  min-height: 100vh;
}

.plans-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(244, 146, 14, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 900px){
  .plans-wrapper{ 
    padding: 35px 16px 40px; 
  }
}

/* Plans topbar (sticky actions) */
/* Plans topbar (sticky actions) */
.plans-topbar{
  position: relative;
  top: 0;
  left: auto;
  transform: none;
  z-index: 10;
  width: calc(100% - 20px);
  max-width: 1100px;
  padding: 12px 12px;
  margin: 0 auto 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid #f4920e;
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.plans-topbar .extra-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0;
}
.topbar-toggle{
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #f4920e;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}
.topbar-toggle:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(244,146,14,0.25);
}

@media (max-width: 720px){
  .plans-topbar{
    padding: 10px 10px;
    border-radius: 16px;
  }
  .topbar-toggle{
    display: inline-flex;
    margin: 0 auto;
  }
  .plans-topbar .extra-actions{
    display: none;
    margin-top: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .plans-topbar.is-open .extra-actions{
    display: flex;
  }
  .plans-topbar .extra-btn{
    width: 100%;
    justify-content: center;
  }
}

.plans-topbar .extra-actions{
  margin: 0;
  justify-content: center;
}
.plans-topbar .extra-btn{
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  border: 1px solid #f4920e !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  animation: none !important;
}
.plans-topbar .extra-btn:hover{
  background: rgba(244,146,14,0.14) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
@media (max-width: 900px){
  .plans-topbar{ padding: 12px 10px 6px; }
  .plans-topbar .extra-btn{ padding: 9px 14px; font-size: 0.95rem; }
}
.plans-container { 
    display: flex; 
    gap: 28px; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: stretch; 
    width: 100%; 
    max-width: 1200px; 
    margin-bottom: 35px; 
    padding: 0 10px;
}

.plan-card { 
    background: linear-gradient(145deg, #1a1a1a, #151515); 
    border: 2px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 32px 28px; 
    width: 320px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative; 
    min-height: 280px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05); 
    will-change: transform, box-shadow, border-color;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f4920e, transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card:hover { 
    transform: translateY(-8px) scale(1.02); 
    border-color: rgba(244, 146, 14, 0.6); 
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(244, 146, 14, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-title { 
    font-size: 1.65rem; 
    font-weight: 700; 
    margin-bottom: 14px; 
    color: #f4920e; 
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(244, 146, 14, 0.3);
}

.plan-desc { 
    font-size: 1.05rem; 
    color: #b8b8b8; 
    line-height: 1.7; 
    margin-bottom: 24px; 
    font-weight: 400;
}

.plan-btn { 
    background: linear-gradient(135deg, rgba(244, 146, 14, 0.1), rgba(244, 146, 14, 0.05)); 
    border: 2px solid #f4920e; 
    color: #f4920e; 
    padding: 14px 24px; 
    border-radius: 16px; 
    width: 100%; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-top: auto; 
    font-size: 1.1rem; 
    will-change: background, border-color, transform;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.plan-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(244, 146, 14, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.plan-card:hover .plan-btn::before {
    width: 300px;
    height: 300px;
}

.plan-card:hover .plan-btn { 
    background: linear-gradient(135deg, #f4920e, #ffaa33); 
    color: #fff; 
    border-color: #f4920e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(244, 146, 14, 0.4);
}

.plan-card.free-plan { 
    border-color: rgba(255, 255, 255, 0.12); 
    background: linear-gradient(145deg, #141414, #0f0f0f); 
}

.plan-card.free-plan .plan-title { 
    color: #e0e0e0; 
    text-shadow: none;
}

.plan-card.free-plan:hover { 
    border-color: rgba(255, 255, 255, 0.25);
}

.plan-card.free-plan:hover .plan-btn { 
    background: linear-gradient(135deg, #fff, #f0f0f0); 
    color: #000; 
    border-color: #fff;
}

.plan-card.business-plan { 
    border-color: rgba(0, 217, 255, 0.4); 
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.12), rgba(0, 191, 255, 0.06)); 
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2),
                inset 0 1px 0 rgba(0, 217, 255, 0.1);
}

.plan-card.business-plan .plan-title { 
    color: #00d9ff; 
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.7), 
                 0 0 35px rgba(0, 217, 255, 0.5),
                 0 2px 8px rgba(0, 217, 255, 0.3);
}

.plan-card.business-plan:hover { 
    border-color: rgba(0, 255, 255, 0.7); 
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.2), rgba(0, 191, 255, 0.12)); 
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.35), 
                0 0 40px rgba(0, 217, 255, 0.25),
                inset 0 1px 0 rgba(0, 255, 255, 0.2); 
    transform: translateY(-8px) scale(1.02);
}

.plan-card.business-plan:hover .plan-btn { 
    background: linear-gradient(135deg, #00d9ff, #00ffff); 
    color: #000; 
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.5), 
                0 0 30px rgba(0, 217, 255, 0.4); 
    font-weight: 700; 
    border-color: #00ffff;
}

.plan-card.business-plan .plan-btn { 
    border-color: rgba(0, 217, 255, 0.6); 
    color: #00d9ff; 
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 217, 255, 0.05));
}

/* Boh Assistant Pro Plan Styles */
.plan-card.pro-plan { 
    border-color: rgba(0, 217, 255, 0.4); 
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.15), rgba(0, 191, 255, 0.08)); 
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.2),
                inset 0 1px 0 rgba(0, 217, 255, 0.1);
}

.plan-card.pro-plan .plan-title { 
    color: #00d9ff; 
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.7), 
                 0 0 35px rgba(0, 217, 255, 0.5),
                 0 2px 8px rgba(0, 217, 255, 0.3);
}

.plan-card.pro-plan:hover { 
    border-color: rgba(0, 255, 255, 0.7); 
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.2), rgba(0, 191, 255, 0.12)); 
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.35), 
                0 0 40px rgba(0, 217, 255, 0.25),
                inset 0 1px 0 rgba(0, 255, 255, 0.2); 
    transform: translateY(-8px) scale(1.02);
}

.plan-card.pro-plan:hover .plan-btn { 
    background: linear-gradient(135deg, #00d9ff, #00ffff); 
    color: #000; 
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.5), 
                0 0 30px rgba(0, 217, 255, 0.4); 
    font-weight: 700; 
    border-color: #00ffff;
}

.plan-card.pro-plan .plan-btn { 
    border-color: rgba(0, 217, 255, 0.6); 
    color: #00d9ff; 
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 217, 255, 0.05));
}

/* Pro Options Modal */
.pro-options-box {
    max-width: 500px;
    width: 90%;
}

.pro-options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.pro-option-btn {
    width: 100%;
    padding: 18px 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 217, 255, 0.3);
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.08), rgba(0, 191, 255, 0.04));
    color: #fff;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pro-option-btn:hover {
    border-color: rgba(0, 217, 255, 0.6);
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.15), rgba(0, 191, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

.pro-option-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.pro-option-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.extra-actions { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; justify-content: center; align-items: center; }
.extra-btn { padding: 12px 25px; border-radius: 10px; font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: all 0.3s ease; font-size: 1.05rem; }
.btn-buy { background: #12b886; color: #00120e !important; border: 1px solid #26d3a0; }
.btn-buy:hover { background: #19c997; }
.btn-sub { background: transparent; color: #f4920e !important; border: 2px solid #f4920e; }
.btn-home { background: rgba(255,255,255,0.08); color: #fff !important; border: 1px solid rgba(255,255,255,0.2); }
.btn-home:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
.btn-studio { background: #12b886; color: #00120e !important; border: 1px solid #26d3a0; animation: studioPulse 2.4s infinite; }
/* Support Circle Button (Fixed Bottom) - New Design */
.support-circle-btn {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f4920e, #ffaa33);
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(244, 146, 14, 0.4),
                0 0 0 0 rgba(244, 146, 14, 0.7),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: relative;
    overflow: visible;
    animation: supportButtonPulse 2s ease-in-out infinite;
}

.support-circle-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(244, 146, 14, 0.3);
    animation: supportPulseRing 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes supportButtonPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(244, 146, 14, 0.4),
                    0 0 0 0 rgba(244, 146, 14, 0.7),
                    inset 0 0 20px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 25px rgba(244, 146, 14, 0.6),
                    0 0 0 10px rgba(244, 146, 14, 0),
                    inset 0 0 25px rgba(255, 255, 255, 0.15);
        transform: scale(1.05);
    }
}

@keyframes supportPulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.support-circle-btn:hover {
    background: linear-gradient(135deg, #ffaa33, #ffb14a);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 35px rgba(244, 146, 14, 0.6),
                0 0 0 8px rgba(244, 146, 14, 0.2),
                inset 0 0 30px rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    animation: none;
}

.support-circle-btn:active {
    transform: scale(0.95);
}

.support-circle-btn svg {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    animation: supportIconRotate 3s ease-in-out infinite;
}

@keyframes supportIconRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@media (max-width: 900px) {
    .support-circle-btn {
        bottom: 70px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    .support-circle-btn svg {
        width: 28px;
        height: 28px;
    }
}

/* Support Modal - Premium Design */
.support-modal-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.85);
}

.support-modal-box {
    max-width: 480px;
    width: 90%;
    text-align: center;
    position: relative;
    padding: 40px 30px 35px;
    border: 2px solid rgba(34, 197, 94, 0.3);
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.98));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(34, 197, 94, 0.1),
                inset 0 0 40px rgba(34, 197, 94, 0.05);
    animation: supportModalEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes supportModalEnter {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes supportModalExit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.95) rotateX(-5deg);
    }
}

.support-modal-icon-wrapper {
    margin: 0 auto 25px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.15));
    border: 3px solid rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: supportIconFloat 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3),
                inset 0 0 20px rgba(34, 197, 94, 0.1);
}

@keyframes supportIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.support-modal-icon {
    color: #22c55e;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6));
    animation: supportIconPulse 2s ease-in-out infinite;
}

@keyframes supportIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.support-modal-title {
    margin: 0 0 30px 0;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: supportTitleFadeIn 0.5s ease-out 0.2s both;
}

@keyframes supportTitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    animation: supportButtonsFadeIn 0.5s ease-out 0.3s both;
}

@keyframes supportButtonsFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-btn {
    padding: 16px 40px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-width: 130px;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
}

.support-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.support-btn:hover::before {
    width: 300px;
    height: 300px;
}

.support-btn span {
    position: relative;
    z-index: 1;
}

.support-btn-yes {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4),
                0 0 0 0 rgba(34, 197, 94, 0.5);
}

.support-btn-yes:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5),
                0 0 0 4px rgba(34, 197, 94, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.support-btn-yes:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.support-btn-no {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.support-btn-no:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ddd;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.support-btn-no:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.btn-training { background: rgba(255,255,255,0.05); color: #ddd; border: 1px solid #f4920e; cursor: pointer; }
@keyframes studioPulse { 0% { box-shadow: 0 0 0 0 rgba(18,184,134,0.45); } 70%{ box-shadow: 0 0 0 14px rgba(18,184,134,0); } 100%{ box-shadow: 0 0 0 0 rgba(18,184,134,0); } }
.extra-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 25px rgba(0,0,0,0.6); }

.dev-credit { margin-top: auto; font-size: 0.8rem; color: #ffffff; text-decoration: none; padding-bottom: 15px; text-shadow: 0 0 6px rgba(255,255,255,0.5); }

/* Auth - Professional Design */
.auth-box { 
    background: linear-gradient(145deg, #1a1a1a, #151515); 
    padding: 40px 35px; 
    border-radius: 24px; 
    width: 90%; 
    max-width: 420px; 
    border: 2px solid rgba(255, 255, 255, 0.1); 
    text-align: center; 
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(244, 146, 14, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05); 
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-box h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-box #selected-plan-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.auth-input { 
    width: 100%; 
    padding: 16px 18px; 
    margin: 10px 0; 
    background: rgba(15, 15, 15, 0.8); 
    border: 2px solid rgba(255, 255, 255, 0.1); 
    border-radius: 14px; 
    color: #fff; 
    font-size: 1.05rem; 
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: border-color, box-shadow;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-weight: 400;
}

.auth-input:focus {
    outline: none;
    border-color: #f4920e;
    box-shadow: 0 0 0 4px rgba(244, 146, 14, 0.15),
                inset 0 0 20px rgba(244, 146, 14, 0.05);
    background: rgba(20, 20, 20, 0.9);
}

.auth-input::placeholder {
    color: #666;
    font-weight: 400;
}

.enter-btn { 
    background: linear-gradient(135deg, #f4920e, #ffaa33); 
    color: #fff; 
    border: none; 
    padding: 16px 24px; 
    border-radius: 14px; 
    width: 100%; 
    font-weight: 600; 
    font-size: 1.1rem; 
    cursor: pointer; 
    margin-top: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(244, 146, 14, 0.3),
                0 0 0 0 rgba(244, 146, 14, 0.4);
    will-change: transform, box-shadow;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.enter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.enter-btn:hover {
    background: linear-gradient(135deg, #ffaa33, #ffb14a);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(244, 146, 14, 0.4),
                0 0 0 4px rgba(244, 146, 14, 0.2);
}

.enter-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(244, 146, 14, 0.3);
}

.enter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* Loader */
.pro-loader-container { width: 120px; height: 120px; background: #000; border-radius: 12px; border: 1px solid #333; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; }
.cube-wrapper { width: 50px; height: 50px; position: relative; transform-style: preserve-3d; animation: cubeSpin 3s infinite linear; }
.cube-face { position: absolute; width: 50px; height: 50px; border: 2px solid #f4920e; background: rgba(244, 146, 14, 0.1); box-shadow: 0 0 10px #f4920e; }
.face-front { transform: rotateY(0deg) translateZ(25px); } .face-back { transform: rotateY(180deg) translateZ(25px); }
.face-right { transform: rotateY(90deg) translateZ(25px); } .face-left { transform: rotateY(-90deg) translateZ(25px); }
.face-top { transform: rotateX(90deg) translateZ(25px); } .face-bottom { transform: rotateX(-90deg) translateZ(25px); }
.loading-text-pro { display: none; }
@keyframes cubeSpin { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } }

/* -----------------------------
   ✅ Chat Layout + Sidebar
--------------------------------*/
.chat-layout{
  width:100% !important;
  height:100% !important;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  background: radial-gradient(circle at 30% 0%, rgba(244,146,14,0.08), transparent 45%),
              radial-gradient(circle at 70% 100%, rgba(244,146,14,0.06), transparent 55%),
              #0f0f0f;
  overflow: hidden;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
  left: 0 !important;
}

/* Sidebar Desktop (ثابت) */
.side-panel{
  width: 340px;
  height: 100%;
  background: linear-gradient(180deg, #121212, #0f0f0f);
  border-left: 1px solid rgba(244,146,14,0.22);
  display:flex;
  flex-direction:column;
  padding: 14px 14px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  flex-shrink: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Mobile behavior: hidden drawer */
@media (max-width: 900px){
  .side-panel{
    position: fixed;
    top:0;
    right:0;
    z-index: 2000;
    transform: translateX(105%);
    transition: transform .25s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.7);
    width: 86vw;
    max-width: 360px;
  }
  .side-panel.open{ transform: translateX(0); }
}

/* Sidebar header */
.side-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.side-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.side-logo{
  width:44px;
  height:44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  letter-spacing:1px;
  color:#000;
  background: linear-gradient(135deg, #f4920e, #ffb14a);
  box-shadow: 0 10px 20px rgba(244,146,14,0.15);
}
.side-title{ font-weight:800; font-size:1rem; color:#fff; }
.side-sub{ font-size:0.78rem; color:#888; margin-top:2px; }

.side-close-btn{
  display:none;
  width:38px;
  height:38px;
  border-radius: 12px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(244,146,14,0.08);
  color:#f4920e;
  cursor:pointer;
}
@media (max-width: 900px){
  .side-close-btn{ display:flex; align-items:center; justify-content:center; }
}

/* Balance card */
.side-balance-card{
  margin-top: 12px;
  padding: 12px 12px;
  background: linear-gradient(145deg, rgba(244,146,14,0.10), rgba(0,0,0,0.25));
  border: 1px solid rgba(244,146,14,0.22);
  border-radius: 14px;
}
.side-balance-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.side-balance-label{ color:#bbb; font-size:0.9rem; }
.side-balance-val{
  color:#f4920e;
  font-weight:900;
  font-size:1.05rem;
}
.points-buy-btn{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(244,146,14,0.12);
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: .2s;
  width:100%;
}
.points-buy-btn:hover{
  background:#f4920e;
  color:#000;
  box-shadow: 0 10px 25px rgba(244,146,14,0.12);
}

/* Sidebar switch (Models / Archive) */
.side-switch{
  display:flex;
  gap:8px;
  margin-top: 10px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ✅ زر التدريب في القائمة الجانبية - تصميم جديد */
.side-training-btn{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  color: #fff;
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(244,146,14,0.15);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-training-btn::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.side-training-btn:hover::before{
  left: 100%;
}

.side-training-btn:hover{
  background: linear-gradient(135deg, rgba(244,146,14,0.35), rgba(244,146,14,0.22));
  box-shadow: 0 4px 12px rgba(244,146,14,0.25);
  transform: translateY(-2px);
}

.side-training-btn:active{
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(244,146,14,0.2);
}

.side-training-btn .training-icon{
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.side-training-btn span:not(.training-icon){
  position: relative;
  z-index: 1;
}
.side-switch-btn{
  flex:1;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: 0.18s ease;
}
.side-switch-btn:hover{
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.side-switch-btn.active{
  background: rgba(244,146,14,0.18);
  border-color: rgba(244,146,14,0.55);
  color: #fff;
  box-shadow: 0 10px 24px rgba(244,146,14,0.10);
}
#side-section-archive{ display:none; }



/* Sections */
.side-section{ margin-top: 14px; display:flex; flex-direction:column; gap:10px; }
.side-section-title{
  color:#f4920e;
  font-weight:800;
  font-size:0.95rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.row-between{ justify-content:space-between; }

/* Models list */
.side-models{
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow: visible;
  padding-right: 2px;
  max-height: none;
}
.model-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color:#ddd;
  cursor:pointer;
  transition: .2s;
  text-align:right;
}
.model-item:hover{
  border-color: rgba(244,146,14,0.35);
  background: rgba(244,146,14,0.08);
  transform: translateY(-1px);
}
.model-item.active{
  border-color: rgba(244,146,14,0.60);
  background: linear-gradient(145deg, rgba(244,146,14,0.16), rgba(0,0,0,0.30));
}
/* ✅ منع ظهور active على training-item - لا يظهر أي إطار حتى لو كان active */
.model-item.training-item.active {
  border-color: rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  box-shadow: none !important;
  transform: none !important;
}
.m-ico{ font-size: 1.15rem; width:26px; display:flex; justify-content:center; }
.m-txt{ flex:1; font-weight:700; font-size:0.95rem; color:#fff; }
.m-hint{
  font-size:0.75rem;
  color:#999;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.model-item.soon{
  opacity: .75;
  cursor:not-allowed;
}
.m-badge{
  font-size:0.72rem;
  font-weight:900;
  color:#000;
  background: linear-gradient(135deg, #f4920e, #ffb14a);
  padding: 4px 8px;
  border-radius: 999px;
}

/* History area */
.side-history{
  flex: 1;
  min-height: 0;
}
.history-tabs { display: flex; width: 100%; background: #1a1a1a; border-radius: 12px; padding: 4px; border: 1px solid #333; }
.h-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-radius: 10px; color: #888; transition: 0.2s; font-size: 0.95rem; font-weight: bold; }
.h-tab.active { background: #f4920e; color: #fff; }
.history-counter { font-size:0.8rem; background:#222; padding:2px 10px; border-radius:10px; color:#aaa; border:1px solid rgba(255,255,255,0.08); }

.clear-gallery-btn { width: 100%; background: rgba(255,255,255,0.03); color: #ff6b6b; border: 1px dashed rgba(255,107,107,0.6); padding: 12px; cursor: pointer; border-radius: 12px; font-size: 0.95rem; }
.clear-gallery-btn:hover{ background: rgba(255,107,107,0.08); }

.history-list { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow:auto; padding-right: 2px;   max-height: 56vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.history-item { position: relative; background: #1e1e1e; border-radius: 12px; overflow: hidden; border: 1px solid #333; flex-shrink: 0; }
.hist-img { width: 100%; height: 140px; object-fit: cover; cursor: pointer; display:block; }
.hist-del-btn-pro { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,77,77,0.85); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }

.chat-hist-item {
  background: #1e1e1e;
  border-radius: 12px;
  border: 1px solid #333;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  position: relative;
}
.chat-hist-item:hover{
  background:#252525;
  border-color:#f4920e;
  transform: translateX(-3px);
  box-shadow: 0 8px 18px rgba(244,146,14,0.08);
}
.chi-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid #333; }
.chi-header span{ color:#f4920e; font-size:0.85rem; font-weight:500; }
.chi-preview{
  color:#ccc;
  font-size:0.95rem;
  line-height:1.5;
  max-height:80px;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}

/* Pin buttons */
.hist-pin-btn,
.chat-pin-btn{
  position:absolute;
  top:8px;
  left:8px;
  width:28px;
  height:28px;
  border-radius:50%;
  background: rgba(0,0,0,0.6);
  border:1px solid rgba(244,146,14,0.6);
  color:#f4920e;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:0.9rem;
  transition:0.2s;
  z-index:3;
}
.chat-pin-btn{ right:8px; left:auto; }
.hist-pin-btn.pinned,
.chat-pin-btn.pinned{ background: rgba(244,146,14,0.2); }
.hist-pin-btn:hover,
.chat-pin-btn:hover{ background: rgba(244,146,14,0.3); }
.history-item.pinned,
.chat-hist-item.pinned{ border-color:#f4920e; box-shadow: 0 0 10px rgba(244,146,14,0.25); }

.chat-del-btn{
  position:absolute;
  top:8px;
  left:8px;
  width:28px;
  height:28px;
  border-radius:50%;
  background: transparent;
  border: 1px solid #333;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:3;
}
.chat-del-btn svg{ width:16px; height:16px; }
.chat-del-btn:hover{ border-color:#ff4d4d; }

/* Main area */
.chat-main{
  flex: 1;
  min-width: 0;
  display:flex;
  flex-direction:column;
  height:100%;
  overflow: hidden;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  top: 0 !important;
}

/* Header - Professional Design */
.chat-header { 
  width: 100%; 
  margin: 0; 
  padding: 14px 20px; 
  background: transparent; 
  border-bottom: 2px solid rgba(244, 146, 14, 0.2); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  flex-shrink: 0; 
  gap: 12px; 
  z-index: 50; 
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  position: relative;
  box-sizing: border-box;
  top: 0;
  left: 0;
  right: 0;
}
.mode-display-btn { background: rgba(244, 146, 14, 0.08); border: 1px solid #f4920e; color: #f4920e; padding: 8px 20px; border-radius: 20px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.header-icon-btn { background: rgba(255,255,255,0.05); padding: 8px; border-radius: 14px; color: #ddd; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06); }
.header-icon-btn:hover{ border-color: rgba(244,146,14,0.25); background: rgba(244,146,14,0.07); }
.mobile-only{ display:none; }
@media (max-width:900px){
  .mobile-only{ display:flex; }
}

/* Chat body - Professional Design */
.chat-container-outer { 
  flex: 1; 
  width: 100%; 
  overflow-y: auto; 
  overflow-x: hidden;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  scroll-behavior: smooth; 
  background: linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 50%, #0f0f0f 100%);
  position: relative;
  min-height: 0;
  box-sizing: border-box;
  padding-top: 0;
  margin-top: 0;
}

.chat-container-outer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(244, 146, 14, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.chat-body { 
  width: 100%; 
  max-width: 900px; 
  padding: 0 20px 24px; 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  flex: 1; 
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 0;
}

/* Messages - Professional Design */
.message { 
  max-width: 85%; 
  padding: 16px 20px; 
  border-radius: 18px; 
  line-height: 1.7; 
  font-size: 1.05rem; 
  position: relative; 
  white-space: pre-wrap; 
  word-wrap: break-word;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.msg-user { 
  align-self: flex-start; 
  background: linear-gradient(145deg, rgba(40, 40, 40, 0.95), rgba(30, 30, 30, 0.95)); 
  border: 2px solid rgba(255, 255, 255, 0.1); 
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.msg-bot { 
  align-self: flex-end; 
  background: linear-gradient(145deg, rgba(20, 18, 9, 0.95), rgba(15, 12, 6, 0.95)); 
  border: 2px solid rgba(244, 146, 14, 0.3); 
  border-bottom-left-radius: 4px; 
  color: #eee;
  box-shadow: 0 4px 16px rgba(244, 146, 14, 0.15),
              inset 0 1px 0 rgba(244, 146, 14, 0.1);
}

.msg-actions { position: absolute; bottom: -12px; left: 0; display: flex; gap: 5px; z-index: 5; }
.msg-user .msg-actions { left: auto; right: 0; }
.action-mini-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; cursor: pointer; color: #888; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.action-mini-btn:hover { color: #f4920e; border-color: #f4920e; background: rgba(244, 146, 14, 0.1); }
.action-mini-btn svg { width: 13px; height: 13px; }

.chat-img-thumb-user { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #555; cursor: pointer; }
.chat-img-bot { max-width: 100%; max-height: 400px; object-fit: contain; border-radius: 10px; border: 1px solid #444; margin-top: 10px; cursor: pointer; display: block; }

.bot-h1, .bot-h2, .bot-h3 { color: #f4920e; margin: 15px 0 10px; font-weight: bold; border-bottom: 1px solid rgba(244,146,14,0.3); padding-bottom: 4px; }
.table-wrapper { width: 100%; overflow-x: auto; margin: 15px 0; border-radius: 10px; border: 1px solid #444; }
.pro-table { width: 100%; border-collapse: collapse; min-width: 500px; background: #1e1e1e; font-size: 0.95rem; }
.pro-table th { background: #333; color: #f4920e; padding: 12px; border: 1px solid #555; text-align: right; }
.pro-table td { border: 1px solid #555; padding: 10px; color: #ddd; }

.bot-action-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; border-top: 0; padding-top: 6px; }
.bot-action-btn {
  background: rgba(244, 146, 14, 0.1);
  color: #fff;
  border: 1px solid #f4920e;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.25s;
  width: auto;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bot-action-btn:hover {
  background: #f4920e;
  color: #000;
  box-shadow: 0 0 12px rgba(244, 146, 14, 0.35);
  transform: translateY(-2px);
}
.bot-action-btn.primary { background: #f4920e; color: #000; border-color: #f4920e; }
.bot-action-btn.primary:hover { background: #ffaa33; }

/* Footer */
.chat-footer-wrapper { width: 100%; background: rgba(22,22,22,0.98); border-top: 1px solid #333; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding-bottom: 10px; backdrop-filter: blur(10px); }


/* Image action buttons (small, orange, white) */
.bot-action-btn.img-action-btn{
  background: transparent !important;
  color: #fff !important;
  border: 1px solid #f4920e !important;
  padding: 4px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
  min-height: unset !important;
}
.bot-action-btn.img-action-btn svg{ width: 14px; height: 14px; stroke: currentColor; fill: none; }
.bot-action-btn.img-action-btn:hover{
  background: rgba(244,146,14,0.14) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.bot-action-buttons{ gap: 8px; }

.chat-footer { 
  width: 100%; 
  max-width: 900px; 
  padding: 20px; 
  display: flex; 
  gap: 12px; 
  align-items: flex-end;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 15, 0.8) 100%);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.chat-input-area { 
  flex: 1; 
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.95)); 
  border: 2px solid rgba(255, 255, 255, 0.1); 
  color: #fff; 
  padding: 14px 18px; 
  border-radius: 18px; 
  outline: none; 
  font-size: 1.05rem; 
  min-width: 0; 
  resize: none; 
  min-height: 54px; 
  max-height: 140px; 
  overflow-y: auto; 
  font-family: inherit; 
  line-height: 1.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chat-input-area:focus { 
  border-color: #f4920e; 
  background: linear-gradient(145deg, rgba(25, 25, 25, 0.98), rgba(20, 20, 20, 0.98));
  box-shadow: 0 6px 24px rgba(244, 146, 14, 0.2),
              0 0 0 4px rgba(244, 146, 14, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.action-btn { 
  width: 54px; 
  height: 54px; 
  border-radius: 16px; 
  border: none; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
  color: white; 
  background: linear-gradient(135deg, #f4920e, #ffaa33);
  box-shadow: 0 6px 20px rgba(244, 146, 14, 0.4),
              0 0 0 0 rgba(244, 146, 14, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.action-btn:hover {
  background: linear-gradient(135deg, #ffaa33, #ffb14a);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(244, 146, 14, 0.5),
              0 0 0 4px rgba(244, 146, 14, 0.2);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(244, 146, 14, 0.4);
}
.action-btn:disabled { opacity: 0.5; background: #555; }
.btn-upload { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); }
.btn-upload.has-file { background: #4dc91a; border-color: #4dc91a; }
.hidden { display: none !important; }

.preview-thumbs-container { display: flex; gap: 10px; overflow-x: auto; padding: 10px 5px 5px; }
.thumb-wrapper { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.thumb-img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; border: 1px solid #555; }
.thumb-remove { position: absolute; top: -8px; right: -8px; background: #ff0000; color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Lightbox & modals */
.lightbox-overlay, .modal-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.95); 
  z-index: 100000; 
  display: none; 
  align-items: center; 
  justify-content: center; 
  backdrop-filter: blur(5px);
  /* ✅ تحسين الأداء */
  will-change: display;
  transform: translateZ(0);
}
.lightbox-overlay.show { display: flex; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; width: 100%; height: 95%; justify-content: center; }
.lightbox-img { max-width: 95%; max-height: 85%; object-fit: contain; border-radius: 10px; margin-bottom: 20px; border: 1px solid rgba(244,146,14,0.18); }
.lb-action-btn { background:#222; border:1px solid #444; color:#fff; padding:8px 16px; border-radius:20px; cursor:pointer; margin:0 5px; font-size:0.9rem; }

.modal-box { background: #1c1c1c; width: 90%; max-width: 420px; border-radius: 18px; padding: 25px; border: 1px solid #f4920e; text-align: center; position: relative; max-height: 90vh; overflow-y:auto; }
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 30px;
  border-radius: 8px;
  background: rgba(244, 146, 14, 0.1);
  border: 1px solid #f4920e;
  color: #f4920e;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: 0.2s;
  z-index: 100001;
}
.modal-close:hover { opacity: 1; background: #f4920e; color: #000; }

/* Language selection modal */
.lang-modal-box{
  max-width: 420px;
}
.lang-options{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}
.lang-btn{
  flex:1 1 130px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(244,146,14,0.55);
  background:rgba(244,146,14,0.12);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  /* ✅ تحسين الأداء والسرعة */
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, background;
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.lang-btn:hover{
  transform:translateY(-1px);
  background:rgba(244,146,14,0.18);
}
.lang-btn:active{
  transform:translateY(0);
  transition: all 0.05s;
}
.lang-btn-ar{}
.lang-btn-en{}
.lang-flag{
  font-size:1.2rem;
}
.lang-toggle-wrap{
  display:flex;
  gap:4px;
  align-items:center;
  justify-content:flex-end;
}
.lang-toggle-btn{
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.03);
  color:#ddd;
  padding:4px 8px;
  font-size:0.75rem;
  cursor:pointer;
}
.lang-toggle-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.18);
  color:#fff;
}

/* BOQ */
#boq-modal .modal-box { max-width: 900px; text-align: right; overflow-y: auto; padding-top: 0; position: relative; }
.boq-modal-header { position: sticky; top: 0; background: #1c1c1c; z-index: 100; padding: 15px 25px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 20px; }
.boq-header-content { display: flex; align-items: center; gap: 20px; width: 100%; justify-content: flex-start; }
.boq-header-title { color: #f4920e; font-size: 1.4rem; font-weight: bold; margin: 0; flex-grow: 1; text-align: center; }
#boq-modal .modal-close { position: static; margin-left: 0; flex-shrink: 0; }
#boq-modal .modal-box > h3 { display: none; }

.boq-content-wrapper { padding: 0 25px 25px; }
.boq-section { margin-top:15px; padding:12px 10px; border-radius:12px; background:#111; border:1px solid #333; }
.boq-section-title { font-weight:bold; color:#f4920e; margin-bottom:8px; font-size:0.95rem; }
.boq-field { margin-bottom:8px; display:flex; flex-direction:column; gap:4px; }
.boq-field label { font-size:0.9rem; color:#ccc; }
.boq-field input, .boq-field select, .boq-field textarea { background:#0f0f0f; border:1px solid #444; border-radius:8px; padding:8px 10px; color:#fff; font-size:0.9rem; }
.boq-field textarea { resize:vertical; min-height:50px; }
.boq-inline { display:flex; gap:8px; } .boq-inline .boq-field { flex:1; }
.boq-room-block, .boq-item-block { margin-top:8px; padding:8px 10px; border-radius:8px; background:#151515; border:1px solid #333; font-size:0.9rem; }
.boq-room-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; color:#eee; font-weight:bold; }
.boq-master-options { margin-top:6px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:0.85rem; }
.boq-footer-actions { margin-top:14px; display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; }
.boq-submit-btn { background:#f4920e; color:#000; border:none; padding:10px 20px; border-radius:999px; cursor:pointer; font-weight:bold; font-size:1rem; width: auto; }
.boq-skip-btn { background:transparent; border:none; color:#aaa; cursor:pointer; font-size:0.85rem; text-decoration:underline; }

.boq-checkboxes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.boq-checkbox-label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #222; border-radius: 6px; cursor: pointer; border: 1px solid #333; transition: 0.2s; font-size: 0.9rem; }
.boq-checkbox-label:hover { background: #333; }
.boq-checkbox-label input[type="checkbox"] { accent-color: #f4920e; width: 16px; height: 16px; flex-shrink: 0; }

/* typing */
.typing-dots { display:flex; align-items:center; justify-content:center; gap:4px; padding:8px 0; }
.typing-dots span { width:6px; height:6px; border-radius:50%; background:#f4920e; opacity:0.2; animation: typingBlink 1s infinite; }
.typing-dots span:nth-child(2){ animation-delay:0.2s; } .typing-dots span:nth-child(3){ animation-delay:0.4s; }
@keyframes typingBlink { 0%,80%,100%{ transform:translateY(0); opacity:0.2; } 40%{ transform:translateY(-3px); opacity:1; } }

/* Fly animation */
.fly-img-clone { position: fixed; z-index: 100000; border-radius: 50%; border: 2px solid #f4920e; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); box-shadow: 0 0 15px #f4920e; }
.badge-pop { animation: badgePop 0.3s ease; }
@keyframes badgePop { 0% { transform: scale(1); } 50% { transform: scale(1.4); color: #f4920e; } 100% { transform: scale(1); } }

/* Saved msg */
#saved-msg-modal .modal-box { max-width:700px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; padding: 25px; position: relative; }
#saved-msg-modal .modal-close { position: absolute; top: 15px; right: 15px; z-index: 10; }
#saved-msg-modal .modal-box > h3 { position: sticky; top: 0; z-index: 9; background: #1c1c1c; padding: 15px 0 10px; margin: 0 0 20px; border-bottom: 1px solid rgba(244, 146, 14, 0.3); }
#saved-msg-content { flex-grow: 1; overflow-y: auto; padding: 20px; background: rgba(30, 30, 30, 0.5); border-radius: 12px; border: 1px solid rgba(244, 146, 14, 0.1); width: 100%; }

/* Mobile tweaks */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .chat-header { padding: 8px 12px; }
  .mode-display-btn { padding: 6px 15px; font-size: 0.9rem; }
  .chat-body { padding: 15px 10px; }
  .message { max-width: 95%; font-size: 1rem; padding: 12px 15px; }
  .plan-card { width: 100%; margin-bottom: 15px; min-height: auto; }
  .auth-box { padding: 20px; }
  .boq-checkboxes-grid { grid-template-columns: 1fr; }
  .boq-modal-header { padding: 12px 15px; }
  .boq-header-title { font-size: 1.2rem; }
  .boq-content-wrapper { padding: 0 15px 20px; }
}


/* ==========================================================
   ✅ BOH PATCH (UI polish + Plans tables + Mobile sidebar scroll)
   (Added without removing any existing styles)
========================================================== */

/* ---- Plans: Features tables ---- */
.boh-features-wrap{
  width: 100%;
  max-width: 1200px;
  margin: 30px auto 40px;
  padding: 32px 28px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.98));
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: visible;
  display: block;
}

.boh-features-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(244, 146, 14, 0.6), transparent);
  opacity: 0.6;
}

.boh-features-head{ 
  text-align: center; 
  margin-bottom: 24px; 
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.boh-features-title{
  font-weight: 700;
  font-size: 1.6rem;
  color: #f4920e;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(244, 146, 14, 0.4);
  margin-bottom: 12px;
}

.boh-features-sub{
  margin-top: 10px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  font-weight: 400;
}
.boh-features-table-wrapper{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-top: 12px;
}
.boh-features-table,
.boh-features-detail{
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(20,20,20,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.boh-features-table thead th,
.boh-features-detail thead th{
  background: rgba(244,146,14,0.12);
  color: #fff;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: right;
}
.boh-features-table td,
.boh-features-detail td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  vertical-align: top;
}
.boh-features-table tbody tr:hover td,
.boh-features-detail tbody tr:hover td{
  background: rgba(255,255,255,0.03);
}
.boh-features-table .feat-col{ width: 44%; }
.boh-features-table .plan-col{ width: 18.666%; text-align:center; }
.boh-features-table td.ok{ text-align:center; font-weight: 900; color: #e9ffe2; }
.boh-features-table td.lock{ text-align:center; font-weight: 900; color: rgba(255,255,255,0.65); }
.boh-features-detail .sec-title{
  font-weight: 900;
  color: #f4920e;
  width: 30%;
  white-space: nowrap;
}
.boh-features-detail ul{
  margin: 0;
  padding: 0 18px 0 0;
  line-height: 1.9;
}
.boh-features-detail li{ margin: 2px 0; }
.boh-features-note{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(244,146,14,0.18);
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
}
.boh-features-note span{ color:#f4920e; font-weight: 900; }


/* ---- Plans: BOH feature cards (6 cards grid) ---- */
.boh-cards-grid{
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}
@media (max-width: 980px){
  .boh-cards-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .boh-cards-grid{ grid-template-columns: 1fr; }
}
.boh-feature-card{
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(244,146,14,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.boh-feature-card:hover{
  transform: translateY(-2px);
  border-color: rgba(244,146,14,0.45);
  background: rgba(244,146,14,0.06);
}
.boh-card-title{
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
}
.boh-card-emoji{
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
}
.boh-card-list{
  margin: 0;
  padding: 0 18px 0 0;
  line-height: 1.9;
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
}
.boh-card-list li{ margin: 2px 0; }

/* ---- Premium model switching (fast + professional) ---- */
#boh-model-switch-fx{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(0.985);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.9,.2,1);
}
#boh-model-switch-fx.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.boh-ms-card{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(15,15,15,0.78);
  box-shadow: 0 14px 38px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.boh-ms-ico{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(244,146,14,0.28), rgba(244,146,14,0.10));
  border: 1px solid rgba(244,146,14,0.22);
}
.boh-ms-kicker{
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 2px;
}
.boh-ms-name{
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #fff;
  font-size: 14px;
}

@media (max-width: 900px){
  #boh-model-switch-fx{ top: 12px; }
  .boh-ms-card{ border-radius: 14px; padding: 9px 12px; }
  .boh-ms-ico{ width: 36px; height: 36px; border-radius: 11px; }
  .boh-ms-name{ font-size: 13px; }
}
/* ---- Message bubbles: tighter frames + animation ---- */
@keyframes bohMsgIn{
  from{ opacity: 0; transform: translateY(10px) scale(0.985); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.message{
  width: fit-content;
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 14px;
  animation: bohMsgIn .26s ease-out;
}
@media (max-width: 900px){
  .message{ max-width: 88%; padding: 11px 13px; }
}

/* ---- Image Frame Wrapper (Super Boh & Nano Banana) ---- */
.image-frame-wrapper{
  display: inline-block;
  margin: 10px 0;
  max-width: 100%;
  animation: frameFadeIn 0.4s ease-out;
}

@keyframes frameFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.image-frame{
  display: inline-block;
  border: 2px solid rgba(244,146,14,0.4);
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(0,0,0,0.4), rgba(20,20,20,0.3));
  box-shadow: 0 10px 30px rgba(0,0,0,0.5),
              0 0 0 1px rgba(244,146,14,0.1) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.image-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(244,146,14,0.1), transparent);
  transition: left 0.6s ease;
}

.image-frame:hover::before {
  left: 100%;
}

.image-frame:hover{
  border-color: rgba(244,146,14,0.7);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6),
              0 0 20px rgba(244,146,14,0.2),
              0 0 0 1px rgba(244,146,14,0.2) inset;
  transform: translateY(-2px);
}

/* ---- Image replies: smaller + premium frame, tap to zoom stays ---- */
.chat-img-bot{
  width: min(520px, 100%);
  max-width: 520px;
  max-height: 420px;
  border: none;
  border-radius: 14px;
  display: block;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
  object-fit: contain;
  animation: imageSlideIn 0.5s ease-out;
}

@keyframes imageSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chat-img-bot:hover{
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(244,146,14,0.15);
}

@media (max-width: 900px){
  .chat-img-bot{ 
    width: min(340px, 100%); 
    max-width: 340px; 
  }
  .image-frame{
    padding: 6px;
  }
}

/* ---- Bot action buttons under images: smaller + more consistent ---- */
.bot-action-btn{
  padding: 6px 12px;
  font-size: 0.88rem;
  gap: 6px;
}
.bot-action-btn svg{ width: 14px; height: 14px; }

/* ---- Mobile: make the whole sidebar scrollable (archive swipe up/down) ---- */
@media (max-width: 900px){
  .side-panel{
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .history-list{
    overflow: visible;
  }
}


/* =========================================================
   2025-12 UI Refresh (Plans + Animations + Unified Errors)
========================================================= */

/* Smooth view transitions */
#boh-ai-app .boh-view{
  opacity:0;
  transform: translateY(14px) scale(0.99);
  /* ✅ تحسين الأداء */
  will-change: opacity, transform;
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
#boh-ai-app .boh-view.active{
  opacity:1;
  transform: translateY(0) scale(1);
}

/* Subtle message reveal */
.message{
  animation: msgIn 220ms ease both;
}
@keyframes msgIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Mode label micro-animation */
.mode-flash{
  animation: modeFlash 650ms ease;
}
@keyframes modeFlash{
  0%{ transform: translateY(0); filter: brightness(1); }
  35%{ transform: translateY(-2px); filter: brightness(1.12); }
  100%{ transform: translateY(0); filter: brightness(1); }
}

/* Unified error blocks */
.uerr{
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(16,16,16,0.85);
  border-radius: 16px;
  padding: 14px 14px;
  line-height: 1.7;
}
.uerr__title{
  font-weight: 800;
  margin-bottom: 6px;
  color: #f4920e;
}
.uerr__text{
  color: rgba(255,255,255,0.86);
  font-size: 0.95rem;
}
.uerr--nopoints{
  border-color: rgba(244,146,14,0.55);
}
.uerr--system{
  border-color: rgba(244,146,14,0.35);
}

/* Buy points button (modern) */
.points-buy-btn{
  margin-top: 10px;
  border: 1px solid #f4920e;
  background: rgba(244,146,14,0.12);
  color: #f4920e;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}
.points-buy-btn:hover{
  transform: translateY(-1px);
  background: rgba(244,146,14,0.18);
}
.points-buy-btn:active{ transform: translateY(0); opacity: 0.92; }

/* Image action buttons (modern, compact) */
.bot-action-row{
  display:flex;
  gap:10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.bot-action-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.bot-action-btn svg{ opacity: 0.95; }
.bot-action-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}
.bot-action-btn.primary{
  background: rgba(244,146,14,0.16);
  border-color: rgba(244,146,14,0.55);
  color: #ffd7a6;
}
.bot-action-btn.primary:hover{
  background: rgba(244,146,14,0.22);
  border-color: rgba(244,146,14,0.70);
}

/* -------------------------
   Plans Screen (new layout)
------------------------- */
.plans-shell{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 22px 12px 30px;
  display:flex;
  flex-direction: column;
  gap: 18px;
}
.plans-hero{
  padding: 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: radial-gradient(900px 300px at 10% 0%, rgba(244,146,14,0.14), rgba(0,0,0,0) 60%),
              radial-gradient(900px 400px at 100% 0%, rgba(255,255,255,0.05), rgba(0,0,0,0) 55%),
              rgba(18,18,18,0.55);
}
.hero-kicker{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244,146,14,0.40);
  background: rgba(244,146,14,0.10);
  color: #f4920e;
  font-weight: 900;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.hero-title{
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  letter-spacing: 0.2px;
}
.hero-sub{
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
}
.hero-badges{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.hero-badge{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  font-size: 0.82rem;
}

.plan-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.plan-card2{
  border-radius: 20px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,20,0.65);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.plan-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.plan-name{
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 1.15rem;
}
.plan-tag{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-weight: 900;
  white-space: nowrap;
}
.plan-tag.hot{
  border-color: rgba(244,146,14,0.55);
  background: rgba(244,146,14,0.13);
  color: #ffd7a6;
}
.plan-tag.outline{
  border-style: dashed;
  border-color: rgba(244,146,14,0.45);
  background: rgba(244,146,14,0.06);
  color: rgba(255,255,255,0.88);
}
.plan-points{
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  font-size: 0.92rem;
}
.plan-feats{
  margin: 0;
  padding: 0 18px 0 0;
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  font-size: 0.92rem;
}
.plan-feats li{ margin: 0; }
.plan-cta{
  margin-top: 4px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(244,146,14,0.40);
  background: rgba(244,146,14,0.10);
  color: #f4920e;
  font-weight: 950;
  padding: 11px 12px;
  cursor:pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.plan-cta:hover{
  transform: translateY(-1px);
  background: rgba(244,146,14,0.16);
  border-color: rgba(244,146,14,0.60);
}
.plan-cta.primary{
  background: rgba(244,146,14,0.18);
  border-color: rgba(244,146,14,0.72);
  color: #ffd7a6;
}

.section-title{
  font-weight: 950;
  font-size: 1.08rem;
  margin-top: 4px;
}
.section-sub{
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
}

.compare-table-wrap{
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}
.compare-table{
  width: 100%;
  border-collapse: collapse;
  background: rgba(18,18,18,0.55);
}
.compare-table th,
.compare-table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.compare-table th:first-child,
.compare-table td:first-child{
  text-align: right;
}
.compare-table thead th{
  color: rgba(255,255,255,0.92);
  font-weight: 950;
  background: rgba(255,255,255,0.04);
}
.compare-table .ok{ color: #9be26f; font-weight: 950; }
.compare-table .lock{ color: rgba(255,255,255,0.55); }

.value-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.value-card{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,20,0.55);
  border-radius: 18px;
  padding: 14px 14px;
}
.value-ico{
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.value-title{
  font-weight: 950;
  margin-bottom: 6px;
}
.value-card ul{
  margin: 0;
  padding: 0 18px 0 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.9;
}

.plans-foot{
  margin-top: 4px;
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
}
.plans-foot .muted{ color: rgba(255,255,255,0.55); }

/* Responsive */
@media (max-width: 950px){
  .plan-grid{ grid-template-columns: 1fr; }
  .value-grid{ grid-template-columns: 1fr; }
}


/* Premium loader (replaces cube) */
.boh-view--loading{
  background: radial-gradient(circle at 50% 20%, rgba(244,146,14,0.12), transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05), transparent 55%),
              linear-gradient(180deg, #000 0%, #070707 100%);
}
.boh-loader-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 14px;
}
.boh-loader{
  width: 92px;
  height: 92px;
  display:grid;
  place-items:center;
  position: relative;
}
.boh-loader-ring{
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.10);
  border-top-color: rgba(244,146,14,0.95);
  animation: bohSpin 720ms linear infinite;
  box-shadow: 0 18px 40px rgba(0,0,0,0.65);
}
@keyframes bohSpin{ to{ transform: rotate(360deg); } }

.boh-loader-line{
  position:absolute;
  bottom: -8px;
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow:hidden;
  border: 1px solid rgba(244,146,14,0.15);
}
.boh-loader-line span{
  display:block;
  height:100%;
  width: 42%;
  border-radius: 999px;
  background: rgba(244,146,14,0.9);
  animation: bohLine 840ms ease-in-out infinite;
}
@keyframes bohLine{
  0%{ transform: translateX(-115%); opacity: .35; }
  35%{ opacity: 1; }
  100%{ transform: translateX(250%); opacity: .55; }
}

.boh-loader-title{
  margin: 0;
  color:#f4920e;
  font-size: 1.25rem;
  letter-spacing: .3px;
}
.boh-loader-sub{
  color: rgba(255,255,255,0.70);
  font-size: 0.95rem;
}


.plans-topbar .extra-btn:hover{ background: rgba(244,146,14,0.14); transform: translateY(-1px); }
.plans-topbar .extra-btn svg{ stroke: currentColor; fill: none; }
.plans-topbar .extra-btn svg path{ fill: currentColor; }


/* ==========================================================
   ✅ Comparison Table (Professional Grid)
========================================================== */
.boh-features-table-wrapper{ width:100%; overflow:auto; }
.boh-compare-table{
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(244,146,14,0.35);
  border-radius: 14px;
  overflow: hidden;
}
.boh-compare-table thead th{
  background: rgba(244,146,14,0.10);
  color: #fff;
  font-weight: 900;
  padding: 12px 12px;
  border: 1px solid rgba(244,146,14,0.35);
}
.boh-compare-table td{
  padding: 10px 12px;
  border: 1px solid rgba(244,146,14,0.25);
  vertical-align: middle;
}
.boh-compare-table .col-feature{ text-align: right; font-weight: 800; color:#fff; }
.boh-compare-table .col-plan{ text-align: center; width: 140px; }
.boh-compare-table .cell-ok{ text-align:center; font-weight: 900; color: #e9ffe2; }
.boh-compare-table .cell-lock{ text-align:center; font-weight: 900; color: rgba(255,255,255,0.65); }
.boh-compare-table tbody tr:nth-child(even){ background: rgba(255,255,255,0.03); }
.boh-compare-table .row-sep td{ border-top: 2px solid rgba(244,146,14,0.35); }

/* Mobile: keep readable */
@media (max-width: 768px){
  .boh-compare-table{ min-width: 560px; }
}

/* ==========================================================
   ✅ Unified Action Buttons (Images + BOQ)
========================================================== */
.boh-action-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  justify-content: flex-start;
}

/* Image Actions Container (for Super Boh & Nano Banana) */
.image-actions-container{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 4px;
  animation: buttonsFadeIn 0.5s ease-out 0.2s both;
}

@keyframes buttonsFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.boh-action-btn{
  display: inline-flex;
  flex-direction: row-reverse; /* text aligned right in RTL */
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(244,146,14,0.5);
  background: linear-gradient(145deg, rgba(244,146,14,0.15), rgba(244,146,14,0.08));
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255,255,255,0.25);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  width: auto;
  min-width: fit-content;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2),
              0 0 0 0 rgba(244,146,14,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.boh-action-btn:visited{
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.boh-action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.boh-action-btn:hover::before {
  width: 300px;
  height: 300px;
}

.boh-action-btn:hover{ 
  background: linear-gradient(145deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  border-color: rgba(244,146,14,0.75);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(244,146,14,0.3),
              0 0 0 4px rgba(244,146,14,0.1);
}

.boh-action-btn:active{ 
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(244,146,14,0.2);
}

.boh-action-btn:focus{ 
  outline: none; 
  box-shadow: 0 0 0 3px rgba(244,146,14,0.25);
}

.boh-action-btn.primary{
  background: linear-gradient(145deg, rgba(244,146,14,0.25), rgba(244,146,14,0.15));
  border-color: rgba(244,146,14,0.8);
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(244,146,14,0.25),
              0 0 0 0 rgba(244,146,14,0.4);
  animation: primaryPulse 2s ease-in-out infinite;
}

@keyframes primaryPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(244,146,14,0.25),
                0 0 0 0 rgba(244,146,14,0.4);
  }
  50% {
    box-shadow: 0 4px 16px rgba(244,146,14,0.35),
                0 0 0 4px rgba(244,146,14,0.2);
  }
}

.boh-action-btn.primary:hover{
  background: linear-gradient(145deg, rgba(244,146,14,0.35), rgba(244,146,14,0.25));
  border-color: rgba(244,146,14,0.95);
  color: #fff;
  animation: none;
  box-shadow: 0 6px 24px rgba(244,146,14,0.4),
              0 0 0 4px rgba(244,146,14,0.15);
}

.boh-action-btn svg{
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.boh-action-btn:hover svg {
  transform: scale(1.1);
}

@media (max-width: 900px){
  .image-actions-container{
    gap: 8px;
    margin-top: 10px;
  }
  .boh-action-btn{
    padding: 7px 12px;
    font-size: 0.82rem;
  }
  .boh-action-btn svg{
    width: 14px;
    height: 14px;
  }
}




/* ✅ Comparison Cards - Premium Professional Design */
.boh-compare-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 20px 0 30px;
  max-width: 1200px;
  width: 100%;
}

.plan-compare-card{
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(15, 15, 15, 0.98));
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-compare-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(244, 146, 14, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.plan-compare-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 146, 14, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(244, 146, 14, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-compare-card:hover::before {
  opacity: 1;
}

.plan-compare-card.plan-pro {
  border-color: rgba(0, 217, 255, 0.3);
  background: linear-gradient(145deg, rgba(0, 217, 255, 0.08), rgba(0, 191, 255, 0.04));
}

.plan-compare-card.plan-pro::before {
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.6), transparent);
}

.plan-compare-card.plan-pro:hover {
  border-color: rgba(0, 217, 255, 0.5);
  box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3),
              0 0 0 1px rgba(0, 217, 255, 0.3),
              inset 0 1px 0 rgba(0, 255, 255, 0.1);
}

.plan-compare-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.plan-compare-title{
  font-weight: 700;
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.plan-compare-card.plan-pro .plan-compare-title {
  color: #00d9ff;
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.6),
               0 2px 8px rgba(0, 217, 255, 0.3);
}

.plan-compare-badge{
  border: 2px solid rgba(244, 146, 14, 0.5);
  color: #f4920e;
  background: linear-gradient(135deg, rgba(244, 146, 14, 0.15), rgba(244, 146, 14, 0.08));
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(244, 146, 14, 0.2);
}

.plan-compare-badge.pro{
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 217, 255, 0.1));
  border-color: rgba(0, 217, 255, 0.6);
  color: #00d9ff;
  box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.plan-compare-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.plan-compare-item{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.6;
  padding: 10px 0;
  transition: all 0.3s ease;
}

.plan-compare-item:hover {
  transform: translateX(-4px);
}

.plan-compare-icon{
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.plan-compare-item:not(.locked) .plan-compare-icon {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.plan-compare-item.locked .plan-compare-icon {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.15);
  font-size: 1.3rem;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
  position: relative;
}

.plan-compare-item.locked .plan-compare-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 2px;
  height: 18px;
  background: #ff4444;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

.plan-compare-item.locked .plan-compare-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 2px;
  height: 18px;
  background: #ff4444;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

.plan-compare-text{
  flex: 1;
  color: #d0d0d0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.plan-compare-item.locked .plan-compare-text{
  color: #888;
  opacity: 0.85;
}

@media (max-width: 820px){
  .boh-compare-cards{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .plan-compare-card {
    padding: 24px 20px;
  }
  
  .plan-compare-title {
    font-size: 1.25rem;
  }
}



/* ==========================================================
   ✅ Super Boh + BOQ PDF (Added)
   (Super Boh button uses normal styling — no fixed highlight)
========================================================== */
.modal-note{
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin: 10px 0 14px;
}
.modal-bullets{
  margin: 0 0 14px;
  padding: 0 18px 0 0;
  line-height: 1.9;
  color: rgba(255,255,255,0.88);
}
.modal-bullets li{ margin: 6px 0; }
.modal-bullets .modal-strong{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(244,146,14,0.10);
  border: 1px solid rgba(244,146,14,0.25);
}
.modal-actions.row{
  display:flex;
  gap:10px;
}
.modal-actions.row .enter-btn{ flex: 1; }

.boq-pdf-box{ max-width: 860px; width: 95%; }
.pdf-form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.pdf-field.full{ grid-column: 1 / -1; }
.pdf-field label{
  display:block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}
.pdf-logo-preview{
  margin-top: 8px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(244,146,14,0.25);
  background: rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.pdf-logo-preview img{ height: 44px; max-width: 100%; object-fit: contain; }

.pdf-templates{ margin-top: 14px; }
.pdf-templates-title{
  color:#f4920e;
  font-weight: 900;
  margin: 8px 0 10px;
}
.pdf-template-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px){
  .pdf-form-grid{ grid-template-columns: 1fr; }
  .pdf-template-grid{ grid-template-columns: 1fr; }
}
.pdf-template-card{
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  padding: 12px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  color: #fff;
}
.pdf-template-card:hover{
  transform: translateY(-2px);
  border-color: rgba(244,146,14,0.45);
}
.pdf-template-card.active{
  border-color: rgba(244,146,14,0.65);
  background: rgba(244,146,14,0.08);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
.pt-title{ font-weight: 900; }
.pt-sub{ color: rgba(255,255,255,0.70); margin-top: 2px; font-size: 0.9rem; }

/* PDF render sheet (captured by html2canvas) */
.pdf-sheet{
  width: 794px; /* A4 @ 96dpi approx */
  min-height: 1123px;
  background: #ffffff;
  color: #111;
  box-sizing: border-box;
  padding: 46px 46px 54px;
  font-family: Cairo, "Segoe UI", Tahoma, Arial, sans-serif;
}
.pdf-sheet *{ box-sizing: border-box; }
.pdf-header{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.pdf-logo-box{
  width: 140px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pdf-logo-box img{ max-width: 100%; max-height: 100%; object-fit: contain; }
.pdf-meta{
  text-align: right;
  flex: 1;
}
.pdf-meta .pdf-company{ font-weight: 900; font-size: 18px; }
.pdf-meta .pdf-client{ margin-top: 4px; font-size: 14px; color:#333; }
.pdf-meta .pdf-date{ margin-top: 2px; font-size: 13px; color:#444; }
.pdf-title{
  margin: 10px 0 12px;
  font-weight: 900;
  font-size: 18px;
}
.pdf-text{
  font-size: 13px;
  line-height: 1.7;
  color: #222;
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.pdf-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pdf-table th, .pdf-table td{
  border: 1px solid rgba(0,0,0,0.12);
  padding: 8px 8px;
  vertical-align: top;
}
.pdf-table th{
  font-weight: 900;
}
.pdf-footer-note{
  margin-top: 14px;
  font-size: 12px;
  color: #222;
  white-space: pre-wrap;
}

/* Themes */
.pdf-theme-t1 .pdf-bar{ height: 10px; border-radius: 999px; background: #f4920e; margin-bottom: 14px; }
.pdf-theme-t1 .pdf-table th{ background: rgba(244,146,14,0.10); }

.pdf-theme-t2{
  background: #0b0f18;
  color: #fff;
}
.pdf-theme-t2 .pdf-text, .pdf-theme-t2 .pdf-footer-note{ color: rgba(255,255,255,0.88); }
.pdf-theme-t2 .pdf-meta .pdf-client, .pdf-theme-t2 .pdf-meta .pdf-date{ color: rgba(255,255,255,0.78); }
.pdf-theme-t2 .pdf-bar{ height: 12px; border-radius: 12px; background: linear-gradient(135deg, #f4920e, #ffb14a); margin-bottom: 14px; }
.pdf-theme-t2 .pdf-table th, .pdf-theme-t2 .pdf-table td{ border-color: rgba(255,255,255,0.14); }
.pdf-theme-t2 .pdf-table th{ background: rgba(244,146,14,0.12); }
.pdf-theme-t2 .pdf-table td{ color: rgba(255,255,255,0.92); }

.pdf-theme-t3 .pdf-bar{ height: 12px; border-radius: 12px; background: #091a4a; margin-bottom: 14px; }
.pdf-theme-t3 .pdf-table th{ background: rgba(9,26,74,0.08); }


/* ==========================================================
   ✅ PDF Enhancements (Header/Footer separators + Pro look)
========================================================== */

.pdf-sheet{
  display:flex;
  flex-direction:column;
}
.pdf-sep{
  height: 1px;
  width: 100%;
  background: rgba(0,0,0,0.10);
  margin: 14px 0;
}
.pdf-sep-header{ margin-top: 10px; margin-bottom: 18px; }
.pdf-sep-footer{ margin-top: 18px; margin-bottom: 12px; }

.pdf-title{
  letter-spacing: 0.5px;
}
.pdf-table{
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
}
.pdf-table tbody tr:nth-child(even){
  background: rgba(0,0,0,0.02);
}
.pdf-theme-t2 .pdf-sep{ background: rgba(255,255,255,0.18); }
.pdf-theme-t3 .pdf-sep{ background: rgba(9,26,74,0.18); }
.pdf-theme-t2 .pdf-table tbody tr:nth-child(even){
  background: rgba(255,255,255,0.04);
}
.pdf-theme-t3 .pdf-table tbody tr:nth-child(even){
  background: rgba(9,26,74,0.03);
}


/* ==========================================================
   ✅ Graduation Project Modal (Banner)
========================================================== */

.modal-wide{
  width: min(1120px, 98vw);
}
.grad-form{ margin-top: 10px; }
.grad-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grad-span2{ grid-column: span 2; }
.grad-field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.grad-field > span{
  font-weight: 700;
  color: rgba(255,255,255,0.88);
}
.grad-field input, .grad-field textarea, .grad-count{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
}
.grad-field textarea{ resize: vertical; min-height: 90px; }
.grad-notes{ margin-top: 14px; }

#grad-notes{
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.grad-sections{ margin-top: 14px; display:flex; flex-direction:column; gap: 12px; }
.grad-section{
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
}
.grad-sec-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.grad-sec-title{
  font-weight: 800;
  color: rgba(255,255,255,0.92);
}
.grad-count{ max-width: 140px; }
.grad-count-small{ max-width: 120px; }
.grad-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.grad-item{
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.16);
  padding: 10px;
  background: rgba(0,0,0,0.14);
}
.grad-item-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.grad-item-title{
  font-weight: 800;
  color: #fff;
}
.grad-item-sub{
  font-size: 12px;
  color: rgba(255,255,255,0.68);
}
.grad-item-body{display:grid;grid-template-columns:260px 1fr 280px;gap:10px;align-items:start}
@media (max-width: 820px){.grad-item-body{grid-template-columns:1fr}}
.grad-file{
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}
.grad-note{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
.modal-note.small{
  font-size: 12px;
  margin-top: 10px;
  opacity: 0.85;
}
@media (max-width: 720px){
  .grad-grid{ grid-template-columns: 1fr; }
  .grad-span2{ grid-column: span 1; }
  .grad-item-body{ grid-template-columns: 1fr; }
  .grad-count{ max-width: 120px; }
}


/* ==========================================================
   ✅ Graduation Project Modal (Wider + Better UX)
========================================================== */
.grad-box{
  max-width: 1120px !important;
  width: min(1120px, 96vw);
}
.grad-head h2{
  margin: 0 0 6px 0;
  color:#f4920e;
}
.grad-head p{
  margin: 0 0 12px 0;
  color:#ddd;
  line-height:1.85;
}

.grad-form label{
  display:block;
  color:#cfcfcf;
  margin-bottom:6px;
  font-size:0.92rem;
}
.grad-form input,
.grad-form textarea,
.grad-form select{
  width:100%;
  background:#0f0f0f;
  color:#fff;
  border:1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 10px;
  outline:none;
}
.grad-form textarea{
  min-height: 110px;
  resize: vertical;
}
.grad-form select{
  appearance:auto;
}
.grad-form select option{
  color:#111;          /* ✅ solves white dropdown issue */
  background:#fff;     /* ✅ ensures numbers visible immediately */
}

.grad-row3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 820px){
  .grad-row3{ grid-template-columns: 1fr; }
}

.grad-sections{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.grad-sec{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px 10px;
}
.grad-sec-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.grad-sec-head h3{
  margin: 0;
  color:#f4920e;
  font-size: 1rem;
}
.grad-count{
  width: 120px !important;
  min-width: 120px;
}

.grad-list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.grad-item{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:14px;background:rgba(0,0,0,0.35);border:1px solid rgba(255,255,255,0.08)}
@media (max-width: 820px){.grad-item{padding:10px}}
.grad-item .grad-file{
  width:100%;
}
.grad-item .grad-note{
  min-height: 90px;
}

.grad-actions{
  display:flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 14px;
}
.btn-primary{
  background:#f4920e;
  color:#111;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor:pointer;
}
.btn-secondary{
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 12px;
  padding: 10px 14px;
  cursor:pointer;
}
.grad-foot{
  margin-top: 10px;
  color:#ddd;
}
.grad-small{
  font-size: 0.85rem;
  color:#bdbdbd;
  margin-top: 6px;
}



/* ================== PATCH: Training + Graduation + SuperBoh ================== */
.training-title{margin:0 0 10px 0;color:#f4920e;font-size:1.25rem;border-bottom:1px solid rgba(244,146,14,.35);padding-bottom:8px}
.training-lead{margin:0 0 14px 0;color:#d7d7d7;font-size:.95rem}
.training-note{color:#bdbdbd;font-size:.85rem}
.training-card{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:12px;margin:10px 0}
.training-card h3{margin:0 0 6px 0;color:#f4920e;font-size:1.02rem}
.training-card p{margin:0 0 8px 0;color:#ddd}
.training-card ul{margin:0 0 8px 0;padding-right:18px;color:#ddd}
.training-price{margin-top:6px;color:#eaeaea;font-size:.95rem}
.training-price b{color:#fff}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;background:rgba(244,146,14,.12);border:1px solid rgba(244,146,14,.25);padding:1px 6px;border-radius:10px}

/* Training Instructions Box */
.training-instructions-box{
  background: linear-gradient(145deg, rgba(244,146,14,0.12), rgba(244,146,14,0.06));
  border: 1px solid rgba(244,146,14,0.35);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  animation: instructionsFadeIn 0.5s ease-out;
}

@keyframes instructionsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.training-instructions-box h4{
  margin: 0 0 12px 0;
  color: #f4920e;
  font-size: 1.1rem;
  font-weight: 900;
}

.training-instructions-content{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.training-instructions-ar,
.training-instructions-en{
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.7;
}

.training-instructions-ar strong,
.training-instructions-en strong{
  color: #f4920e;
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.training-instructions-ar ul,
.training-instructions-en ul{
  margin: 8px 0 0 0;
  padding-right: 20px;
  list-style-type: disc;
}

.training-instructions-ar li,
.training-instructions-en li{
  margin: 6px 0;
  color: #ccc;
}

/* Training Note Box (for Final Output explanation) */
.training-note-box{
  background: rgba(244,146,14,0.08);
  border: 1px solid rgba(244,146,14,0.25);
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0;
  color: #ddd;
  font-size: 0.9rem;
  line-height: 1.7;
  animation: noteBoxFadeIn 0.4s ease-out;
}

@keyframes noteBoxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.training-note-box strong{
  color: #ffd7a6;
}

.super-boh-box{max-width:820px!important;width:min(820px,96vw)}
.super-boh-box .modal-title{margin-top:0;color:#f4920e;font-size:1.3rem}
.super-boh-box .modal-lead{color:#ddd;line-height:1.85}
.super-boh-box .modal-bullets{margin:10px 0 12px 0;padding-right:18px;color:#ddd;line-height:1.85}
.super-boh-box .modal-note{background:rgba(244,146,14,.10);border:1px solid rgba(244,146,14,.25);padding:10px 12px;border-radius:12px;color:#eee}
.super-boh-box .modal-note span{color:#f4920e}

.grad-box{max-width:1320px!important;width:min(1320px,96vw)}
.grad-form input,.grad-form textarea,.grad-form select{width:100%;background:#0f0f0f;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:10px;outline:none}
.grad-form textarea{min-height:110px;resize:vertical}
.grad-form select{appearance:auto}
.grad-form select option{color:#111;background:#fff} /* ✅ fixes white dropdown issue (numbers visible immediately) */

.grad-row3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (max-width:820px){.grad-row3{grid-template-columns:1fr}}
.grad-sec{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:10px}
.grad-sec-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.grad-count{width:120px!important;min-width:120px}
.grad-item{display:grid;grid-template-columns:220px 1fr;gap:10px;align-items:start;padding:10px;border-radius:14px;background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.08)}
@media (max-width:820px){.grad-item{grid-template-columns:1fr}}
.grad-item .grad-note{min-height:90px}


/* ===== Graduation Banner: per-image size controls ===== */
.grad-size{
  width:100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.grad-size-title{
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
}
.grad-size-row{
  display:flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.grad-size-mode{
  flex: 1 1 150px;
  min-width: 150px;
}
.grad-size-custom{
  display:none;
  gap: 8px;
  align-items: center;
}
.grad-item.is-custom .grad-size-custom{ display:flex; }
.grad-size-custom input{
  width: 96px;
  text-align: center;
}
.grad-size-hint{
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

/* Sidebar training item - ✅ إزالة الإطار الدائم */
.training-item{
  border: 1px solid rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  position: relative;
}
.training-item:hover{
  background: rgba(244,146,14,0.18) !important;
}
/* ✅ منع ظهور الإطار (active state) على training-item تماماً - إزالة جميع التأثيرات */
.training-item.active,
.training-item.active:hover,
.model-item.training-item.active {
  border: 1px solid rgba(244,146,14,0.45) !important;
  background: rgba(244,146,14,0.12) !important;
  box-shadow: none !important;
  transform: none !important;
  border-color: rgba(244,146,14,0.45) !important;
}
/* ✅ إزالة أي تأثيرات active من training-item بشكل قاطع - لا يظهر أي إطار حتى لو كان active */
.training-item.active::before,
.training-item.active::after {
  display: none !important;
}

/* Training modal close button */
#training-modal .modal-close{
  width: 44px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
  top: 10px;
  right: 10px;
}
#training-modal .modal-box{ position: relative; }

/* Grad form readability */
.grad-form select{background:rgba(15,22,34,0.85);color:#fff;border:1px solid rgba(255,255,255,0.12);}
.grad-form input,.grad-form textarea{background:rgba(15,22,34,0.65);color:#fff;}
.grad-form select option{color:#111;background:#fff;}

/* Camera Change Modal Styles */
.camera-type-btn{
  padding:20px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  transition:all 0.3s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
}
.camera-type-btn:hover{
  border-color:rgba(244,146,14,0.5);
  background:rgba(244,146,14,0.08);
  transform:translateY(-2px);
}
.camera-type-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.15);
  box-shadow:0 8px 24px rgba(244,146,14,0.2);
}
.camera-type-name{
  font-weight:700;
  font-size:0.95rem;
  margin-bottom:5px;
}
.camera-3d{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  perspective:140px;
}
.camera-3d .cube{
  width:26px;
  height:26px;
  position:relative;
  transform-style:preserve-3d;
  background:linear-gradient(135deg, rgba(244,146,14,0.35), rgba(244,146,14,0.15));
  border:1px solid rgba(244,146,14,0.7);
  box-shadow:0 6px 18px rgba(244,146,14,0.2);
}
.camera-3d .cube::before,
.camera-3d .cube::after{
  content:'';
  position:absolute;
  width:26px;
  height:26px;
  border:1px solid rgba(244,146,14,0.5);
  background:linear-gradient(135deg, rgba(244,146,14,0.28), rgba(244,146,14,0.12));
}
.camera-3d .cube::before{
  transform:rotateY(90deg) translateZ(13px);
  transform-origin:left;
}
.camera-3d .cube::after{
  transform:rotateX(90deg) translateZ(13px);
  transform-origin:bottom;
}
.camera-3d-front .cube{ transform:rotateY(0deg) rotateX(0deg); }
.camera-3d-right .cube{ transform:rotateY(-35deg) rotateX(10deg); }
.camera-3d-left .cube{ transform:rotateY(35deg) rotateX(10deg); }
.camera-3d-bird .cube{ transform:rotateX(60deg) rotateZ(10deg); }
.camera-3d-ant .cube{ transform:rotateX(-50deg) rotateZ(-10deg); }
.camera-3d-other .cube{ transform:rotateY(25deg) rotateX(25deg); }
.camera-quality-btn{
  flex:1;
  padding:12px 20px;
  border-radius:12px;
  border:2px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  transition:all 0.3s ease;
  font-weight:700;
}
.camera-quality-btn:hover{
  border-color:rgba(244,146,14,0.5);
  background:rgba(244,146,14,0.08);
}
.camera-quality-btn.active{
  border-color:#f4920e;
  background:rgba(244,146,14,0.15);
  color:#ffd7a6;
}
@media (max-width:720px){
  #camera-type-grid{grid-template-columns:1fr!important;}
}

/* Sketch to 2D Modal */
.sketch-2d-box{
  max-width:1100px;
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(18,18,18,0.98), rgba(12,12,12,0.98));
}
.sketch-toolbar{
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin: 16px 0 12px;
}
.sketch-tools-title,
.sketch-control-label,
.sketch-templates-title{
  font-weight: 800;
  color:#f4920e;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.sketch-tools-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.sketch-tool-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
  transition: 0.2s;
}
.sketch-tool-btn.active,
.sketch-tool-btn:hover{
  border-color: rgba(244,146,14,0.6);
  background: rgba(244,146,14,0.12);
}
.sketch-controls{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.sketch-toggle-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.sketch-option-row{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.sketch-toggle{
  display:flex;
  align-items:center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}
.sketch-toggle input{
  accent-color: #f4920e;
}
.sketch-controls input[type="number"]{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
.sketch-color-row{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.sketch-color-btn{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: #111;
  cursor:pointer;
  transition: 0.2s;
}
.sketch-color-btn[data-color="#444444"]{ background:#444; }
.sketch-color-btn[data-color="#f4920e"]{ background:#f4920e; }
.sketch-color-btn[data-color="#2ecc71"]{ background:#2ecc71; }
.sketch-color-btn[data-color="#3498db"]{ background:#3498db; }
.sketch-color-btn[data-color="#e74c3c"]{ background:#e74c3c; }
.sketch-color-btn.active{
  border-color:#fff;
  box-shadow:0 0 0 3px rgba(244,146,14,0.25);
}
.sketch-color-picker{
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor:pointer;
}
.sketch-actions-row{
  display:flex;
  gap: 8px;
}
.sketch-action-btn{
  flex:1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
}
.sketch-action-btn:hover{
  border-color: rgba(244,146,14,0.5);
  background: rgba(244,146,14,0.12);
}
.sketch-templates{
  margin-bottom: 12px;
}
.sketch-templates-grid{
  display:grid;
  grid-template-columns: repeat(8, minmax(0,1fr));
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}
.sketch-template-btn{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color:#fff;
  cursor:pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: 0.2s;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sketch-template-icon{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0f0f0f;
  position: relative;
  display:block;
}
.sketch-template-text{
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}
.sketch-template-icon::before,
.sketch-template-icon::after{
  content:'';
  position:absolute;
  background: #f2f2f2;
}
.icon-wall::before{ left:6px; right:6px; top:50%; height:2px; transform: translateY(-50%); }
.icon-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-door::after{ left:6px; top:12px; width:18px; height:18px; border:2px solid #f2f2f2; border-right:none; border-bottom:none; background: transparent; }
.icon-double-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-double-door::after{ left:6px; top:12px; width:26px; height:18px; border:2px solid #f2f2f2; border-bottom:none; background: transparent; }
.icon-sliding-door::before{ left:6px; right:6px; top:55%; height:2px; }
.icon-sliding-door::after{ left:10px; top:8px; width:18px; height:4px; background:#f2f2f2; }
.icon-window::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-window::after{ left:6px; right:6px; top:14px; height:2px; }
.icon-double-window::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-double-window::after{ left:6px; right:6px; top:14px; height:2px; box-shadow: 0 18px 0 #f2f2f2; }
.icon-curtain-wall::before{ left:6px; right:6px; top:50%; height:2px; }
.icon-curtain-wall::after{ left:9px; top:10px; width:2px; height:18px; box-shadow: 6px 0 0 #f2f2f2, 12px 0 0 #f2f2f2, 18px 0 0 #f2f2f2; }
.icon-bed::before{ left:8px; top:14px; width:22px; height:12px; background: transparent; border:2px solid #f2f2f2; }
.icon-bed::after{ left:8px; top:8px; width:8px; height:6px; border:2px solid #f2f2f2; background: transparent; }
.icon-wardrobe::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-sofa::before{ left:8px; top:16px; width:22px; height:10px; border:2px solid #f2f2f2; background: transparent; }
.icon-sofa-l::before{ left:8px; top:10px; width:16px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-armchair::before{ left:10px; top:12px; width:18px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-table::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-round-table::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius:50%; background: transparent; }
.icon-chair::before{ left:12px; top:12px; width:14px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-desk::before{ left:8px; top:12px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-tv::before{ left:8px; top:10px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-bookshelf::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-island::before{ left:8px; top:12px; width:22px; height:14px; border:2px solid #f2f2f2; background: transparent; }
.icon-counter::before{ left:6px; top:18px; width:26px; height:6px; background: #f2f2f2; }
.icon-toilet::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius: 6px; background: transparent; }
.icon-sink::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius: 50%; background: transparent; }
.icon-shower::before{ left:8px; top:8px; width:22px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-bathtub::before{ left:8px; top:14px; width:22px; height:12px; border:2px solid #f2f2f2; border-radius: 8px; background: transparent; }
.icon-stove::before{ left:8px; top:10px; width:22px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-fridge::before{ left:10px; top:8px; width:18px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-stairs::before{ left:10px; top:10px; width:18px; height:18px; border:2px solid #f2f2f2; background: transparent; }
.icon-elevator::before{ left:12px; top:8px; width:14px; height:22px; border:2px solid #f2f2f2; background: transparent; }
.icon-balcony::before{ left:8px; top:18px; width:22px; height:8px; border:2px solid #f2f2f2; background: transparent; }
.icon-column::before{ left:14px; top:8px; width:10px; height:22px; border:2px solid #f2f2f2; border-radius: 8px; background: transparent; }
.icon-tree::before{ left:10px; top:8px; width:18px; height:18px; border:2px solid #f2f2f2; border-radius:50%; background: transparent; }
.sketch-template-btn.active,
.sketch-template-btn:hover{
  border-color: rgba(244,146,14,0.6);
  background: rgba(244,146,14,0.12);
}
.sketch-canvas-wrap{
  background:#fff;
  border-radius: 16px;
  border: 2px solid rgba(244,146,14,0.35);
  padding: 8px;
  min-height: 360px;
}
#sketch-2d-canvas{
  width:100%;
  height:auto;
  display:block;
  background:#fff;
  border-radius: 12px;
  cursor: crosshair;
}
.sketch-object-panel{
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(244,146,14,0.35);
  background: rgba(0,0,0,0.25);
}
.sketch-object-title{
  font-weight: 800;
  color:#f4920e;
  margin-bottom: 8px;
}
.sketch-object-row{
  display:grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 10px;
  align-items:center;
}
.sketch-object-row input{
  width:100%;
}
.sketch-object-actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
}
.sketch-action-btn.danger{
  border-color: rgba(255,99,99,0.6);
  color:#ff9f9f;
}
.sketch-action-btn.danger:hover{
  background: rgba(255,99,99,0.15);
  border-color: rgba(255,99,99,0.85);
}
.sketch-colorize-active{
  border-color: rgba(52,152,219,0.75) !important;
  background: rgba(52,152,219,0.15) !important;
  color: #cfe7ff !important;
}
.sketch-dim-box{
  max-width: 520px;
  width: min(520px, 92vw);
}
.sketch-dim-fields{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}
.sketch-dim-field label{
  display:block;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
}
.sketch-dim-field input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
}
@media (max-width: 900px){
  .sketch-toolbar{ grid-template-columns: 1fr; }
  .sketch-tools-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sketch-templates-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sketch-object-row{ grid-template-columns: 1fr; }
  .sketch-dim-fields{ grid-template-columns: 1fr; }
}
