/* Portal extras on top of admin.css — match main License Manager look */

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

.project-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: #10b981;
}

.project-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.project-name {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
}

.project-desc {
  color: #718096;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-stats {
  display: flex;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.project-stats .stat { flex: 1; }
.project-stats .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #10b981;
}
.project-stats .stat-label {
  font-size: 12px;
  color: #718096;
  text-transform: uppercase;
  margin-top: 5px;
}

.history-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin-bottom: 30px;
}

.history-card h3 {
  font-size: 22px;
  color: #2d3748;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.history-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.loading {
  text-align: center;
  padding: 50px;
  color: #718096;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #10b981;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.top-actions {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.create-license-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.create-license-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.search-input {
  flex: 1;
  min-width: 180px;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
}

.search-input:focus {
  outline: none;
  border-color: #10b981;
}

.tag-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #dbeafe;
  color: #1e40af;
  vertical-align: middle;
}

/* Login (same as main admin) */
.login-page {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  margin: 0;
}

.login-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.login-header h1 {
  font-size: 28px;
  margin: 0 0 10px;
}

.login-header p {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

.login-body { padding: 40px 30px; }

.login-body .form-group { margin-bottom: 25px; }
.login-body .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}
.login-body .form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
}
.login-body .form-group input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.login-error {
  background: #fee;
  color: #c33;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid #c33;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open { display: flex; }

.modal-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
  color: #2d3748;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Install Admin 5 — Home Screen */
.install-app-card {
  background: white;
  border-radius: 15px;
  padding: 22px 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 2px solid #e2e8f0;
}

.install-app-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.install-app-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.install-app-name {
  font-size: 20px;
  font-weight: 800;
  color: #2d3748;
  line-height: 1.2;
}

.install-app-desc {
  font-size: 13px;
  color: #718096;
  margin-top: 4px;
}

.install-app-btn {
  white-space: nowrap;
}

.install-app-btn:disabled {
  opacity: 0.75;
  cursor: default;
}

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card { padding: 20px; }
  .project-name { font-size: 20px; }
  .history-card { padding: 18px; }
  .install-app-card { padding: 18px; }
  .install-app-btn { width: 100%; justify-content: center; }
}
