/* ========================================
   Qi Services - Main Stylesheet
   مطابق 100% لموقع ويكس الأصلي (وضع الموبايل)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Roboto:wght@400;700&display=swap');

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

body {
  font-family: 'Cairo', sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ========================================
   الصفحة الرئيسية (Home)
   ======================================== */
.home-page {
  min-height: 100vh;
  background-color: rgb(107, 131, 147);
  display: flex;
  flex-direction: column;
  align-items: center;
  direction: rtl;
}

.home-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8vh;
  min-height: 100vh;
}

.home-hero-image {
  width: 85%;
  max-width: 340px;
  border-radius: 4px;
  display: block;
}

.home-title {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 28px;
  color: #ffffff;
  text-align: center;
  margin-top: 16px;
}

.home-btn {
  display: block;
  width: 85%;
  max-width: 340px;
  padding: 18px 20px;
  background-color: rgb(237, 188, 28);
  border: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  margin-top: 20px;
}

.home-btn:hover {
  opacity: 0.9;
}

/* القائمة السفلية */
.home-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 80px;
  gap: 40px;
}

.home-nav a {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 40px;
  color: #ffffff;
  text-decoration: none;
  text-align: center;
}

.home-nav a:hover {
  opacity: 0.8;
}

/* ========================================
   صفحة Projects
   ======================================== */
.projects-page {
  min-height: 100vh;
  background-color: rgb(227, 227, 227);
  direction: ltr;
}

.projects-hero {
  background-color: rgb(218, 218, 218);
  padding: 50px 30px 40px;
  text-align: center;
}

.projects-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 35px;
  color: rgb(0, 0, 0);
  margin-bottom: 16px;
}

.projects-desc {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: rgb(0, 0, 0);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.projects-spacer {
  height: 200px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: #ffffff;
  padding: 40px 30px 30px;
  text-align: center;
  direction: ltr;
}

.footer-logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.footer-logo-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
  letter-spacing: 1px;
}

.footer-desc {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: rgb(130, 130, 130);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 24px;
}

.footer-info {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgb(0, 0, 0);
  line-height: 2;
}

.footer-copyright {
  margin-top: 24px;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: rgb(130, 130, 130);
}

/* ========================================
   صفحة النموذج (blank-4)
   ======================================== */
.form-page {
  min-height: 100vh;
  background-color: #ffffff;
  direction: rtl;
}

.form-header {
  margin: 20px;
  background-color: rgb(107, 131, 147);
  padding: 24px 20px 20px;
  border-radius: 4px;
}

.form-header h1 {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #ffffff;
  text-align: right;
  margin-bottom: 8px;
}

.form-header-line {
  width: 80%;
  height: 3px;
  background-color: rgb(237, 188, 28);
  margin-bottom: 12px;
}

.form-header p {
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #ffffff;
  text-align: right;
}

.form-body {
  padding: 24px 20px 40px;
}

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

.form-group label {
  display: block;
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: rgb(0, 0, 0);
  margin-bottom: 8px;
  text-align: right;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgb(200, 200, 200);
  border-radius: 4px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  outline: none;
  background-color: #ffffff;
  direction: rtl;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23EDBC1C' d='M2 5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 14px;
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}

.btn-submit {
  width: 100%;
  padding: 18px 20px;
  background-color: rgb(237, 188, 28);
  border: none;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  cursor: pointer;
}

.btn-submit:hover {
  opacity: 0.9;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-cancel {
  width: 100%;
  padding: 18px 20px;
  background-color: rgb(230, 230, 230);
  border: none;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: rgb(0, 0, 0);
  cursor: pointer;
}

.btn-cancel:hover {
  opacity: 0.9;
}

/* ========================================
   صفحة النجاح
   ======================================== */
.success-page {
  min-height: 100vh;
  background-color: rgb(240, 240, 240);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  direction: rtl;
}

.success-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.success-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: #4CAF50;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg {
  width: 36px;
  height: 36px;
}

.success-title {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: rgb(237, 188, 28);
  margin-bottom: 8px;
}

.success-line {
  width: 60%;
  height: 2px;
  background-color: rgb(237, 188, 28);
  margin: 0 auto 24px;
}

.success-text {
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: rgb(130, 130, 130);
  line-height: 1.8;
  margin-bottom: 16px;
}

.success-text strong {
  color: rgb(0, 0, 0);
  font-weight: 700;
}

/* ========================================
   لوحة التحكم Admin
   ======================================== */
.admin-page {
  min-height: 100vh;
  background-color: #1a1a2e;
  direction: rtl;
  font-family: 'Cairo', sans-serif;
}

/* Login */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-box {
  background-color: #16213e;
  border-radius: 16px;
  padding: 40px 30px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.admin-lock-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgb(237, 188, 28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.admin-login-box h2 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 24px;
}

.admin-login-box input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #333;
  border-radius: 8px;
  background-color: #0f3460;
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  text-align: center;
  outline: none;
  margin-bottom: 16px;
}

.admin-login-box .btn-login {
  width: 100%;
  padding: 14px;
  background-color: rgb(237, 188, 28);
  border: none;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #1a1a2e;
  cursor: pointer;
}

.admin-error {
  color: #ff6b6b;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Dashboard */
.admin-header {
  background-color: #16213e;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgb(237, 188, 28);
}

.admin-header h1 {
  color: #fff;
  font-size: 20px;
  margin: 0;
}

.admin-header h1 span {
  color: rgb(237, 188, 28);
}

.admin-header .btn-refresh {
  padding: 8px 16px;
  background-color: rgb(237, 188, 28);
  border: none;
  border-radius: 6px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
}

/* Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 20px;
}

.stat-card {
  background-color: #16213e;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-card.green { border-top: 3px solid #4CAF50; }
.stat-card.blue { border-top: 3px solid #2196F3; }
.stat-card.gold { border-top: 3px solid rgb(237, 188, 28); }
.stat-card.red { border-top: 3px solid #ff6b6b; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-card.green .stat-value { color: #4CAF50; }
.stat-card.blue .stat-value { color: #2196F3; }
.stat-card.gold .stat-value { color: rgb(237, 188, 28); }
.stat-card.red .stat-value { color: #ff6b6b; }

.stat-label {
  color: #aaa;
  font-size: 13px;
}

/* Tabs */
.admin-tabs {
  display: flex;
  padding: 0 20px;
  margin-bottom: 16px;
}

.admin-tabs button {
  flex: 1;
  padding: 12px;
  background-color: #16213e;
  color: #aaa;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.admin-tabs button:first-child { border-radius: 8px 0 0 8px; }
.admin-tabs button:last-child { border-radius: 0 8px 8px 0; }
.admin-tabs button.active {
  background-color: rgb(237, 188, 28);
  color: #1a1a2e;
}

/* Content */
.admin-content {
  padding: 0 20px 40px;
}

.submission-card {
  background-color: #16213e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  border-right: 4px solid rgb(237, 188, 28);
}

.submission-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.submission-card-header h3 {
  color: #fff;
  font-size: 18px;
  margin: 0;
}

.btn-delete {
  background-color: #ff4444;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row .label { color: #888; font-size: 14px; }
.info-row .value { color: #ddd; font-size: 14px; text-align: left; max-width: 60%; word-break: break-all; }

.visitor-card {
  background-color: #16213e;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
  border-right: 4px solid #2196F3;
}

.visitor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.visitor-card-header .country { color: #fff; font-size: 16px; }
.visitor-card-header .time { color: #888; font-size: 12px; }

.visitor-card-details {
  display: flex;
  justify-content: space-between;
  color: #aaa;
  font-size: 13px;
}

.country-row {
  background-color: #16213e;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.country-row .name { color: #fff; font-size: 16px; }

.country-row .badge {
  background-color: rgb(237, 188, 28);
  color: #1a1a2e;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
}

.empty-state {
  background-color: #16213e;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
}

.empty-state p {
  color: #666;
  font-size: 16px;
}
