/* ADYS - Akademik Dosya Yükleme Sistemi */
/* Ana Stil Dosyası */

:root {
  --primary: #1e3a5f;
  --primary-light: #2d5a8e;
  --primary-dark: #142840;
  --secondary: #c8102e;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ====== NAVBAR ====== */
.navbar {
  background: var(--primary);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.navbar-brand .logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: white;
}

.navbar-brand .logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  line-height: 1;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.navbar-user .user-name {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.navbar-user .user-role {
  font-size: 11px;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 20px;
  color: white;
}

.btn-logout {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(255,255,255,0.2);
}

/* ====== LAYOUT ====== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ====== CARDS ====== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-info:hover:not(:disabled) {
  background: #2563eb;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-icon {
  padding: 6px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

.btn-icon:hover {
  background: var(--bg);
}

/* ====== BADGES & TAGS ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-muted   { background: #f1f5f9; color: #64748b; }

/* ====== STATS ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ====== PROGRESS BAR ====== */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  background: var(--success);
}

.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--danger); }

/* ====== ASSIGNMENT ITEMS ====== */
.assignment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assignment-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.assignment-item:hover {
  box-shadow: var(--shadow-md);
}

.assignment-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
}

.assignment-header:hover {
  background: var(--surface-hover);
}

.assignment-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assignment-title .icon {
  font-size: 20px;
}

.assignment-title .title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.assignment-title .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.assignment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deadline {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.deadline.overdue { color: var(--danger); }
.deadline.soon    { color: var(--warning); }

.assignment-body {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  display: none;
}

.assignment-body.open {
  display: block;
}

/* ====== FILE UPLOAD ====== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: #f0f4ff;
}

.upload-zone .upload-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.upload-zone .upload-text {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  font-size: 13px;
  color: #166534;
  margin-top: 8px;
}

/* ====== TABLE ====== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--primary);
  color: white;
  padding: 12px 14px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-hover);
}

tbody td {
  padding: 12px 14px;
  color: var(--text);
}

tbody tr.not-submitted {
  background: #fff7f7;
}

tbody tr.not-submitted td {
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ====== COURSE SECTION ====== */
.course-section {
  margin-bottom: 24px;
}

.course-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: white;
  cursor: pointer;
  user-select: none;
}

.course-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-header .course-meta {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.course-header .chevron {
  transition: transform 0.3s;
}

.course-header.collapsed .chevron {
  transform: rotate(-90deg);
}

.course-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px;
}

/* ====== FORM ELEMENTS ====== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
}

.modal-close:hover { background: var(--bg); }

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ====== ALERTS ====== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ====== TOGGLE ====== */
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle input[type="checkbox"] {
  display: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle input:checked ~ .toggle-track {
  background: var(--success);
}

.toggle input:checked ~ .toggle-track::after {
  left: 22px;
}

.toggle-label {
  font-size: 14px;
  color: var(--text);
}

/* ====== LOADING ====== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
}

/* ====== SECTION DIVIDER ====== */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ====== TABS ====== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab:hover { color: var(--primary); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(30, 58, 95, 0.04);
}

.tab-count {
  font-weight: 600;
  margin-left: 2px;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* ====== TOOLTIP ====== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ====== FOOTER ====== */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: var(--surface);
}
