/* ==========================================================================
   Sistem Pembagian Akun Siswa - Main Stylesheet
   Pure CSS3 Native - Lightweight & Responsive
   ========================================================================== */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.container-narrow {
  max-width: 500px;
}

/* Header & Typography */
header {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.brand-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Card Component */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alert & Notice Boxes */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 15px;
  border: 1px solid transparent;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* Result Box Akun Siswa */
.account-result {
  margin-top: 20px;
  display: none;
}

.account-card {
  background: #f0f9ff;
  border: 2px dashed #0284c7;
  border-radius: var(--radius-md);
  padding: 20px;
}

.account-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0f2fe;
}

.account-row:last-child {
  border-bottom: none;
}

.account-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.account-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.account-value-highlight {
  font-family: monospace;
  font-size: 1.1rem;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 4px;
  color: #0369a1;
}

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Utility Spinner Loading */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Media Queries */
@media (max-width: 640px) {
  .container {
    padding: 15px;
  }
  
  .account-row {
    flex-direction: column;
    gap: 4px;
  }
}