/* Import Impact Branding Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  /* Impact Brand Colors - Verde sustenabilitate */
  --impact-green: #00b51a;
  --impact-green-dark: #008a14;
  --impact-green-light: #00d620;
  --impact-green-rgb: 0, 181, 26;
  
  /* Neutral Colors */
  --bg-color: #f8fafc;
  --card-color: #ffffff;
  --app-color: #00b51a;
  --app-color-hover: #008a14;
  --app-color-rgb: 0, 181, 26;
  --progressbar-bg-color: rgba(0, 181, 26, 0.1);
  --text-color: #1a1a1a;
  --text-color-muted: rgba(26, 26, 26, 0.6);
  --button-filter: none;
  --light-border-color: #e5e7eb;
  --light-border-color-hover: #d1d5db;
  --btn-bg-color: #f3f4f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Impact Brand Gradients */
  --gradient-primary: linear-gradient(135deg, #00b51a 0%, #008a14 100%);
  --gradient-secondary: linear-gradient(135deg, #00d620 0%, #00b51a 100%);
  --gradient-success: linear-gradient(135deg, #00b51a 0%, #00d620 100%);
  
  /* Impact Brand Fonts */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  body {
    --bg-color: #0f1419;
    --card-color: #1a1f26;
    --app-color-rgb: 0, 181, 26;
    --progressbar-bg-color: rgba(0, 181, 26, 0.2);
    --text-color: #f8fafc;
    --text-color-muted: #94a3b8;
    --button-filter: invert(1) hue-rotate(180deg);
    --light-border-color: #2d3748;
    --light-border-color-hover: #4a5568;
    --btn-bg-color: #2d3748;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*:focus {
  outline: none !important;
}

::-moz-selection {
  color: var(--text-color);
  background: var(--btn-bg-color);
}

::selection {
  color: var(--text-color);
  background: var(--btn-bg-color);
}

body,
html {
  height: 100%;
  background: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 181, 26, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 214, 32, 0.03) 0px, transparent 50%);
  font-family: var(--font-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

strong {
  color: var(--text-color);
}

.upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.upload-container > small {
  color: var(--text-color-muted);
  padding: 8px;
  font-weight: 400;
  margin-bottom: 4px;
}

.upload-container small span {
  font-weight: 600;
}

.upload-container small a {
  color: var(--app-color-hover);
  text-decoration: none;
}

.dropzone {
  height: 100%;
  width: 100%;
  background: var(--bg-color);
  user-select: none;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 0;
}

.dropzone-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 181, 26, 0.05);
  border: 3px dashed transparent;
  border-radius: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  pointer-events: none;
}

.dropzone.dragging .dropzone-overlay {
  display: flex;
  border-color: var(--app-color);
  background: rgba(0, 181, 26, 0.1);
  backdrop-filter: blur(4px);
}

.dropzone-content {
  text-align: center;
  color: var(--app-color);
}

.dropzone-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.dropzone-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--app-color);
}

.dropzone-subtitle {
  font-size: 16px;
  color: var(--text-color-muted);
  margin: 0;
}

.dropzone .wrapper {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-color);
}

.dropzone .files-icon {
  position: relative;
  height: 150px;
  width: 100%;
}

.dropzone .text small {
  font-size: 90%;
  opacity: 0.5;
}

.dropzone .text span {
  cursor: pointer;
  color: var(--app-color);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.dropzone .text span:hover {
  color: var(--app-color-hover);
  text-decoration-color: var(--app-color-hover);
  transform: scale(1.05);
}

.dropzone .files-icon img {
  position: absolute;
  height: 120px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s ease-in-out, opacity 0.4s ease-in;
}

.dropzone .files-icon img.left,
.dropzone .files-icon img.right {
  opacity: 0.5;
  z-index: 0;
}

.dropzone .files-icon img.center {
  opacity: 1;
  z-index: 1;
}

.dropzone.dragged .files-icon img.left {
  transform: translateX(calc(-50% + 12px)) rotate(12deg) scale(0.95);
  filter: grayscale(1);
  transform-origin: bottom;
}

.dropzone.dragged .files-icon img.right {
  transform: translateX(calc(-50% - 12px)) rotate(-12deg) scale(0.95);
  filter: grayscale(1);
  transform-origin: bottom;
}

.dropzone.dragged .files-icon img.center {
  transform: translateX(-50%) translateY(4px);
}

.dropzone input[type='file'] {
  display: none;
}

.uploader-progress-ui {
  background: var(--bg-color);
  top: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: none;
  padding: 0 20px;
}

.progress-bar {
  border-radius: 60px;
  overflow: hidden;
  width: calc(100% - 40px);
}

.progress-bar span {
  display: block;
  transition: width 0.3s linear;
}

.bar {
  background: var(--progressbar-bg-color);
}

.progress {
  background: var(--gradient-primary);
  color: #fff;
  padding: 5px;
  width: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  text-align: center;
  border-radius: 60px;
  box-shadow: 0 2px 8px rgba(0, 181, 26, 0.3);
}

.progress-bar {
  left: 50%;
  max-width: 600px;
  position: absolute;
  top: 50%;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
}

.postupload-ui {
  height: 100vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  display: none;
  padding: 40px 20px;
  background: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 181, 26, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 214, 32, 0.03) 0px, transparent 50%);
  overflow-y: auto;
}

.postupload-wrapper {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.postupload-header {
  text-align: center;
  margin-bottom: 20px;
}

.postupload-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo-image {
  width: 120px;
  height: auto;
}

.postupload-logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 20px;
  background: var(--card-color);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border-color);
  position: relative;
}

.back-to-upload-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-upload-btn:hover {
  background: var(--btn-bg-color);
  border-color: var(--app-color);
  color: var(--app-color);
  transform: translateY(-2px);
}

.back-to-upload-btn:active {
  transform: translateY(0);
}

.back-to-upload-btn svg {
  flex-shrink: 0;
}

.postupload-ui .checkmark {
  width: 120px;
  margin: 0 auto;
}

.svg-success {
  display: inline-block;
  vertical-align: top;
  height: 100px;
  width: 100px;
  opacity: 1;
  overflow: visible;
}

@-webkit-keyframes success-tick {
  0% {
    stroke-dashoffset: 16px;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 31px;
    opacity: 1;
  }
}

@keyframes success-tick {
  0% {
    stroke-dashoffset: 16px;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 31px;
    opacity: 1;
  }
}

@-webkit-keyframes success-circle-outline {
  0% {
    stroke-dashoffset: 72px;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 0px;
    opacity: 1;
  }
}

@keyframes success-circle-outline {
  0% {
    stroke-dashoffset: 72px;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 0px;
    opacity: 1;
  }
}

@-webkit-keyframes success-circle-fill {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes success-circle-fill {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.svg-success .success-tick {
  fill: none;
  stroke-width: 1.5px;
  stroke: #ffffff;
  stroke-dasharray: 15px, 15px;
  stroke-dashoffset: -14px;
  -webkit-animation: success-tick 450ms ease 1400ms forwards;
  animation: success-tick 450ms ease 1400ms forwards;
  opacity: 0;
}

.svg-success .success-circle-outline {
  fill: none;
  stroke-width: 1.5px;
  stroke: var(--app-color);
  stroke-dasharray: 72px, 72px;
  stroke-dashoffset: 72px;
  -webkit-animation: success-circle-outline 300ms ease-in-out 800ms forwards;
  animation: success-circle-outline 300ms ease-in-out 800ms forwards;
  opacity: 0;
}

.svg-success .success-circle-fill {
  fill: var(--app-color);
  stroke: none;
  opacity: 0;
  -webkit-animation: success-circle-fill 300ms ease-out 1100ms forwards;
  animation: success-circle-fill 300ms ease-out 1100ms forwards;
}

@media screen and (-ms-high-contrast: active),
  screen and (-ms-high-contrast: none) {
  .svg-success .success-tick {
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
    -webkit-animation: none;
    animation: none;
    opacity: 1;
  }

  .svg-success .success-circle-outline {
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
    -webkit-animation: none;
    animation: none;
    opacity: 1;
  }

  .svg-success .success-circle-fill {
    -webkit-animation: none;
    animation: none;
    opacity: 1;
  }
}

.will-fade-in {
  opacity: 0;
  -webkit-animation-duration: 0.5s;
  animation-duration: 0.5s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.anim-delay-1 {
  animation-delay: 2s;
}

@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.fade-in {
  -webkit-animation-name: fadeIn;
  animation-name: fadeIn;
}

.complete-text {
  font-size: 24px;
  text-align: center;
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qr-wrapper {
  display: none;
  width: 100%;
  margin-bottom: 32px;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: var(--card-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border-color);
}

.qr-code-wrapper {
  width: 220px;
  height: 220px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--light-border-color);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  text-align: center;
}

.qr-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.qr-divider::before,
.qr-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-border-color);
}

.qr-divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.share-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.link-share-card {
  background: var(--card-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border-color);
  transition: all 0.3s ease;
}

.link-share-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.link-share-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 16px;
}

.link-share-header svg {
  color: var(--app-color);
  flex-shrink: 0;
}

.link-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.link-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  background: var(--btn-bg-color);
  font-size: 14px;
  font-family: var(--font-primary);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.link-input:focus {
  outline: none;
  border-color: var(--app-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 181, 26, 0.1);
}

.copy-link-btn {
  padding: 14px 18px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.copy-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.copy-link-btn:active {
  transform: translateY(0);
}

.share-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--card-color);
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.share-action-btn:hover {
  border-color: var(--app-color);
  background: var(--btn-bg-color);
  color: var(--app-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-action-btn svg {
  flex-shrink: 0;
}

.email-action-btn {
  width: 100%;
  justify-content: center;
}

.email-form {
  display: none;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  background: var(--card-color);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--light-border-color);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-form-header {
  text-align: center;
  margin-bottom: 8px;
}

.email-form-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 8px 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.email-form-header p {
  font-size: 14px;
  color: var(--text-color-muted);
  margin: 0;
}

.email-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.email-icon {
  position: absolute;
  left: 18px;
  color: var(--text-color-muted);
  z-index: 1;
  pointer-events: none;
}

.email-form input[type="email"] {
    width: 100%;
  padding: 14px 18px 14px 50px;
  border: 2px solid var(--light-border-color);
  background-color: var(--btn-bg-color);
  font-family: var(--font-primary);
  font-size: 16px;
  border-radius: 12px;
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 52px;
}

.email-form input[type="email"]:focus {
  outline: none;
  border-color: var(--app-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 181, 26, 0.1);
}

.email-form input[type="email"]::placeholder {
  color: var(--text-color-muted);
}

.email-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.email-send-btn {
  flex: 1;
  padding: 14px 24px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  height: 52px;
}

.email-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.email-send-btn:active {
  transform: translateY(0);
}

.email-send-btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.email-cancel-btn {
  flex: 1;
  padding: 14px 24px;
  background: transparent;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 52px;
}

.email-cancel-btn:hover {
  background: var(--btn-bg-color);
  border-color: var(--app-color);
  color: var(--app-color);
  transform: translateY(-2px);
}

.email-cancel-btn:active {
  transform: translateY(0);
}

@media screen and (max-width: 520px) {
  .email-form {
    padding: 24px 20px;
  }

  .email-form-header h3 {
    font-size: 20px;
  }

  .email-form-actions {
    flex-direction: column;
  }

  .email-send-btn,
  .email-cancel-btn {
    width: 100%;
  }
}

.toast {
  position: fixed;
  bottom: 10px;
  right: 50%;
  transform: translate(50%, 80px);
  padding: 10px;
  background: var(--app-color);
  color: #fff;
  border-radius: 4px;
  font-size: 16px;
  box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
    0px 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: transform ease-in-out 0.2s;
}

.show.toast {
  transform: translate(50%, 0);
}

/* ============================================
   DOWNLOAD PAGE STYLES
   ============================================ */

.download-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-color);
  border-bottom: 1px solid var(--light-border-color);
  box-shadow: var(--shadow-sm);
  padding: 16px 24px;
}

.download-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.download-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-logo .logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.download-logo .logo-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.download-container {
  min-height: calc(100vh - 80px);
  width: 100vw;
  background: radial-gradient(ellipse at top, rgba(0, 181, 26, 0.05) 0%, transparent 50%),
              radial-gradient(ellipse at bottom, rgba(0, 181, 26, 0.03) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.download-wrapper {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card {
  width: 100%;
  background: var(--card-color);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--light-border-color);
  padding: 48px 40px;
  text-align: center;
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.download-card:hover::before {
  opacity: 1;
}

.download-icon-wrapper {
  margin: 0 auto 32px;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.download-icon-wrapper svg {
  width: 100%;
  height: 100%;
  color: var(--app-color);
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-icon-wrapper.error-icon svg {
  color: #ef4444;
}

.download-icon-wrapper.success-icon {
  animation: pulse 2s ease-in-out infinite;
}

.success-checkmark {
  width: 100%;
  height: 100%;
  position: relative;
}

.success-checkmark .svg-success {
  width: 100%;
  height: 100%;
}

.success-checkmark .success-circle-outline {
  fill: none;
  stroke: var(--app-color);
  stroke-width: 2;
  opacity: 0.2;
}

.success-checkmark .success-circle-fill {
  fill: var(--app-color);
  opacity: 0.1;
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-checkmark .success-tick {
  fill: none;
  stroke: var(--app-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: drawTick 0.6s ease-out 0.3s forwards;
}

@keyframes drawTick {
  to {
    stroke-dashoffset: 0;
  }
}

.download-title {
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 16px;
  line-height: 1.3;
}

.download-title.success-title {
  color: var(--text-color);
}

.download-title.error-title {
  color: #ef4444;
}

.download-description {
  font-family: var(--font-secondary);
  font-size: 16px;
  color: var(--text-color-muted);
  margin: 0 0 32px;
  line-height: 1.6;
}

.download-file-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 32px;
  padding: 20px;
  background: var(--btn-bg-color);
  border-radius: 16px;
  border: 1px solid var(--light-border-color);
}

.file-info-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-color);
  font-weight: 500;
}

.file-info-item svg {
  flex-shrink: 0;
  color: var(--app-color);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 18px 32px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-primary);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.download-btn:hover::before {
  left: 100%;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--gradient-secondary);
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.download-btn svg {
  flex-shrink: 0;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.download-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  background: var(--btn-bg-color);
  border: 1px solid var(--light-border-color);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 24px;
}

.download-back-btn:hover {
  background: var(--card-color);
  border-color: var(--app-color);
  color: var(--app-color);
  transform: translateX(-4px);
}

.download-back-btn svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.download-back-btn:hover svg {
  transform: translateX(-4px);
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive Design for Download Page */
@media (max-width: 768px) {
  .download-header {
    padding: 12px 16px;
  }

  .download-logo .logo-text {
    font-size: 14px;
  }

  .download-container {
    padding: 24px 16px;
  }

  .download-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .download-icon-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
  }

  .download-title {
    font-size: 24px;
  }

  .download-description {
  font-size: 15px;
  }

  .download-btn {
    padding: 16px 24px;
    font-size: 15px;
  }
}

/* QR Code Styles for Download Page */
.download-qr-section {
  margin: 32px 0;
  display: flex;
  justify-content: center;
  animation: fadeIn 0.5s ease-in;
}

.qr-wrapper-download {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.qr-container-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.qr-code-wrapper-download {
  width: 200px;
  height: 200px;
  padding: 16px;
  background: var(--card-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--light-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.qr-code-wrapper-download:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
  border-color: var(--app-color);
}

.qr-image-download {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.qr-text-download {
  font-size: 14px;
  color: var(--text-color-muted);
  font-weight: 500;
  margin: 0;
  text-align: center;
}

.qr-divider-download {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin: 8px 0;
}

.qr-divider-download::before,
.qr-divider-download::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-border-color);
}

.qr-divider-download span {
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background-color: var(--card-color);
  color: var(--text-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.files-container {
  overflow: auto;
  height: 100vh;
  width: 100vw;
}

.files-container #content {
  display: none;
}

.files-list {
  max-width: 1100px;
  margin-inline: auto;
  margin-block: 1rem;
  font-size: 14px;
}

.table {
  background-color: var(--card-color);
  color: var(--text-color);
}

.table td,
.table th {
  border-color: var(--light-border-color);
}

.table thead td,
.table thead th {
  color: var(--text-color-muted);
}

.card-header {
  border-bottom: 1px solid var(--light-border-color);
}

.card-header-title {
  color: var(--text-color);
}

.card-footer {
  border-top: 1px solid var(--light-border-color);
}

.recipients {
  max-width: 200px;
}

.block-message {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.block-message h4 {
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0;
  padding: 0;
  color: var(--text-color);
}

.block-message p {
  font-size: 1rem;
  margin: 0;
  padding: 0;
  color: var(--text-color-muted);
}

.block-message button {
  border: none;
  background: var(--gradient-primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 1rem 0;
  height: 50px;
  padding: 1rem 2rem;
  color: #fff;
  text-transform: none;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.block-message button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.block-message button:active {
  transform: translateY(0);
}

.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  position: relative;
}

.login::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 181, 26, 0.08) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-title {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: 700;
  padding-bottom: 24px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 0;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  font-size: 16px;
  background-color: var(--btn-bg-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-color);
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--app-color);
  outline: none;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 181, 26, 0.1);
  transform: translateY(-2px);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: var(--text-color-muted);
}

.btns button {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btns button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btns button:hover::before {
  width: 300px;
  height: 300px;
}

.btns button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btns button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btns span {
  font-weight: 600;
  position: relative;
  z-index: 1;
}

@media (max-width: 480px) {
  .login-container {
    padding: 20px;
    width: 90%;
  }
}

.dashboard-body {
  background: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 181, 26, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 214, 32, 0.03) 0px, transparent 50%);
  color: var(--text-color);
  font-family: var(--font-primary);
  min-height: 100vh;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

.dashboard-title {
  color: var(--text-color);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.dashboard-table {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--card-color);
  box-shadow: var(--shadow-xl);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--light-border-color);
}

.dashboard-table th, 
.dashboard-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid var(--light-border-color);
}

.dashboard-table th {
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-table th:first-child {
  border-top-left-radius: 16px;
}

.dashboard-table th:last-child {
  border-top-right-radius: 16px;
}

.dashboard-table td {
  font-size: 0.95rem;
  color: var(--text-color);
}

.dashboard-table tbody tr {
  transition: all 0.2s ease;
}

.dashboard-table tbody tr:hover {
  background-color: var(--btn-bg-color);
  transform: scale(1.01);
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

/* Dashboard Stats Cards */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.stat-icon.expired {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon.sent {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-color-muted);
  font-weight: 500;
}

/* Dashboard Table Wrapper */
.dashboard-table-wrapper {
  background: var(--card-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-border-color);
  overflow-x: auto;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.badge-success {
  background: rgba(0, 181, 26, 0.1);
  color: #00b51a;
  border: 1px solid rgba(0, 181, 26, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-secondary {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* File Name Cell */
.file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-name-cell svg {
  flex-shrink: 0;
  color: var(--app-color);
}

.file-name-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Recipients Cell */
.recipients-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.recipients-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--app-color);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.recipients-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: var(--card-color);
  border: 1px solid var(--light-border-color);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
  min-width: 200px;
  max-width: 300px;
}

.recipients-cell:hover .recipients-tooltip {
  opacity: 1;
  visibility: visible;
}

.recipient-email {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-color);
  border-bottom: 1px solid var(--light-border-color);
}

.recipient-email:last-child {
  border-bottom: none;
}

/* Expired Row */
.expired-row {
  opacity: 0.7;
  background-color: rgba(239, 68, 68, 0.05) !important;
}

.expired-row:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Text Muted */
.text-muted {
  color: var(--text-color-muted);
  font-style: italic;
}

/* DataTables Custom Styles */
.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--app-color);
  box-shadow: 0 0 0 3px rgba(0, 181, 26, 0.1);
}

.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: var(--app-color);
  box-shadow: 0 0 0 3px rgba(0, 181, 26, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px;
  margin: 0 2px;
  padding: 8px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--gradient-primary) !important;
  color: white !important;
  border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--app-color) !important;
  color: white !important;
  border: none !important;
}

.dataTables_wrapper .dt-buttons {
  margin-bottom: 20px;
}

.dataTables_wrapper .dt-buttons .btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dt-buttons .btn:hover {
  background: var(--gradient-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Responsive Dashboard Styles */
@media (max-width: 768px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 28px;
  }

  .dashboard-table-wrapper {
    padding: 16px;
    overflow-x: auto;
  }

  .dashboard-table {
    width: 100%;
    font-size: 14px;
  }

  .dashboard-table th,
  .dashboard-table td {
    padding: 12px 8px;
  }

  .file-name-cell span {
    max-width: 150px;
  }

  .dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dataTables_wrapper .dt-buttons .btn {
    flex: 1;
    min-width: 120px;
    margin-right: 0;
  }
}

.recipients-list {
  list-style-type: none;
  padding: 0;
}

.recipient-item {
  display: inline-block;
  margin: 2px;
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
}

.adminButton {
  background: var(--gradient-primary);
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px; 
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adminButton:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.adminButton:active {
  transform: translateY(0) scale(1);
  box-shadow: var(--shadow-md);
}

/* ============================================
   HEADER STYLES
   ============================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--light-border-color);
  box-shadow: var(--shadow-sm);
  padding: 16px 24px;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--btn-bg-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-info:hover {
  background: var(--light-border-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.2;
}

.user-role {
  font-size: 12px;
  color: var(--text-color-muted);
  line-height: 1.2;
}

.role-admin {
  color: var(--app-color);
  font-weight: 600;
}

.dashboard-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.dashboard-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.dashboard-btn:active {
  transform: translateY(0);
}

.dashboard-btn.active {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.dashboard-btn svg {
  flex-shrink: 0;
}

.home-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.home-btn:hover {
  background: var(--btn-bg-color);
  border-color: var(--app-color);
  color: var(--app-color);
  transform: translateY(-2px);
}

.home-btn:active {
  transform: translateY(0);
}

.home-btn svg {
  flex-shrink: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--light-border-color);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-btn:hover {
  background: var(--btn-bg-color);
  border-color: var(--app-color);
  color: var(--app-color);
  transform: translateY(-2px);
}

.logout-btn:active {
  transform: translateY(0);
}

.logout-btn span {
  display: inline-block;
}

/* ============================================
   MAIN CONTAINER & LAYOUT
   ============================================ */
.main-container {
  display: flex;
  min-height: calc(100vh - 73px);
  position: relative;
}

/* ============================================
   FILES HISTORY SIDEBAR
   ============================================ */
.files-history-sidebar {
  width: 320px;
  background: var(--card-color);
  border-right: 1px solid var(--light-border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.files-history-sidebar.collapsed {
  width: 60px;
}

.files-history-sidebar.collapsed .history-content,
.files-history-sidebar.collapsed .history-title {
  display: none;
}

.files-history-sidebar.collapsed .toggle-history {
  transform: rotate(180deg);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--light-border-color);
}

.history-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.toggle-history {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--light-border-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-history:hover {
  background: var(--btn-bg-color);
  border-color: var(--app-color);
  color: var(--app-color);
}

.history-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.history-loading,
.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color-muted);
  font-size: 14px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--btn-bg-color);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.history-item:hover {
  background: var(--light-border-color);
  border-color: var(--app-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.history-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.history-item-content {
  flex: 1;
  min-width: 0;
}

.history-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-color-muted);
  margin-bottom: 8px;
}

.history-item-size {
  font-weight: 600;
}

.history-item-date {
  position: relative;
  padding-left: 12px;
}

.history-item-date::before {
  content: '•';
  position: absolute;
  left: 4px;
}

.history-item-recipients {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--app-color);
  font-weight: 600;
}

.history-item-link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 0;
}

.history-item-link:hover {
  background: var(--app-color);
  color: white;
  transform: scale(1.1);
}

.history-item-link:active {
  transform: scale(1.05);
}

.history-item-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.history-item-expired {
  opacity: 0.7;
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.history-item-expired:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.history-item-expired .history-item-icon {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  opacity: 0.8;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.history-item-expired-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ef4444;
  flex-shrink: 0;
}

.history-item-expired-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ============================================
   UPLOAD SECTION IMPROVEMENTS
   ============================================ */
.upload-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.upload-header {
  text-align: center;
  margin-bottom: 40px;
}

.upload-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 12px 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.upload-subtitle {
  font-size: 16px;
  color: var(--text-color-muted);
  margin: 0;
}

/* Modern Upload Area */
.modern-upload-area {
  width: 100%;
  max-width: 600px;
  min-height: 400px;
  border: 3px dashed var(--light-border-color);
  border-radius: 24px;
  background: var(--card-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.modern-upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 24px;
}

.modern-upload-area:hover {
  border-color: var(--app-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.modern-upload-area:hover::before {
  opacity: 0.05;
}

.modern-upload-area:hover .upload-main-icon {
  transform: translateY(-8px) scale(1.1);
  color: var(--app-color);
}

.modern-upload-area:hover .upload-icon-glow {
  opacity: 0.3;
  transform: scale(1.5);
}

.dropzone.dragging .modern-upload-area {
  border-color: var(--app-color);
  background: rgba(0, 181, 26, 0.05);
  box-shadow: 0 0 0 4px rgba(0, 181, 26, 0.1);
}

.dropzone.dragging .modern-upload-area::before {
  opacity: 0.1;
}

.upload-area-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  width: 100%;
}

.upload-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.upload-main-icon {
  position: relative;
  z-index: 2;
  color: var(--text-color-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  filter: blur(20px);
  z-index: 1;
}

.upload-area-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 12px 0;
  transition: color 0.3s ease;
}

.modern-upload-area:hover .upload-area-title {
  color: var(--app-color);
}

.upload-area-subtitle {
  font-size: 16px;
  color: var(--text-color-muted);
  margin: 0 0 24px 0;
}

.upload-link {
  color: var(--app-color);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-link:hover {
  text-decoration-color: var(--app-color);
  color: var(--app-color-hover);
}

.upload-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--btn-bg-color);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-color-muted);
  margin-top: 24px;
}

.upload-info svg {
  flex-shrink: 0;
  color: var(--app-color);
}

.file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .files-history-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--light-border-color);
    max-height: 300px;
  }

  .files-history-sidebar.collapsed {
    width: 100%;
    max-height: 60px;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  .header-logo {
    width: 100%;
    justify-content: center;
  }

  .header-user {
    width: 100%;
    justify-content: space-between;
  }

  .header-actions {
    gap: 8px;
  }

  .dashboard-btn span,
  .home-btn span {
    display: none;
  }

  .dashboard-btn,
  .home-btn {
    padding: 10px;
    min-width: 40px;
  }

  .upload-title {
    font-size: 24px;
  }

  .upload-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 12px 16px;
  }

  .logo-text {
    font-size: 14px;
  }

  .user-info {
    padding: 6px 12px;
  }

  .user-name {
    font-size: 13px;
  }

  .user-role {
    font-size: 11px;
  }

  .dashboard-btn,
  .home-btn {
    padding: 8px;
    font-size: 12px;
    min-width: 36px;
  }

  .dashboard-btn span,
  .home-btn span {
    display: none;
  }

  .logout-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .logout-btn span {
    display: none;
  }

  .upload-container {
    padding: 20px 16px;
  }

  .modern-upload-area {
    min-height: 300px;
  }

  .upload-area-content {
    padding: 30px 20px;
  }

  .upload-main-icon {
    width: 60px;
    height: 60px;
  }

  .upload-area-title {
    font-size: 20px;
  }

  .upload-area-subtitle {
    font-size: 14px;
  }
}

