:root {
  color-scheme: light dark;
  font-family: 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

body {
  margin: 0;
  background: #f3f4f6;
  color: #111827;
}

.auth-wrapper {
  min-height: 100vh;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  background: linear-gradient(135deg, #f9fafb, #e5e7eb);
  padding: 2rem;
}

.auth-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
  text-align: center;
}

.auth-title {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  color: #111827;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  color: #6b7280;
}

.auth-form .form-group {
  text-align: left;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 0.4rem;
}

input[type='password'] {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

.btn {
  border: none;
  border-radius: 0.75rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: #2563eb;
  color: #fff;
}

.btn.ghost {
  background: transparent;
  color: #1f2937;
  border: 1px solid rgba(31, 41, 55, 0.2);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.alert {
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.alert.error {
  background: #fee2e2;
  color: #b91c1c;
}

.page-wrapper {
  max-width: 1024px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 1.5rem;
}

.page-header {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
  font-size: 2.5rem;
}

.subtitle {
  color: #6b7280;
  margin: 0.2rem 0 0;
}

/* Grid layout - using floats for old Safari compatibility */
.grid {
  width: 100%;
  overflow: hidden; /* Clear floats */
}

.grid::after {
  content: "";
  display: table;
  clear: both;
}

.grid .panel {
  width: 48%;
  float: left;
  margin-right: 4%;
  box-sizing: border-box;
}

.grid .panel:last-child {
  margin-right: 0;
}

/* Fallback for browsers that support flexbox but not grid */
@supports (display: flex) {
  .grid {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  
  .grid .panel {
    width: 48%;
    float: none;
    margin-right: 0;
  }
}

.panel {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.12);
  min-height: 520px;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}

.panel-header {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-list,
.tasks-list {
  overflow-y: auto;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding-right: 0.5rem;
}

.calendar-item,
.task-item {
  border-radius: 1rem;
  padding: 1rem;
  background: #f9fafb;
  margin-bottom: 0.75rem;
}

.calendar-item .time {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.3rem;
}

.subject {
  font-weight: 600;
  margin: 0;
}

.meta,
.meta-row span {
  color: #6b7280;
  font-size: 0.85rem;
}

.meta-row {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.meta-row span {
  margin-right: 0.5rem;
}

.meta-row span:last-child {
  margin-right: 0;
}

.empty-state {
  text-align: center;
  color: #9ca3af;
  margin-top: 2rem;
}

.footer-note {
  text-align: center;
  margin-top: 1rem;
  color: #9ca3af;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .grid .panel {
    width: 100%;
    float: none;
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
  
  .grid .panel:last-child {
    margin-bottom: 0;
  }
}

