/* ASTI LMS - Modern University Style */
:root {
  --teal: #d41313;
  --teal-light: #000000;
  --green: #00257b;
  --green-light: #0b0a0a;
  --bg: #fafafa;
  --card: #ffffff;
  --text: black;
  --text-muted: #000000;
  --border: #010257;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --radius: 12px;
}
[data-theme="dark"] {
  --bg: #18191a;
  --card: #242526;
  --text: #ffffff;
  --text-muted: #b0b3b8;
  --border: #3a3b3c;
  --shadow: 0 2px 8px rgba(0,0,0,.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
  transition: background .2s, color .2s;
    direction: rtl;
  text-align: left;
  background-image:url("/assets/back5.jpg"); background-repeat: no-repeat; background-position: center;
  background-size: cover;

  
[dir="rtl"] body { 
  font-family: "Segoe UI", Tahoma, Arial, sans-serif; 
}
a { 
  color: var(--teal);
   text-decoration: none; 
  }
a:hover { 
  text-decoration: underline; 
}

/* ====== AUTH (login/register) ====== */
.auth-wrap {
  justify-content: flex-start;
  display: flex;
    position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
 justify-self: flex-start;
  padding: 20px;
  direction: rtl;
  text-align: center;
   
}
.auth-card {
  position: absolute;
  width: 380px;
  max-width: 90%;
  background:rgb(4, 16, 171);
   border: 4px rgb(240, 233, 10) solid;
/*max-width: 700px;*/
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  padding: 36px 30px;
  text-align: center;
   justify-content: flex-end;
  display: flex;
  margin-left: 8%;
  flex-direction: column;
  gap: 15px;
    background-image:url("/assets/back1.jpg");
    top: 15%;
    display: block;
}
.auth-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  color: #000000;
align-content: center;
  text-align: center;
  justify-content: center;
  font-weight: 700;
  font-size:16px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  background-image:url("/assets/back1.jpg");
  display: block;
  margin: 0 auto 14px auto;
}
.note{
color: black;
 position: absolute;
 left: 25px;
 top: 20%;
 font-size:32px;
 font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.instraction{
 color:black;
 position: absolute;
  font-size:26px;
  left: 25px;
  top: 52%;
}
.img{
  position: absolute;
  top: 2px;
  left: 5px;
display: flex;
  justify-content: flex-end;
  width: 100%;

}
.Navigation{
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: center;
  padding: 15px 0;
  margin-left: 50px;
  background-color: #000000;
  border-bottom: 3px solid #e2d708;
  text-decoration: dashed;
  
}

.Nav_links a{
color: #ffffff;
margin-right: 25px;
font-weight: bold;
top: -8px;
font-size: 30px;
cursor: pointer;
text-decoration: dashed blue;
padding: 10px 15px;
position: relative;
z-index: 1000;
display: inline-block;
cursor: pointer;
}

.Nav_links a:hover{
  color:#d9232d;
  top: -3px;
  text-decoration: underline blue;
}


/* تنسيق صفحة About */
.about-section {
    Max-width: 800px;
    Margin: auto;
    Background: white;
    Padding: 30px;
    Border-radius: 10px;
    Box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* تنسيق نموذج الاتصال */
.contact-container {
    Max-width: 500px;
    Margin: auto;
    Background: white;
    Padding: 25px;
    Border-radius: 8px;
    Box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-form input, .contact-form textarea {
    Width: 100%;
    Padding: 10px;
    Margin: 10px 0;
    Border: 1px solid #ccc;
    Border-radius: 5px;
}

.btn-submit {
    Background-color: #d9232d; /* لون أحمر مناسب للشعار */
    Color: white;
    Padding: 10px 20px;
    Border: none;
    Border-radius: 5px;
    Cursor: pointer;
    Font-size: 16px;
}

.btn-submit:hover {
    Background-color: #b01b24;
}






.auth-card h1 {
  font-size: 22px;
  color: var(--teal);
  margin-bottom: 4px;
}
.auth-card p.sub { 
  color: var(--text-muted);
   font-size: 14px;
    margin-bottom: 20px;
   }
.form-group { 
   text-align: start;
   margin-bottom: 14px;
 }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: black;
   text-align: left;
   font-weight: bold;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  font-size: 20px;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
 
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15,76,92,.15);
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}
.btn:hover { 
  opacity: .92; 
}
.btn:active { 
  transform: translateY(1px); 
}
.btn-primary {
  background: var(--teal); color: #fff; width: 100%;
 }
.btn-secondary {
   background: var(--green); color: #fff; 
  }
.btn-outline { background: transparent; color: var(--teal); border: 1px solid var(--teal); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.lang-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.lang-row button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
}
.lang-row button.active { background: var(--teal); color: #fff; border-color: var(--teal); }

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}
.alert.error { background: #fde2e2; color: #b71c1c; display: block; }
.alert.success { background: #def7e3; color: #1b5e20; display: block; }

.auth-footer { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* ====== NAVBAR ====== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--teal); font-size: 18px;
}
.nav-logo {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.nav-links { display: flex; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { background: var(--bg); text-decoration: none; }
.nav-links a.active { color: var(--teal); background: rgba(15,76,92,.1); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: var(--border); }
.lang-select {
  background: var(--bg); color: var(--text);
  border: none; padding: 7px 10px; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 13px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.mobile-toggle { display: none; }

/* ====== LAYOUT ====== */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.page-title { font-size: 24px; color: var(--teal); margin-bottom: 16px; }
.page-sub { color: var(--text-muted); margin-bottom: 20px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.card h3 { color: var(--teal); margin-bottom: 6px; font-size: 17px; }
.card p { color: var(--text-muted); font-size: 14px; }
.card .meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(46,139,87,.15); color: var(--green);
  text-transform: uppercase;
}
.badge.teal { background: rgba(15,76,92,.15); color: var(--teal); }
.badge.warn { background: #fff3cd; color: #856404; }
.badge.danger { background: #f8d7da; color: #721c24; }

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--teal);
}
.stat:nth-child(2n) { border-left-color: var(--green); }
.stat .num { font-size: 28px; font-weight: 700; color: var(--teal); }
.stat .lbl { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--bg); color: var(--text); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
tbody tr:hover { background: var(--bg); }

/* Feed */
.feed { max-width: 680px; margin: 0 auto; }
.composer { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.composer textarea {
  width: 100%; border: none; outline: none; resize: vertical;
  background: var(--bg); border-radius: 10px; padding: 10px 12px;
  color: var(--text); min-height: 60px; font-family: inherit;
}
.composer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.post {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.post.pinned { border-top: 3px solid var(--green); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .who { font-weight: 600; font-size: 14px; }
.post-head .when { font-size: 12px; color: var(--text-muted); }
.post-body { font-size: 15px; margin-bottom: 10px; white-space: pre-wrap; }
.post-actions { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.post-actions button {
  flex: 1; background: transparent; border: none; padding: 7px;
  border-radius: 8px; cursor: pointer; color: var(--text-muted); font-weight: 600; font-size: 13px;
}
.post-actions button:hover { background: var(--bg); }
.comments { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.comment { display: flex; gap: 8px; margin-bottom: 8px; }
.comment .bubble { background: var(--bg); padding: 8px 12px; border-radius: 14px; font-size: 13px; flex: 1; }
.comment .bubble b { display: block; font-size: 12px; color: var(--teal); }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; padding: 8px 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius);
  width: 100%; max-width: 480px; padding: 22px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.modal h3 { color: var(--teal); margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* Toast */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 14px; box-shadow: var(--shadow); z-index: 300; display: none;
}
.toast.show { display: block; animation: pop .25s ease-out; }
@keyframes pop { from { transform: translate(-50%, 12px); opacity: 0;} to {transform:translate(-50%,0); opacity:1;} }

/* Notifications list */
.notif-list .notif {
  background: var(--card); border-radius: 10px; padding: 12px 14px;
  box-shadow: var(--shadow); margin-bottom: 10px; display: flex; gap: 12px; align-items: start;
}
.notif.unread { border-inline-start: 4px solid var(--green); }
.notif .ic {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(15,76,92,.12); color: var(--teal);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Course detail */
.course-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.course-tabs button {
  background: transparent; border: none; padding: 10px 16px; cursor: pointer;
  font-weight: 600; color: var(--text-muted); border-bottom: 3px solid transparent;
}
.course-tabs button.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.material-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--card); border-radius: 10px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.material-item .ic { font-size: 22px; color: var(--teal); }
.material-item .meta { flex: 1; }
.material-item h4 { font-size: 14px; color: var(--text); }
.material-item p { font-size: 12px; color: var(--text-muted); }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--card); padding: 10px; box-shadow: var(--shadow); }
  .nav-links.show { display: flex; }
  .mobile-toggle { display: inline-flex; }
  .nav-brand span.full { display: none; }
}

/* RTL adjustments */
[dir="rtl"] .stat { border-left: none; border-right: 4px solid var(--teal); }
[dir="rtl"] .stat:nth-child(2n) { border-right-color: var(--green); }
[dir="rtl"] .notif.unread { border-inline-start: 4px solid var(--green); }

}