:root {
  --primary-color: #4A8C8C;
  --primary-dark: #3a6d6d;
  --secondary-color: #6CB4B4;
  --success-color: #4CAF50;
  --warning-color: #FF9800;
  --danger-color: #F44336;
  --info-color: #2196F3;
  --light-color: #F5F7FA;
  --dark-color: #2C3E50;
  --text-color: #333;
  --text-light: #777;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: #f5f7fa;
  color: var(--text-color);
  line-height: 1.6;
}
 .footer {
      text-align: center;
      margin-top: 50px;
      padding: 20px;
      color: #666;
      font-size: 0.9rem;
      border-top: 1px solid #eee;
    }
/* صفحة تسجيل الدخول */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}
    .topnav {
      background-color: #4A8C8C;
      color: white;
	
      text-align: center;
    padding: 35px 40px;

    }
	  .sirala {
      
     color: #4A8C8C;
	  
    text-align: center;
    padding: 5px 5px;

    }

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo img {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
}

.login-logo h1 {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.login-box {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-box h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.login-box p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 14px 16px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: 'Tajawal', sans-serif;
   position: relative;
}

.login-box input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 140, 140, 0.2);
}































.login-box button {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Tajawal', sans-serif;
}

.login-box button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.error-message {
  color: var(--danger-color);
  margin-top: 15px;
  font-size: 0.9rem;
}

/* الصفحة الرئيسية */
.status-bar {
  height: 5px;
  background: var(--primary-color);
  transition: background 0.5s;
}

.app-header {
  background: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
  text-align: center;
}

.header-content h1 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.device-code {
  color: var(--text-light);
  font-size: 0.9rem;
}

.content {
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.current-status-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  
   border: 3px solid skyblue; /* الإطار الأزرق السماوي */
   border-left: 4px solid var(--info-color);
}

.status-icon {
  margin-left: 15px;
}

.status-icon svg {
  width: 40px;
  height: 40px;
  color: var(--info-color);
}

.status-info h3 {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.status-info p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-color);
}

.power-line-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  
}


.power-line-card.active {
  border-right: 4px solid var(--success-color);
    background-color: #d4f8d4;
   animation: pulse 2s infinite;
}

.power-line-card.inactive {
  border-right: 4px solid var(--danger-color);
  opacity: 0.8;
        background-color: #f8d4d4;
     
}
.power-line-card.offline {
  opacity: 0.7;
  background-color: #f5f5f5;
  border-left: 4px solid gray;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-header h3 {
  font-size: 1.2rem;
  color: var(--dark-color);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  transition: var(--transition);
}

.power-line-card.active .status-indicator {
  background: var(--success-color);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.power-line-card.inactive .status-indicator {
  background: var(--danger-color);
}

.status-text {
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}


.status-text::after {
  content: "▼";
  font-size: 12px;
}


.line-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 300px; }
}

.detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.detail-item span:first-child {
  color: var(--text-light);
}

.detail-value {
  font-weight: 700;
  color: var(--dark-color);
}

.action-buttons {
  text-align: center;
  margin: 30px 0;
}

.action-buttons button {
  background: #4A8C8C;
  border: none;
  color: white;
  padding: 12px 25px;
  margin: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  min-width: 150px; /* <-- خليهن نفس العرض */
  text-align: center;
}

.action-buttons button:hover {
  background: #3a6d6d;
}

/* تأثيرات النقر */
button:active {
  transform: translateY(0) !important;
}
/* زر التثبيت المعدل */
.install-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  background: white;
  color: #333;
  border: none;
  padding: 10px 15px;
  border-radius: 12px;
  font-family: 'Tajawal', sans-serif;
  box-shadow: 0 3px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.install-btn img.app-icon {
  width: 30px;
  height: 30px;
}

.install-hint {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 15px;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  z-index: 1000;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.install-hint h3 {
  margin-top: 0;
  color: #4A8C8C;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.step-icon {
  font-size: 24px;
  min-width: 30px;
}

.close-hint {
  position: absolute;
  top: 5px;
  left: 10px;
  font-size: 20px;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* أيقونات الخطوات */
.step-icon img {
  width: 24px;
  height: 24px;
}

/* التجاوب مع مختلف أحجام الشاشات */
@media (max-width: 480px) {
  .login-box {
    padding: 25px 20px;
  }
  
  .current-status-card, .power-line-card {
    padding: 16px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .primary-btn, .secondary-btn {
    justify-content: center;
  }
}

/* أضف هذا في ملف style.css */



@keyframes slideIn {
  from { transform: translateY(-100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-100px); opacity: 0; }
}

    #loadingPage {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background:#ffff;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      z-index: 9999;
      user-select: none;
    }

    .loader-box {
      background: #fff;
      padding: 40px 60px;
      border-radius: 20px;
      box-shadow: 0 8px 30px rgba(0,0,0,0.15);
      text-align: center;
      max-width: 320px;
      width: 90%;
      animation: fadeInScale 0.8s ease forwards;
    }

    .loader-box img {
      width: 120px;
      height: 120px;
      margin-bottom: 25px;
      object-fit: contain;
      user-drag: none;
      user-select: none;
    }

    .loading-text {
      font-size: 22px;
      color: #222;
      font-weight: 600;
      letter-spacing: 0.04em;
      animation: pulseText 1.5s infinite ease-in-out;
    }

    @keyframes pulseText {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    @keyframes fadeInScale {
      from {
        opacity: 0;
        transform: scale(0.85);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }