/* Cloudscape-inspired custom styles */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
  background-color: #f9fafb;
  color: #000716;
}

/* Top Navigation */
.awsui-top-navigation {
  background-color: #232f3e;
  color: white;
  height: 48px;
  box-shadow: 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15);
}

.awsui-top-navigation-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.awsui-top-navigation-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.awsui-top-navigation-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.awsui-top-navigation-logo {
  font-size: 24px;
}

.awsui-top-navigation-title {
  font-size: 18px;
  font-weight: 700;
}

/* App Layout */
.awsui-app-layout {
  min-height: calc(100vh - 48px);
}

.awsui-app-layout-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.awsui-content-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Container */
.awsui-container {
  background-color: #ffffff;
  border: 1px solid #e9ebed;
  border-radius: 16px;
  box-shadow: 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15);
}

.awsui-container-header {
  padding: 20px 20px 16px 20px;
  border-bottom: 1px solid #e9ebed;
}

.awsui-container-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #000716;
}

.awsui-header-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.awsui-container-content {
  padding: 20px;
}

/* Form Field */
.awsui-form-field {
  margin-bottom: 20px;
}

.awsui-form-field-label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #000716;
}

.awsui-form-field-description {
  margin-top: 4px;
  font-size: 12px;
  color: #5f6b7a;
}

.awsui-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 2px solid #aab7b8;
  border-radius: 8px;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out;
}

.awsui-input:focus {
  outline: none;
  border-color: #0972d3;
}

/* Button */
.awsui-button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #aab7b8;
  border-radius: 20px;
  background-color: #ffffff;
  color: #000716;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.awsui-button:hover:not(:disabled) {
  background-color: #fafafa;
  border-color: #879596;
}

.awsui-button:active:not(:disabled) {
  background-color: #f2f3f3;
}

.awsui-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.awsui-button-primary {
  background-color: #0972d3;
  border-color: #0972d3;
  color: #ffffff;
}

.awsui-button-primary:hover:not(:disabled) {
  background-color: #0862c0;
  border-color: #0862c0;
}

.awsui-button-primary:active:not(:disabled) {
  background-color: #0753ad;
  border-color: #0753ad;
}

.awsui-button-small {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 16px;
}

.awsui-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Progress Bar */
.awsui-progress-bar-container {
  margin: 16px 0;
}

.awsui-progress-bar {
  width: 100%;
  height: 4px;
  background-color: #e9ebed;
  border-radius: 2px;
  overflow: hidden;
}

.awsui-progress-bar-fill {
  height: 100%;
  background-color: #0972d3;
  transition: width 0.3s ease-in-out;
  width: 0%;
}

.awsui-progress-bar-label {
  margin-top: 8px;
  font-size: 12px;
  color: #5f6b7a;
  text-align: center;
}

/* Flashbar */
.awsui-flashbar {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.awsui-flashbar-success {
  background-color: #d5f2e3;
  border-left: 4px solid #037f0c;
  color: #037f0c;
}

.awsui-flashbar-error {
  background-color: #fce8e8;
  border-left: 4px solid #d91515;
  color: #d91515;
}

/* Empty State */
.awsui-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #5f6b7a;
}

/* Cards */
.awsui-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

.awsui-card {
  background-color: #ffffff;
  border: 1px solid #e9ebed;
  border-radius: 8px;
  padding: 16px;
}

.awsui-card-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #000716;
}

.awsui-card-id {
  font-size: 12px;
  color: #5f6b7a;
  font-family: monospace;
  margin-bottom: 12px;
}

.awsui-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.awsui-card-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #5f6b7a;
  margin-bottom: 4px;
}

.awsui-card-field-value {
  font-size: 14px;
  color: #000716;
}

.awsui-card-section {
  margin-bottom: 16px;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #e9ebed;
}

/* Tabs */
.awsui-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e9ebed;
  margin-bottom: 20px;
}

.awsui-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  background: none;
  color: #5f6b7a;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease-in-out;
}

.awsui-tab:hover {
  color: #000716;
}

.awsui-tab-active {
  color: #0972d3;
  border-bottom-color: #0972d3;
}

.awsui-tab-content {
  display: none;
}

.awsui-tab-content-active {
  display: block;
}

.awsui-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e9ebed;
}

/* Badge */
.awsui-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.awsui-badge-green {
  background-color: #d5f2e3;
  color: #037f0c;
}

.awsui-badge-blue {
  background-color: #d1ecf9;
  color: #0972d3;
}

.awsui-badge-red {
  background-color: #fce8e8;
  color: #d91515;
}

.awsui-badge-grey {
  background-color: #e9ebed;
  color: #5f6b7a;
}

/* Login Screen Styles */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 48px;
  max-width: 600px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

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

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

.login-logo {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

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

.login-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: #000716;
  margin: 0 0 12px 0;
}

.login-subtitle {
  font-size: 16px;
  color: #5f6b7a;
  margin: 0;
  line-height: 1.5;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #000716;
  margin: 0 0 8px 0;
}

.feature-card p {
  font-size: 12px;
  color: #5f6b7a;
  margin: 0;
  line-height: 1.4;
}

.awsui-button-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.login-icon {
  width: 20px;
  height: 20px;
}

.login-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #e9ebed;
}

.login-footer p {
  font-size: 12px;
  color: #879596;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .awsui-cards {
    grid-template-columns: 1fr;
  }
  
  .awsui-card-grid {
    grid-template-columns: 1fr;
  }
  
  .awsui-header-with-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .login-container {
    padding: 32px 24px;
  }
  
  .login-features {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .login-hero h1 {
    font-size: 24px;
  }
}

/* Version Modal Styles */
.version-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.version-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.version-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ebed;
}

.version-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #16191f;
}

.version-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #545b64;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.version-modal-close:hover {
  background-color: #f2f3f3;
}

.version-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.version-summary {
  margin-bottom: 20px;
  padding: 12px 16px;
  background-color: #f2f3f3;
  border-radius: 4px;
  font-size: 14px;
  color: #16191f;
}

.versions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.version-item {
  border: 1px solid #e9ebed;
  border-radius: 8px;
  padding: 16px;
  background-color: #ffffff;
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9ebed;
}

.version-number {
  font-weight: 600;
  font-size: 16px;
  color: #16191f;
}

.version-date {
  font-size: 14px;
  color: #545b64;
}

.version-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.version-detail {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.version-label {
  font-weight: 600;
  color: #545b64;
  min-width: 80px;
}

.version-hash {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hash-value {
  font-family: monospace;
  font-size: 13px;
  color: #16191f;
  word-break: break-all;
  flex: 1;
}

.copy-hash-btn-small {
  background: none;
  border: 1px solid #d5dbdb;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  color: #545b64;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: all 0.2s;
}

.copy-hash-btn-small:hover {
  background-color: #f2f3f3;
  border-color: #aab7b8;
}

.copy-hash-btn-small:active {
  background-color: #e9ebed;
}

.version-badge {
  display: inline-block;
  background-color: #0972d3;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  vertical-align: middle;
}
