:root {
  --primary-color: #4dabf7;
  --primary-dark: #339af0;
  --secondary-color: #51cf66;
  --warning-color: #ffd43b;
  --danger-color: #ff6b6b;
  --background-color: #0f0f0f;
  --background-secondary: #1a1a1a;
  --card-color: #1e1e1e;
  --card-hover: #252525;
  --card-darker: #181818;
  --text-color: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: rgba(255, 255, 255, 0.1);
  --header-bg: #16213e;
  --nav-bg: #1a1a2e;
  --nav-active: #4dabf7;
  --nav-hover: rgba(255, 255, 255, 0.05);
  --button-text: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: radial-gradient(
      circle at 20% 50%,
      rgba(77, 171, 247, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(81, 207, 102, 0.03) 0%,
      transparent 50%
    );
  background-attachment: fixed;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Remove old header styles (now handled by nav) */
/* Remove old header styles (now handled by nav) */
.header {
  display: none;
}

/* Legacy nav compatibility */
.nav {
  display: none;
}

.logo-container {
  display: none;
}

/* Typography */
h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
}

h2 {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 24px;
  font-weight: 600;
}

h3 {
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 600;
}

/* Modern Cards */
.card {
  background: var(--card-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(77, 171, 247, 0.3);
}

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

.grid-1-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
  .grid-1-2 {
    grid-template-columns: 1fr;
  }
}

.full-width {
  grid-column: 1 / -1;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

/* Modern Form Inputs */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  font-family: inherit;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-color);
  transition: all 0.3s ease;
}

input[type="color"] {
  background-color: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border-color);
  height: 45px;
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--button-text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  min-width: 100px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(77, 171, 247, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 171, 247, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #40c057 100%);
  box-shadow: 0 2px 8px rgba(81, 207, 102, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 4px 12px rgba(81, 207, 102, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #fa5252 100%);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #fcc419 100%);
  color: #000;
  box-shadow: 0 2px 8px rgba(255, 212, 59, 0.3);
}

.btn-warning:hover {
  box-shadow: 0 4px 12px rgba(255, 212, 59, 0.4);
}

.btn-small,
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 80px;
}

.btn-edit {
  background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
}

.btn-delete {
  background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
}

.btn-complete {
  background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.btn-incomplete {
  background: linear-gradient(135deg, #ffd43b 0%, #fcc419 100%);
  color: #000;
}

/* Modern Progress Bar */
.progress-container {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  height: 28px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #51cf66 0%, #40c057 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    left: 100%;
  }
}

/* Etapy */
.stage {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
  background-color: var(--card-color);
  border: none;
  position: relative;
}

.stage:hover {
  transform: none;
  box-shadow: none;
}

.stage h3 {
  margin-top: 0;
  text-align: left;
}

/* Etap z paskiem po lewej */
.stage,
.focus-item,
.book,
.review {
  border-left: 4px solid #f39c12;
  padding-left: 15px;
}

/* Podkroki */
.substep {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  background-color: #333333;
  border: none;
}

.substep:hover {
  transform: none;
  box-shadow: none;
}

.substep.complete {
  background-color: rgba(46, 204, 113, 0.2);
  border-left: 4px solid #2ecc71;
}

.substep.incomplete {
  background-color: rgba(243, 156, 18, 0.2);
  border-left: 4px solid #f39c12;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-start;
}

/* Karty materiałów/fokusów/powtórek */
.book,
.review,
.focus-item {
  padding: 15px;
  background-color: var(--card-color);
  border-radius: 4px;
  margin-bottom: 15px;
}

.book:hover,
.review:hover,
.focus-item:hover {
  transform: none;
  box-shadow: none;
}

.high-priority {
  border-left: 4px solid var(--danger-color) !important;
}

/* Notatki i treści */
.content,
.notes {
  background-color: var(--card-darker);
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

/* Kalendarz */
.calendar-container {
  margin-bottom: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 100%;
}

.calendar-cell {
  aspect-ratio: 1;
  border: 1px solid #333333;
  padding: 3px;
  position: relative;
  min-width: 30px;
  max-width: 40px;
  height: 40px;
  font-size: 0.85rem;
}

.calendar-day-name {
  text-align: center;
  font-weight: bold;
  background-color: #333333;
}

.calendar-day {
  background-color: var(--card-color);
}

.calendar-day.today {
  border: 2px solid var(--primary-color);
}

.calendar-day.empty {
  background-color: #333333;
}

.day-number {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 12px;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 20px;
}

.event {
  height: 4px;
  border-radius: 2px;
}

/* Szczegóły dnia */
.day-events-list {
  list-style: none;
  padding: 0;
}

.day-event-item {
  margin-bottom: 10px;
  padding: 10px;
  background-color: #333333;
  border-radius: 4px;
  border: none;
}

.day-event-item:hover {
  transform: none;
  box-shadow: none;
}

.day-event-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.day-event-title {
  font-weight: bold;
}

.day-event-time {
  font-size: 0.9em;
  color: #aaa;
}

.day-event-desc {
  font-size: 0.9em;
  margin-bottom: 10px;
}

.day-event-actions {
  text-align: right;
}

/* Modern Alerts */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid;
  backdrop-filter: blur(10px);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  content: "";
  font-size: 20px;
}

.alert.success,
.alert-success {
  background: rgba(81, 207, 102, 0.15);
  border-color: var(--secondary-color);
  color: #51cf66;
}

.alert.success::before,
.alert-success::before {
  content: "✓";
}

.alert.warning,
.alert-warning {
  background: rgba(255, 212, 59, 0.15);
  border-color: var(--warning-color);
  color: #ffd43b;
}

.alert.warning::before,
.alert-warning::before {
  content: "⚠";
}

.alert.error,
.alert-error {
  background: rgba(255, 107, 107, 0.15);
  border-color: var(--danger-color);
  color: #ff6b6b;
}

.alert.error::before,
.alert-error::before {
  content: "✕";
}

.alert.info,
.alert-info {
  background: rgba(77, 171, 247, 0.15);
  border-color: var(--primary-color);
  color: #4dabf7;
}

.alert.info::before,
.alert-info::before {
  content: "ℹ";
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
  border-radius: 10px;
  border: 2px solid var(--background-color);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #74c0fc 0%, #4dabf7 100%);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

@media print {
  .no-print,
  .no-print * {
    display: none !important;
  }
}
