/* ==========================================================================
   PATS PORTAL - UNIFIED DESIGN SYSTEM (style.css)
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0d9488;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Layout Header & Footer --- */
.portal-header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  box-shadow: var(--shadow-sm);
}

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

.brand h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

.brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.portal-footer {
  margin-top: auto;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --- Hero Section --- */
.hero-section {
  padding: 40px 0 20px;
  text-align: center;
}

.hero-section h2 {
  font-size: 1.875rem;
  margin-bottom: 8px;
}

.hero-section p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Catalog & Grid Cards --- */
.portal-main {
  padding: 30px 0 60px;
}

.category-group {
  margin-bottom: 40px;
}

.category-title {
  font-size: 1.25rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.test-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: #eff6ff;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.card-title {
  font-size: 1.125rem;
  margin-bottom: 8px;
  padding-right: 40px;
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

/* --- Buttons & Forms --- */
.btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
  .grid-cards {
    grid-template-columns: 1fr;
  }
}
