/* Apps Dashboard Styles */
.apps-dashboard {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.apps-dashboard .container-fluid {
  background: transparent;
}

/* Apps Grid Layout */
.apps-dashboard .apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px 0;
  margin-bottom: 60px;
}

/* App Card Styles */
.apps-dashboard .app-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  border: 1px solid #f0f2f5;
}

.apps-dashboard .app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #e3f2fd;
}

.apps-dashboard .app-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Card Header */
.apps-dashboard .app-card-header {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.apps-dashboard .app-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.apps-dashboard .app-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.apps-dashboard .app-card:hover .app-image img {
  transform: scale(1.05);
}

/* Image Placeholder */
.apps-dashboard .app-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.apps-dashboard .app-image-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.apps-dashboard .app-icon {
  width: 64px;
  height: 64px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.apps-dashboard .app-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.apps-dashboard .app-placeholder-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
}

/* Card Body */
.apps-dashboard .app-card-body {
  padding: 24px;
  flex-grow: 1;
}

.apps-dashboard .app-title {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.apps-dashboard .app-description {
  color: #718096;
  font-size: 14px;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.apps-dashboard .app-status {
  display: flex;
  align-items: center;
}

.apps-dashboard .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apps-dashboard .status-badge.active {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

.apps-dashboard .status-badge.active::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

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

/* Card Footer */
.apps-dashboard .app-card-footer {
  padding: 20px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.apps-dashboard .app-card:hover .app-card-footer {
  background: #e3f2fd;
}

.apps-dashboard .configure-text {
  color: #4299e1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.apps-dashboard .app-card:hover .configure-text {
  color: #3182ce;
}

.apps-dashboard .arrow-icon {
  width: 20px;
  height: 20px;
  color: #4299e1;
  transition: all 0.3s ease;
}

.apps-dashboard .app-card:hover .arrow-icon {
  color: #3182ce;
  transform: translateX(4px);
}

.apps-dashboard .arrow-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

/* Empty State */
.apps-dashboard .empty-state {
  background: white;
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.apps-dashboard .empty-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 400% 100%;
  animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.apps-dashboard .empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: #a0aec0;
  opacity: 0.8;
}

.apps-dashboard .empty-state-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.apps-dashboard .empty-state-title {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 16px 0;
}

.apps-dashboard .empty-state-description {
  font-size: 16px;
  color: #718096;
  line-height: 1.6;
  margin: 0 0 32px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.apps-dashboard .empty-state-action {
  display: flex;
  justify-content: center;
}

.apps-dashboard .coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
  to { box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6); }
}

.apps-dashboard .alert {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: white;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.apps-dashboard .alert::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  background-size: 400% 400%;
  border-radius: 18px;
  z-index: -1;
  animation: gradientBorder 4s ease infinite;
}

@keyframes gradientBorder {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.apps-dashboard .alert::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: 16px;
  z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .apps-dashboard .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }
  
  .apps-dashboard .app-card-header {
    height: 160px;
  }
  
  .apps-dashboard .app-card-body {
    padding: 20px;
  }
  
  .apps-dashboard .app-card-footer {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .apps-dashboard .apps-grid {
    gap: 12px;
  }
  
  .apps-dashboard .app-card-header {
    height: 140px;
  }
  
  .apps-dashboard .app-icon {
    width: 48px;
    height: 48px;
  }
  
  .apps-dashboard .app-placeholder-text {
    font-size: 16px;
  }
}

/* Loading Animation for Cards */
.apps-dashboard .app-card {
  animation: fadeInUp 0.6s ease forwards;
}

.apps-dashboard .app-card:nth-child(1) { animation-delay: 0.1s; }
.apps-dashboard .app-card:nth-child(2) { animation-delay: 0.2s; }
.apps-dashboard .app-card:nth-child(3) { animation-delay: 0.3s; }
.apps-dashboard .app-card:nth-child(4) { animation-delay: 0.4s; }

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

/* Hover Effects */
.apps-dashboard .app-card::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;
  z-index: 1;
  pointer-events: none;
}

.apps-dashboard .app-card:hover::before {
  left: 100%;
}

.dev-banner{
    background: #fffae5;
    border: 1px solid #ffe58f;
    color: #ad6800;
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 229, 143, 0.3);
    margin-bottom: 20px;
}

/* Token Input Group Styles */
.token-container {
    margin-bottom: 24px;
}

.token-input-group {
    display: flex;
    align-items: stretch;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    max-width: 600px;
}

.token-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.token-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #495057;
    background: transparent;
    letter-spacing: 1px;
}

.token-input::placeholder {
    color: #adb5bd;
    letter-spacing: 2px;
}

.token-actions {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
}

.token-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.token-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.token-btn:active {
    transform: scale(0.95);
}

.token-btn svg {
    width: 18px;
    height: 18px;
}

.view-btn .eye-off-icon {
    display: none;
}

.view-btn.active .eye-icon {
    display: none;
}

.view-btn.active .eye-off-icon {
    display: block;
}

.copy-btn .check-icon {
    display: none;
}

.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .check-icon {
    display: block;
    color: #10b981;
    animation: checkSuccess 0.3s ease-in-out;
}

.copy-btn.copied {
    background: #d1fae5;
    color: #10b981;
    transform: scale(1.05);
}

@keyframes checkSuccess {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Token Button Tooltip */
.token-btn {
    position: relative;
}

.token-btn .copy-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #343a40;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.token-btn .copy-tooltip.success {
    background: #10b981;
}

.token-btn .copy-tooltip.error {
    background: #ef4444;
}

.token-btn .copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #343a40;
}

.token-btn .copy-tooltip.success::after {
    border-top-color: #10b981;
}

.token-btn .copy-tooltip.error::after {
    border-top-color: #ef4444;
}

.token-btn .copy-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.copy-token-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.copy-token-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

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

.copy-token-btn svg {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: all 0.2s ease;
}

.copy-token-btn:hover svg {
    color: #ffffff;
}

.copy-icon {
    opacity: 1;
    transform: scale(1);
}

.check-icon {
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
}

.copy-token-btn.copied .copy-icon {
    opacity: 0;
    transform: scale(0.8);
}

.copy-token-btn.copied .check-icon {
    opacity: 1;
    transform: scale(1);
}

.copy-token-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

.copy-token-btn.copied svg {
    color: #ffffff;
}

/* Copy Tooltip */
.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    margin-bottom: 8px;
    z-index: 1000;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.copy-tooltip.error {
    background: #ef4444;
}

.copy-tooltip.error::after {
    border-top-color: #ef4444;
}

/* Integration Accordion Styles */
.integration-accordion {
  margin-bottom: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
}

.accordion-header:hover {
  background-color: #f8f9fa;
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #495057;
}

.integration-icon {
  width: 20px;
  height: 20px;
  color: #6c757d;
}

.accordion-arrow {
  width: 20px;
  height: 20px;
  color: #6c757d;
  transition: transform 0.2s ease;
}

.integration-accordion.active .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 0 24px 24px 24px;
  border-top: 1px solid #e9ecef;
}

.integration-accordion.active .accordion-content {
  display: block;
}

.token-section {
  margin-bottom: 32px;
  margin-top: 10px;
}

.token-section h4 {
  font-size: 18px;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-endpoints h4 {
  font-size: 18px;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 16px;
}

.endpoint-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.endpoint-card:last-child {
  margin-bottom: 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.method {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  min-width: 45px;
  text-align: center;
}

.method.get {
  background: #d4edda;
  color: #155724;
}

.method.put {
  background: #d1ecf1;
  color: #0c5460;
}

.endpoint-url {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: #495057;
  background: white;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.endpoint-description p {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.endpoint-description p:last-child {
  margin-bottom: 0;
}

.endpoint-params,
.endpoint-example {
  margin-top: 16px;
}

.endpoint-params p,
.endpoint-example p {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.endpoint-params ul {
  margin: 0;
  padding-left: 20px;
}

.endpoint-params li {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 4px;
}

.endpoint-params code,
.endpoint-example code {
  background: #e9ecef;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 13px;
}

.endpoint-example pre {
  background: #343a40;
  color: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin: 8px 0 0 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.4;
}

.endpoint-example pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .token-input-group {
        max-width: 100%;
    }
    
    .token-input {
        font-size: 12px;
        padding: 12px 14px;
    }
    
    .token-btn {
        width: 40px;
    }
    
    .token-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .accordion-header {
        padding: 16px 20px;
    }
    
    .accordion-content {
        padding: 0 20px 20px 20px;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .endpoint-url {
        font-size: 12px;
    }
    
    .endpoint-example pre {
        font-size: 12px;
        padding: 12px;
    }
}