/* Reset + base */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

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

/* Header */
header {
  background-color: #0b243b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Email status indicator dot */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

/* Idle / checking — grey pulse */
.status-dot.status-idle {
  background-color: #9ca3af;
  animation: pulse-grey 1.4s ease-in-out infinite;
}

/* Archived — green pulse */
.status-dot.status-exists {
  background-color: #22c55e;
  animation: pulse-green 1.4s ease-in-out infinite;
}

/* Not archived — red pulse */
.status-dot.status-missing {
  background-color: #ef4444;
  animation: pulse-red 1.4s ease-in-out infinite;
}

@keyframes pulse-grey {
  0%, 100% { box-shadow: 0 0 0 0 rgba(156, 163, 175, 0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(156, 163, 175, 0); }
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
}

.logo span {
  color: #5ac8fa;
}

.open-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

/* Form container */
.container {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.875rem;
  color: #374151;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.4rem 0.6rem !important;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
} /* ========= 🔽 SELECT + OPTION STYLING ========= */

.select,
select {
  width: 100%;
  padding: 0.3rem 0.6rem;
  font-size: 0.875rem;
  color: #374151;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='gray'><path stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.select:focus,
select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}

/* Scrollbar styling for dropdown (only works in some browsers) */
select::-webkit-scrollbar {
  width: 8px;
}
select::-webkit-scrollbar-thumb {
  background-color: #9ca3af;
  border-radius: 4px;
}
select::-webkit-scrollbar-thumb:hover {
  background-color: #6b7280;
}

/* Option styling */
option {
  color: #111827;
  background-color: #fff;
  padding: 0.5rem;
}

/* On hover or selected (some browsers only) */
option:hover,
option:checked {
  background-color: #e0e7ff;
  color: #1e3a8a;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #e5e7eb;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer-btns {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
}

.meta {
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 0.2rem;
}

/* *********** Tailwind ********** */
/* ========= 🎨 COLORS ========= */
.text-white {
  color: #ffffff;
}
.text-black {
  color: #000000;
}
.text-gray-500 {
  color: #6b7280;
}
.text-gray-700 {
  color: #374151;
}
.text-blue-500 {
  color: #3b82f6;
}
.text-green-500 {
  color: #10b981;
}
.text-red-500 {
  color: #ef4444;
}
.text-yellow-500 {
  color: #eab308;
}

/* ========= 🌈 BACKGROUNDS ========= */
.bg-white {
  background-color: #ffffff;
}
.bg-gray-50 {
  background-color: #f9fafb;
}
.bg-gray-100 {
  background-color: #f3f4f6;
}
.bg-gray-200 {
  background-color: #e5e7eb;
}
.bg-blue-500 {
  background-color: #3b82f6;
}
.bg-blue-600 {
  background-color: #2563eb;
}
.bg-green-500 {
  background-color: #10b981;
}
.bg-red-500 {
  background-color: #ef4444;
}
.bg-yellow-400 {
  background-color: #facc15;
}

/* ========= 📐 FLEXBOX ========= */
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.justify-around {
  justify-content: space-around;
}
.justify-evenly {
  justify-content: space-evenly;
}

.gap-0 {
  gap: 0;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}
.gap-10 {
  gap: 2.5rem;
}

/* ========= 🔘 BUTTONS ========= */
.btn {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: #3b82f6;
  color: #fff;
}
.btn-primary:hover {
  background-color: #2563eb;
}

.btn-success {
  background-color: #10b981;
  color: #fff;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}
.btn-outline:hover {
  background-color: #f3f4f6;
}

/* ========= ✏️ INPUTS ========= */
.input {
  display: block !important;
  width: 100% !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #374151 !important;
  background-color: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
  outline: none !important;
}

/* ========= 📏 WIDTHS ========= */
.w-1 {
  width: 0.25rem;
}
.w-2 {
  width: 0.5rem;
}
.w-4 {
  width: 1rem;
}
.w-8 {
  width: 2rem;
}
.w-16 {
  width: 4rem;
}
.w-32 {
  width: 8rem;
}
.w-48 {
  width: 12rem;
}
.w-64 {
  width: 16rem;
}
.w-80 {
  width: 20rem;
}
.w-96 {
  width: 24rem;
}
.w-full {
  width: 100%;
}
.w-screen {
  width: 100vw;
}

/* ========= 📐 HEIGHTS ========= */
.h-1 {
  height: 0.25rem;
}
.h-2 {
  height: 0.5rem;
}
.h-4 {
  height: 1rem;
}
.h-8 {
  height: 2rem;
}
.h-16 {
  height: 4rem;
}
.h-32 {
  height: 8rem;
}
.h-48 {
  height: 12rem;
}
.h-64 {
  height: 16rem;
}
.h-80 {
  height: 20rem;
}
.h-96 {
  height: 24rem;
}
.h-full {
  height: 100%;
}
.h-screen {
  height: 100vh;
}

/* ========= 🧱 UTILITIES ========= */
.rounded {
  border-radius: 0.375rem;
}
.shadow {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.shadow-lg {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.p-4 {
  padding: 1rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
/* ========= 🔽 SELECT ========= */
.select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #374151;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='gray'><path stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  outline: none;
}
/* ========= 🔽 PADDING & MARGIN UTILITIES ========= */
.my-0 {
  margin-top: 0;
  margin-bottom: 0;
}
/* All sides */
.p-0 {
  padding: 0;
}
.p-1 {
  padding: 0.25rem;
} /* 4px */
.p-2 {
  padding: 0.5rem;
} /* 8px */
.p-3 {
  padding: 0.75rem;
} /* 12px */
.p-4 {
  padding: 1rem;
} /* 16px */
.p-5 {
  padding: 1.25rem;
} /* 20px */
.p-6 {
  padding: 1.5rem;
} /* 24px */

/* Padding on X (left & right) */
.px-0 {
  padding-left: 0;
  padding-right: 0;
}
.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Padding on Y (top & bottom) */
.py-0 {
  padding-top: 0;
  padding-bottom: 0;
}
.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Top */
.pt-0 {
  padding-top: 0;
}
.pt-1 {
  padding-top: 0.25rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.pt-3 {
  padding-top: 0.75rem;
}
.pt-4 {
  padding-top: 1rem;
}

/* Bottom */
.pb-0 {
  padding-bottom: 0;
}
.pb-1 {
  padding-bottom: 0.25rem;
}
.pb-2 {
  padding-bottom: 0.5rem;
}
.pb-3 {
  padding-bottom: 0.75rem;
}
.pb-4 {
  padding-bottom: 1rem;
}

/* Left */
.pl-0 {
  padding-left: 0;
}
.pl-1 {
  padding-left: 0.25rem;
}
.pl-2 {
  padding-left: 0.5rem;
}
.pl-3 {
  padding-left: 0.75rem;
}
.pl-4 {
  padding-left: 1rem;
}

/* Right */
.pr-0 {
  padding-right: 0;
}
.pr-1 {
  padding-right: 0.25rem;
}
.pr-2 {
  padding-right: 0.5rem;
}
.pr-3 {
  padding-right: 0.75rem;
}
.pr-4 {
  padding-right: 1rem;
}

.loader {
  width: 34px;
  height: 34px;
  border: 4px solid #111827;
  border-bottom-color: #ff3d00;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  position: absolute;
  top: calc(50% - 17px);
  left: calc(50% - 17px);
}

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

/* Folder Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  min-width: 300px;
  overflow: hidden; /* Ensure overlay doesn't spill out */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.modal-footer {
  padding: 5px 0px;
  display: flex;
  justify-content: end;
}
.close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}
.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 350px;
  padding: 12px 16px;
  border-radius: 6px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 400;
  z-index: 2000 !important;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
  color: #212529;
}

@keyframes slideDown {
  from {
    top: -50px;
    opacity: 0;
  }
  to {
    top: 20px;
    opacity: 1;
  }
}



.message.error {
  /* border-left: 4px solid #dc3545; */
  color: #842029;
  background-color: #f8d7da;
}

.message.success {
  /* border-left: 4px solid #198754; */
  color: #0f5132;
  background-color: #d1e7dd;
}
