/* ===== VARIABLES ===== */
:root {
  --sassuolo-green: #00A752;
  --sassuolo-black: #000000;
  --sassuolo-white: #FFFFFF;
  --green-dark: #008741;
  --green-light: #33B873;
  --gray-100: #f7f7f7;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --error: #dc2626;
  --warning: #f59e0b;
  --success: #10b981;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  min-height: 100vh;
  color: var(--gray-900);
}

/* ===== LOGIN PAGE ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, var(--sassuolo-green) 0%, var(--green-dark) 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.login-card {
  background: var(--sassuolo-white);
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  padding: 40px;
  position: relative;
  z-index: 1;
}

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

.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.login-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--sassuolo-black);
  margin-bottom: 8px;
}

.login-header h2 {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-600);
}

.login-form {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 16px;
  transition: var(--transition);
  background: var(--sassuolo-white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--sassuolo-green);
  box-shadow: 0 0 0 3px rgba(0, 167, 82, 0.1);
}

.error-message {
  background: #fef2f2;
  color: var(--error);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.login-button {
  width: 100%;
  padding: 14px;
  background: var(--sassuolo-green);
  color: var(--sassuolo-white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.login-button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 167, 82, 0.3);
}

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

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--sassuolo-white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-footer {
  text-align: center;
  color: var(--gray-500);
  font-size: 12px;
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gray-100);
}

.dashboard-header {
  background: var(--sassuolo-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.header-logo {
  width: 50px;
  height: 50px;
}

.header-left h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--sassuolo-black);
  margin-bottom: 4px;
}

.header-left p {
  font-size: 14px;
  color: var(--gray-600);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
}

.logout-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.logout-button:hover {
  background: var(--error);
  color: var(--sassuolo-white);
  border-color: var(--error);
  transform: translateY(-2px);
}

.dashboard-main {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

.welcome-section {
  text-align: center;
  margin-bottom: 50px;
}

.welcome-section h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.welcome-section p {
  font-size: 18px;
  color: var(--gray-600);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.dashboard-card {
  background: var(--sassuolo-white);
  border-radius: var(--border-radius);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--sassuolo-green);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.dashboard-card.active:hover::before {
  transform: scaleX(1);
}

.dashboard-card.active:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 167, 82, 0.15);
}

.dashboard-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dashboard-card.disabled:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.card-icon {
  margin-bottom: 20px;
  color: var(--sassuolo-green);
}

.dashboard-card.disabled .card-icon {
  color: var(--gray-400);
}

.dashboard-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.dashboard-card p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.card-status.available {
  background: #dcfce7;
  color: #15803d;
}

.card-status.coming-soon {
  background: #fef3c7;
  color: #92400e;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dashboard-footer {
  background: var(--sassuolo-white);
  padding: 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  border-top: 1px solid var(--gray-200);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--sassuolo-white);
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
}

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

.modal-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.modal-content p {
  font-size: 16px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.modal-content button {
  padding: 12px 32px;
  background: var(--sassuolo-green);
  color: var(--sassuolo-white);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.modal-content button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

/* ===== CHANGELOG SECTION ===== */
.changelog-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 24px;
  background: var(--sassuolo-white);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.changelog-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.version-badge {
  background: var(--sassuolo-green);
  color: var(--sassuolo-white);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.changelog-content {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.changelog-content.expanded {
  max-height: 600px;
  overflow-y: auto;
}

.changelog-entry {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.changelog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.changelog-date {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 8px;
}

.changelog-date strong {
  color: var(--gray-700);
  font-weight: 600;
}

.changelog-changes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-changes li {
  padding: 4px 0;
  padding-left: 24px;
  position: relative;
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.5;
}

.changelog-changes li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sassuolo-green);
  font-weight: 600;
}

.changelog-toggle {
  margin-top: 16px;
  padding: 8px 16px;
  background: transparent;
  color: var(--sassuolo-green);
  border: 1px solid var(--sassuolo-green);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.changelog-toggle:hover {
  background: var(--sassuolo-green);
  color: var(--sassuolo-white);
  transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .welcome-section h2 {
    font-size: 28px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .header-left {
    flex-direction: column;
  }
  
  .dashboard-card {
    padding: 24px;
  }
}