/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --bg-color: #f9fafb;
  --text-color: #111827;
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #e5e7eb;
  --secondary-text: #4b5563;
  --border-color: #d1d5db;
  --card-bg: #ffffff;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --success-color: #10b981;
  --notice-bg: #dbeafe;
  --notice-text: #1e40af;
  --alert-bg: #fee2e2;
  --alert-text: #991b1b;
  --input-bg: #ffffff;
}

:root[data-theme="dark"] {
  --bg-color: #111827;
  --text-color: #f9fafb;
  --primary-color: #6366f1;
  --primary-hover: #818cf8;
  --secondary-color: #374151;
  --secondary-text: #9ca3af;
  --border-color: #4b5563;
  --card-bg: #1f2937;
  --danger-color: #f87171;
  --danger-hover: #fca5a5;
  --success-color: #34d399;
  --notice-bg: #1e3a8a;
  --notice-text: #bfdbfe;
  --alert-bg: #7f1d1d;
  --alert-text: #fecaca;
  --input-bg: #374151;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-color: #111827;
    --text-color: #f9fafb;
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --secondary-color: #374151;
    --secondary-text: #9ca3af;
    --border-color: #4b5563;
    --card-bg: #1f2937;
    --danger-color: #f87171;
    --danger-hover: #fca5a5;
    --success-color: #34d399;
    --notice-bg: #1e3a8a;
    --notice-text: #bfdbfe;
    --alert-bg: #7f1d1d;
    --alert-text: #fecaca;
    --input-bg: #374151;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input[type="submit"], .btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
  display: inline-block;
}

button:hover, input[type="submit"]:hover, .btn:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

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

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea, select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--input-bg);
  color: var(--text-color);
  box-sizing: border-box;
  margin-bottom: 1rem;
  font-family: inherit;
}

nav {
  background-color: var(--card-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

nav .nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav form {
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.notice, .alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  text-align: center;
}

.notice:empty, .alert:empty {
  display: none;
}

.notice {
  background-color: var(--notice-bg);
  color: var(--notice-text);
}

.alert {
  background-color: var(--alert-bg);
  color: var(--alert-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-gray {
  color: var(--secondary-text);
}

.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-actions h1 {
  margin: 0;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.task-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.task-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.task-card .task-meta {
  color: var(--secondary-text);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.task-card .task-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.message {
  background-color: var(--secondary-color);
  padding: 1rem;
  border-radius: 0.5rem;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--secondary-text);
}

.message-body {
  margin: 0;
}

/* Side menu */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.side-menu-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 80vw;
  height: 100%;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.side-menu--open {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.125rem;
}

.side-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.side-menu-close:hover {
  color: var(--danger-color);
  background: none;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  flex: 1;
}

.side-menu-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.15s;
}

.side-menu-link:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

.side-menu-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hamburger-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.hamburger-btn:hover {
  color: var(--primary-color);
  background: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}


.calendar-task--multi-day {
  border-left: 3px solid var(--primary-color);
}
