/* Google-inspired Design System */
:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4285f4;
  --success-color: #34a853;
  --warning-color: #fbbc05;
  --error-color: #ea4335;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-light: #9aa0a6;
  --background: #ffffff;
  --surface: #f8f9fa;
  --border: #e8eaed;
  --border-light: #f1f3f4;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-hover: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --border-radius: 8px;
  --font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
/* Add this CSS to your dashboard styles: */
.app-links-container {
  width: 100%;
  margin-top: 1rem;
}

.app-links-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.app-links-header h2 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.token-expiry {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0;
}

.app-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.app-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e1e8ed;
  transition: transform 0.2s, box-shadow 0.2s;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.app-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.app-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.app-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.app-description {
  margin: 0 0 0.75rem 0;
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.4;
}

.app-category {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.app-actions {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

.app-launch-btn {
  background: #27ae60;
  border: none;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-weight: 600;
  transition: background-color 0.2s;
}

.app-launch-btn:hover {
  background: #229954;
  text-decoration: none;
}

.copy-link-btn {
  background: #95a5a6;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.copy-link-btn:hover {
  background: #7f8c8d;
}

.loading-state,
.error-state,
.no-apps-message {
  text-align: center;
  padding: 3rem 1rem;
  color: #7f8c8d;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 20px;
}

.auth-card {
  background: white;
  padding: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
}

.dashboard-container {
  min-height: 100vh;
  background: var(--surface);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 500;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  cursor: pointer;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-input:invalid {
  border-color: var(--error-color);
}

.form-error {
  color: var(--error-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.show {
  display: block;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-checkbox input {
  width: 16px;
  height: 16px;
}

.form-checkbox label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-color);
  border: none;
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(26, 115, 232, 0.08);
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #d93025;
}

.btn-full {
  width: 100%;
}

.btn-loading {
  position: relative;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
}

.card-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

/* Auth help section */
.auth-help {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 24px;
}

.auth-help h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.help-content p {
  margin: 8px 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.help-content ul {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.help-content li {
  margin: 4px 0;
}

/* Dashboard Styles */
.dashboard-main {
  min-height: calc(100vh - 80px);
  padding: 40px 0;
  background: var(--color-background);
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-header h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.3s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.card-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}

.card-content {
  color: var(--color-text-secondary);
}

/* Navigation user info */
.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* Subscription info */
.subscription-info {
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  font-weight: 500;
  color: var(--color-text);
}

.info-item span {
  color: var(--color-text-secondary);
}

/* Plan options */
.plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plan-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  text-align: center;
}

.plan-card.featured {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.featured-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.plan-card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.price {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.price-note {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}

.plan-card li {
  padding: 4px 0;
  position: relative;
  padding-left: 20px;
}

.plan-card li::before {
  content: "✓";
  color: var(--color-success);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* App access */
.no-access-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
}

.no-access-message .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-access-message h3 {
  margin: 0 0 8px 0;
  color: var(--color-text);
}

.app-list {
  margin-top: 20px;
}

.app-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 16px;
}

.app-info h4 {
  margin: 0 0 4px 0;
  color: var(--color-text);
}

.app-info p {
  margin: 0 0 8px 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.app-url {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: var(--color-background);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.app-features {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.app-features h4 {
  margin: 0 0 12px 0;
  color: var(--color-text);
}

.app-features ul {
  margin: 0;
  padding-left: 20px;
}

.app-features li {
  margin: 4px 0;
  color: var(--color-text-secondary);
}

/* Action grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.action-button:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}

.action-button.danger:hover {
  border-color: var(--color-danger);
  background: var(--color-danger-light);
}

.action-icon {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

.action-text h4 {
  margin: 0 0 4px 0;
  color: var(--color-text);
  font-size: 16px;
}

.action-text p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal styles */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--color-text);
}

.modal-form {
  margin-top: 20px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-user {
    flex-direction: column;
    gap: 8px;
  }
  
  .app-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .plan-options {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.status-active {
  background: rgba(52, 168, 83, 0.1);
  color: var(--success-color);
}

.status-inactive {
  background: rgba(95, 99, 104, 0.1);
  color: var(--text-light);
}

.status-expired {
  background: rgba(234, 67, 53, 0.1);
  color: var(--error-color);
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(52, 168, 83, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(52, 168, 83, 0.2);
}

.alert-error {
  background: rgba(234, 67, 53, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(234, 67, 53, 0.2);
}

.alert-warning {
  background: rgba(251, 188, 5, 0.1);
  color: #ea8600;
  border: 1px solid rgba(251, 188, 5, 0.2);
}

.alert-info {
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(26, 115, 232, 0.2);
}

/* Loading states */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Links */
.link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
    padding: 32px 24px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 16px 24px;
  }
}
/* Add these styles to css/style.css or in a style tag in the dashboard */
.password-options {
    display: grid;
    gap: 1rem;
}

.option-card {
    padding: 1.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: #1a73e8;
    background: #f1f5ff;
}

.option-card h3 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.option-card p {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.password-change-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e5e9;
}

.form-hint {
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-light: #5f6368;
    --background: #202124;
    --surface: #303134;
    --border: #3c4043;
    --border-light: #5f6368;
  }
  
  .auth-card {
    background: var(--surface);
  }
  
  .form-input {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
  }
}
