/* General Reset */
body, h1, h2, h3, p, ul, ol, li, form, input, button, textarea, a {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Body Styling with Pattern */
body {
  /* Base background color */
  background-color: #f4f4f4;
  
  /* Rotated squares pattern with gradient overlay */
  background-image: 
      linear-gradient(to bottom, rgba(244, 244, 244, 0.8) 0%, rgba(255, 255, 255, 1) 100%),
      linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0),
      linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, 20px 20px;
  background-attachment: fixed;
  
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation Bar */
header {
  background-color: #414758;
  color: white;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-right: 2rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

nav ul li a:hover {
  color: #D8C3A5;
}

.user-welcome {
  color: white;
  font-weight: bold;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 1rem auto;
  background: transparent;
}

/* Layout container */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 600px;
  background: transparent;
  gap: 1rem;
}

/* Panels */
.filters-panel, .create-panel, .tabs-panel {
  padding: 1.5rem;
  height: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.filters-panel::before, 
.create-panel::before, 
.tabs-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6C567B, #9A8C98, #6C567B);
  opacity: 0.7;
}

h2 {
  color: #333;
  margin-bottom: 1.2rem;
  text-align: center;
}

/* Filter Panel */
.filters-panel {
  padding: 1.5rem;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.filter-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fafafa;
}

.filter-group input:focus {
  border-color: #9A8C98;
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 140, 152, 0.2);
  background-color: white;
}

/* Create Panel */
#create-button {
  width: 100%;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #9A8C98;
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 140, 152, 0.2);
  background-color: white;
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Tabs Panel */
.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.tab {
  padding: 0.8rem;
  background: #f9f9f9;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
  font-weight: bold;
}

.tab h3 {
  color: #333;
  margin: 0;
  font-size: 1.1rem;
}

.tab:hover {
  color: #6C567B;
  transform: translateX(-2px);
  background: #f0f0f0;
}

#no-tabs-message {
  text-align: center;
  color: #777;
  margin-top: 2rem;
}

/* Buttons */
.primary-button {
  background: #9A8C98;
  color: white;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
  background: #6C567B;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.secondary-button {
  background: #e0e0e0;
  color: #333;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.secondary-button:hover {
  background: #ccc;
}

/* Responsive Design */
@media (max-width: 1000px) {
  .container {
    grid-template-columns: 1fr 1fr;
  }
  
  .tabs-panel {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .tabs-panel {
    grid-column: span 1;
  }
  
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    margin-bottom: 0.5rem;
  }
  
  .user-welcome {
    align-self: flex-end;
    margin-top: -2rem;
  }
}

/* Footer Styling */
.footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #666;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.copyright {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.footer-note {
  font-size: 0.8rem;
  color: #888;
}

@media (max-width: 768px) {
  .copyright {
    font-size: 0.8rem;
  }
  
  .footer-note {
    font-size: 0.75rem;
  }
}