@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

nav {
  background-color: white;
  width: 100%;
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

nav img {
  height: 2.3rem;
  width: auto;
  display: block;
  margin: 15px auto 5px auto;
}

nav .logout-container {
  width: 40px;
  margin-left: 20px;
}

#uploadedFiles {
  text-align: center;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100%;
}

body {
  background-image: url('https://images.unsplash.com/photo-1526289034009-0240ddb68ce3');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.card {
  width: 100%;
  max-width: 20rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  box-sizing: border-box;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: black;
  margin-top: 0;
  margin-bottom: 1rem;
}

.instruction-block {
  background-color: #f3f4f6;
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: black;
  display: flex;
  align-items: flex-start;
}

.instruction-block .icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: black;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: black;
  box-shadow: 0 0 0 1px black;
}

button {
  width: 100%;
  background-color: black;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert {
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #34d399;
  color: #065f46;
}

.alert .icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.alert-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alert-description {
  font-size: 0.75rem;
}

.hidden {
  display: none;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.flex {
  display: flex;
}

.justify-center {
  justify-content: center;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.data-list {
  max-height: 60vh;
  overflow-y: auto;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* Updated data item styles */
.data-item {
  display: flex;
  align-items: center;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  gap: 1rem;
}

.data-item:last-child {
  margin-bottom: 0;
}

.data-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.data-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  flex: 0 0 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-field {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.data-value {
  font-size: 0.875rem;
  color: #1f2937;
  text-align: right;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.125rem 0;
  display: block;
}

.edit-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
  width: auto;
}

.edit-button .icon {
  width: 0.75rem;
  height: 0.75rem;
  color: #6b7280;
  pointer-events: none;
}

.data-input {
  font-size: 0.825rem;
  text-align: right;
  width: 100%;
  max-width: 120px;
  padding: 0.1rem 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  height: 1.2rem;
  background-color: white;
  position: relative;
  top: -1px;
}

.data-input:focus {
  outline: none;
  border: 2px solid black;
  padding: 0 0.2rem;
}

.missing-data-input {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.5rem !important;
  font-size: 0.875rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.25rem !important;
  margin-bottom: 1rem !important;
  text-align: left !important;
  background-color: white !important;
  background-image: none !important;
}

select.missing-data-input {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
  background-size: 1.25em 1.25em !important;
}

.missing-data-input:focus {
  outline: none !important;
  border-color: black !important;
  box-shadow: 0 0 0 1px black !important;
}

.loader {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.loader .icon {
  animation: spin 1s linear infinite;
  width: 1.5rem;
  height: 1.5rem;
  color: black;
}

.icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

.processing-info {
  font-size: 1.0rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.processing-message img {
  margin-top: 15px;
  margin-bottom: 15px;
  width: 2rem;
  height: 2rem;
}

footer {
  background-color: white;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: black;
  width: 100%;
}

footer a {
  color: black;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

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

.ml-2 {
  margin-left: 0.5rem;
}

#uploadedFiles {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

#uploadedFiles h3 {
  margin-bottom: 0.5rem;
}

#uploadedFiles .flex {
  justify-content: center;
  margin-bottom: 0.25rem;
}

#documentTypeSelect, 
#categorySelect, 
select#missingField {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25em 1.25em;
}

#documentTypeSelect:focus,
#categorySelect:focus, 
select#missingField:focus {
  outline: none;
  border-color: black;
  box-shadow: 0 0 0 1px black;
}

select.data-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25em 1.25em;
  max-width: 120px !important;
  text-align: right !important;
}

select.data-input:focus {
  outline: none !important;
  border-color: black !important;
  box-shadow: 0 0 0 1px black !important;
}

.flatpickr-calendar {
  background-color: white !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.25rem !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-day {
  padding: 0.5rem !important;
  border-radius: 0.25rem !important;
  cursor: pointer !important;
  color: black !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.flatpickr-day:hover {
  background-color: #f3f4f6 !important;
}

.flatpickr-day.selected {
  background-color: black !important;
  color: white !important;
  text-align: center !important;
  border-color: black !important;
}

.flatpickr-day.today {
  border: 1px solid #d1d5db !important;
}

.flatpickr-months .flatpickr-month {
  background-color: white !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
  border-bottom-color: black !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-top-color: black !important;
}

@keyframes fade-in-out {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.fade-in-out {
  animation: fade-in-out 1.0s ease;
}

.drop-zone {
  border: 2px dashed #ccc;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.drop-zone.highlight {
  background-color: #f0f0f0;
  border-color: #007bff;
}

.button-container {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: #f9fafb;
  border-radius: 0.375rem;
}

.uploaded-file p {
  margin: 0;
  flex: 1;
  padding-right: 1rem;
}

.uploaded-file .edit-button {
  padding: 0.25rem;
  margin: 0;
}

.dashboard-table {
  background-color: white;
  font-size: 0.875rem;
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  border: 1px solid black;
  padding: 0.5rem;
}

.dashboard-table th {
  background-color: #f9fafb;
  font-weight: 500;
}

.dashboard-table tr:hover {
  background-color: #f9fafb;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.env-settings .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

#columnMapping .settings-card,
#monthFolders .settings-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#columnMapping select,
#monthFolders select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background-color: white;
}

#columnMapping label,
#monthFolders label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.settings-card {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.month-card {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.folder-select-container {
  margin-top: 0.5rem;
}

.folder-select-container label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.save-button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem;
  background: black;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

.save-button:hover {
  background: #333;
}

.statistics-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  width: 100%;
}

.statistics-card {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.statistics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.statistics-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #374151;
}

.statistics-value {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin: 0.5rem 0 1rem;
  padding: 0.5rem;
}

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

.chart-container {
  min-height: 400px;
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.statistics-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.report-button:hover {
  background-color: #e5e7eb;
}

.report-button img {
  width: 1.25rem;
  height: 1.25rem;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

.project-button {
  flex: 1;
  background-color: white;
  border: 1px solid #d1d5db;
  color: black;
  padding: 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.project-button:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.project-search,
.missing-data-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  margin-bottom: 1rem;
}

.project-search:focus {
  outline: none;
  border-color: black;
  box-shadow: 0 0 0 1px black;
}

.search-results {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  margin-top: -0.25rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-results .search-result {
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  color: #374151;
}

.search-results .search-result:hover {
  background-color: #f3f4f6;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

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

.confirm-data-button {
  margin-top: 3rem;
}
