* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, sans-serif;
}
body {
    background: radial-gradient(circle at top, #0f2952 0%, #091326 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    perspective: 1200px;
    overflow-x: hidden;
}
.box-3d {
    position: relative;
    width: 100%;
    max-width: 410px;
    border-radius: 26px;
    padding: 4px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0b162c;
    box-shadow: 0 20px 45px rgba(0,0,0,0.9), 0 0 25px rgba(245, 158, 11, 0.3), 0 0 25px rgba(69,243,255,0.25);
}
.box-3d::before, .box-3d::after {
    content: '';
    position: absolute;
    width: 170%;
    height: 170%;
    animation: spinLight 4s linear infinite;
    z-index: 1;
}
.box-3d::before {
    background: conic-gradient(transparent, transparent, transparent, #f59e0b, #fbbf24);
}
.box-3d::after {
    background: conic-gradient(transparent, transparent, transparent, #45f3ff, #45f3ff);
    animation-delay: -2s;
}
@keyframes spinLight {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.login-inner {
    position: relative;
    width: 100%;
    background: linear-gradient(155deg, #132544, #0c172b);
    border-radius: 22px;
    padding: 20px 18px 24px;
    z-index: 5;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.6);
    text-align: center;
}
.lang-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}
.lang-btn {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #cbd5e1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
}
.lang-btn.active {
    background: linear-gradient(180deg, #fbbf24, #d97706);
    border-color: #fbbf24;
    color: #091326;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}
.logo-3d-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    perspective: 600px;
}
.logo-3d-coin {
    width: 100%;
    height: 100%;
    animation: rotateLogo3D 6s linear infinite;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #b45309, #fde68a);
    padding: 3px;
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.6);
}
.logo-3d-face {
    width: 100%;
    height: 100%;
    background: #0c172b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    font-weight: bold;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}
@keyframes rotateLogo3D {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* استایل نام شرکت دوزبانه طلایی مطابق عکس */
.company-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}
.company-name-gold {
    font-size: 17px;
    font-weight: bold;
    background: linear-gradient(180deg, #fde68a 0%, #f59e0b 60%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
    margin-bottom: 4px;
}
.company-name-en {
    font-size: 10.5px;
    font-weight: bold;
    letter-spacing: 0.8px;
    color: #fbbf24;
    opacity: 0.9;
}

.sub-title {
    color: #94a3b8;
    font-size: 11.5px;
    margin-bottom: 14px;
}
.user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.user-card {
    background: linear-gradient(145deg, #1b3158, #11203b);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 10px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 5px 0 #08101e;
}
.user-card.active {
    background: linear-gradient(145deg, #2b2310, #1c1608);
    border-color: #fbbf24;
    box-shadow: 0 5px 0 #0f0b04, 0 0 15px rgba(251, 191, 36, 0.4);
}
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.4);
    background: #0b162c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.user-card.active .user-avatar {
    border-color: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
}
.user-name {
    font-size: 12px;
    font-weight: bold;
    color: #e5e7eb;
}
.user-card.active .user-name {
    color: #fbbf24;
}
.input-box {
    margin-bottom: 16px;
}
.input-box input {
    width: 100%;
    padding: 12px;
    background: #091224;
    border: 1.5px solid rgba(251, 191, 36, 0.3);
    border-radius: 30px;
    font-size: 16px;
    color: #fbbf24;
    text-align: center;
    outline: none;
    box-shadow: inset 0 6px 12px rgba(0,0,0,0.9);
}
.submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(180deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
    color: #091326;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 0 #92400e, 0 0 20px rgba(245, 158, 11, 0.45);
}
.submit-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #92400e;
}
#error-msg {
    font-size: 12.5px;
    margin-top: 14px;
    min-height: 18px;
    font-weight: bold;
}
/* --- استایل‌های داشبورد سه‌بعدی --- */
.dashboard-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 15px 10px 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, #132544, #0c172b);
    padding: 12px 15px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}
.dash-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: bold;
}
.badge-live {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, 0.3);
}
.gold-text {
    color: #fbbf24;
}
.logout-btn {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0 #7f1d1d;
}
.dash-banner {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    border: 1.5px solid #fbbf24;
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7), 0 0 15px rgba(251, 191, 36, 0.25);
}
.dash-banner h3 {
    color: #fbbf24;
    font-size: 16px;
    margin-bottom: 5px;
}
.dash-banner p {
    color: #cbd5e1;
    font-size: 12px;
}
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.menu-card {
    background: linear-gradient(145deg, #1b3158, #11203b);
    border: 1.5px solid rgba(251, 191, 36, 0.25);
    border-radius: 18px;
    padding: 18px 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 0 #08101e, 0 10px 15px rgba(0,0,0,0.5);
    transition: 0.15s;
}
.menu-card:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #08101e;
    border-color: #fbbf24;
}
.menu-icon {
    font-size: 30px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
}
.menu-title {
    font-size: 13px;
    font-weight: bold;
    color: #f8fafc;
}
.active-module-box {
    background: #0c172b;
    border: 1px dashed #45f3ff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-top: 5px;
}
.active-module-box h4 {
    color: #45f3ff;
    font-size: 15px;
    margin-bottom: 6px;
}
.active-module-box p {
    color: #94a3b8;
    font-size: 12px;
}
/* چوکات دوطبقه‌ای و نورانی دقیقاً مشابه عکس (Glowing Frame) */
.box-3d, .top-command-header {
    position: relative;
    background: #1a1b26 !important;
    border-radius: 22px !important;
    padding: 14px !important; /* ضخامت قاب بیرونی مثل عکس */
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.9),
        inset 0 0 20px rgba(0, 0, 0, 0.8) !important;
    overflow: hidden;
}

/* کادر داخلی فرورفته (دقیقاً مثل کلاس .login در عکس) */
.login-inner {
    border-radius: 14px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    box-shadow: inset 0 10px 25px rgba(0, 0, 0, 0.75) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5) !important;
}
/* استایل ساعت عقربه‌ای و چیدمان هدر */
.top-command-header { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 769px) { .top-command-header { grid-template-columns: 1.4fr 1.2fr 0.8fr; } .menu-grid { grid-template-columns: repeat(4, 1fr); } }
.header-brand-box { display: flex; align-items: center; gap: 12px; text-align: right; }
.header-logo { width: 58px; height: 58px; border-radius: 50%; background: #091326; border: 2.5px solid #fbbf24; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; color: #fbbf24; flex-shrink: 0; box-shadow: 0 0 15px rgba(251,191,36,0.5); }
.gold-title { color: #fbbf24; font-size: 15px; margin-bottom: 3px; }
.en-subtitle { color: #cbd5e1; font-size: 10px; margin-bottom: 5px; }
.welcome-badge { background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.4); color: #fde68a; font-size: 11px; padding: 3px 10px; border-radius: 12px; display: inline-block; }
.header-users-box { background: rgba(0,0,0,0.35); padding: 10px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); }
.online-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; justify-content: center; }
.active-user-row { display: flex; justify-content: space-between; align-items: center; }
.active-pill { font-size: 11.5px; color: #e2e8f0; background: #132544; padding: 5px 10px; border-radius: 10px; }
.header-clock-box { background: #091224; border: 1.5px solid #45f3ff; border-radius: 16px; padding: 10px; text-align: center; box-shadow: inset 0 0 15px rgba(69,243,255,0.2); }
.analog-clock { width: 54px; height: 54px; border: 2px solid #45f3ff; border-radius: 50%; margin: 0 auto 6px; position: relative; background: radial-gradient(circle, #132544, #070d19); }
.hand { position: absolute; bottom: 50%; left: 50%; transform-origin: bottom; border-radius: 4px; }
.hand.hour { width: 3px; height: 14px; background: #fbbf24; }
.hand.min { width: 2px; height: 19px; background: #fff; }
.hand.sec { width: 1.5px; height: 22px; background: #ff2770; }
.clock-dot { width: 6px; height: 6px; background: #fbbf24; border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.digital-time { font-size: 14px; font-weight: bold; color: #45f3ff; direction: ltr; }
.date-text { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.date-text.shamsi { color: #fbbf24; font-weight: bold; }
function updateLiveClock() {
    const now = new Date();
    const sec = now.getSeconds(), min = now.getMinutes(), hr = now.getHours();
    const secHand = document.getElementById('secHand');
    if (secHand) {
        secHand.style.transform = `translateX(-50%) rotate(${sec * 6}deg)`;
        document.getElementById('minHand').style.transform = `translateX(-50%) rotate(${min * 6}deg)`;
        document.getElementById('hourHand').style.transform = `translateX(-50%) rotate(${(hr % 12) * 30 + min * 0.5}deg)`;
    }
    const dig = document.getElementById('digitalClock');
    if (dig) dig.innerText = now.toLocaleTimeString('en-US');
    const greg = document.getElementById('gregorianDate');
    if (greg) greg.innerText = now.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
    const shamsi = document.getElementById('shamsiDate');
    if (shamsi) {
        try { shamsi.innerText = new Intl.DateTimeFormat('fa-AF', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }).format(now); }
        catch (e) { shamsi.innerText = now.toLocaleDateString('fa-IR'); }
    }
}
setInterval(updateLiveClock, 1000);
updateLiveClock();
/* ساعت کرنوگراف شبرنگ RGB مشابه عکس */
.rgb-clock-card {
    background: linear-gradient(145deg, #131c2e, #0a0f1a) !important;
    border: 1.5px solid rgba(69, 243, 255, 0.4) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8), inset 0 0 15px rgba(69, 243, 255, 0.15) !important;
}
.radium-clock {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 8px;
    position: relative;
    background: radial-gradient(circle, #182338 0%, #0b101b 100%);
    border: 3px solid #1e293b;
    box-shadow: 0 0 18px rgba(0, 255, 204, 0.25), inset 0 0 12px #000;
    animation: rgbGlow 6s infinite alternate;
}
@keyframes rgbGlow {
    0% { box-shadow: 0 0 15px rgba(69, 243, 255, 0.4), inset 0 0 10px #000; }
    50% { box-shadow: 0 0 18px rgba(16, 185, 129, 0.5), inset 0 0 10px #000; }
    100% { box-shadow: 0 0 18px rgba(236, 72, 153, 0.45), inset 0 0 10px #000; }
}
.dial-ticks {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px dashed rgba(69, 243, 255, 0.45);
}
.brand-stamp {
    position: absolute;
    top: 22px;
    width: 100%;
    text-align: center;
    font-size: 6.5px;
    letter-spacing: 1px;
    color: #94a3b8;
    font-weight: bold;
}
.sub-dial {
    position: absolute;
    top: 43px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(69, 243, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    color: #45f3ff;
}
.sub-dial.left { left: 16px; }
.sub-dial.right { right: 16px; }
.r-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    border-radius: 4px;
}
.r-hour {
    width: 3.5px;
    height: 26px;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}
.r-min {
    width: 2.5px;
    height: 36px;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
}
.r-sec {
    width: 1.5px;
    height: 42px;
    background: #f43f5e;
    box-shadow: 0 0 8px #f43f5e;
}
.r-center-pin {
    width: 8px;
    height: 8px;
    background: #fff;
    border: 2px solid #45f3ff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}
.rgb-digital {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(69, 243, 255, 0.7);
    direction: ltr;
    letter-spacing: 1px;
}
.rgb-digital small {
    font-size: 10px;
    background: #10b981;
    color: #06281e;
    padding: 1px 5px;
    border-radius: 6px;
    vertical-align: middle;
}
/* استایل‌های بخش گدام مرکزی و جدول نئونی */
.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 18px;
  margin-top: 15px;
  border: 1px solid rgba(0, 243, 255, 0.35);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.neon-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.neon-form input, #search-product {
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.4);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.neon-form input:focus, #search-product:focus {
  border-color: #00f3ff;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.neon-btn {
  background: linear-gradient(90deg, #00f3ff, #bc13fe);
  color: #000;
  font-weight: bold;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

.table-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.table-responsive {
  overflow-x: auto;
}

.neon-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
}

.neon-table th, .neon-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.neon-table th {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.08);
}

.btn-del {
  background: rgba(255, 42, 109, 0.2);
  color: #ff2a6d;
  border: 1px solid #ff2a6d;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
/* تنظیم نمایش عریض و استاندارد برای صفحه کامپیوتر */
@media (min-width: 768px) {
  .dashboard-container, .container, #dashboardScreen > div {
    max-width: 1100px !important;
    width: 95% !important;
  }
}
@media (min-width: 768px) {
    .dashboard-container {
        max-width: 1120px !important;
    }
    .menu-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }
    .top-command-header {
        display: grid !important;
        grid-template-columns: 1.4fr 1fr 1fr;
        align-items: center;
        gap: 16px;
    }
}
@media (min-width: 768px) {
    body {
        padding: 12px 18px !important;
        align-items: flex-start !important;
    }
    .dashboard-container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

