/*
 * Khanjahan Ali College of Science and Technology
 * Modern Educational Fee Portal Stylesheet
 */

:root {
  --primary: #0f2b48;
  --primary-light: #1e3a8a;
  --primary-hover: #0c1e38;
  --accent: #059669;
  --accent-light: #10b981;
  --accent-gold: #d97706;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2b48 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Header & Banner */
.top-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.college-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0f2b48, #059669);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(15, 43, 72, 0.2);
}

.logo-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.logo-title p {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-live {
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bbf7d0;
}

.badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
  animation: pulse 2s infinite;
}

.badge-sandbox {
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #fde68a;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.admin-link-btn {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  padding: 6px 14px;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.admin-link-btn:hover {
  background: var(--primary-light);
  color: #fff;
}

/* Hero Section */
.hero-banner {
  background: var(--bg-gradient);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 15px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.college-details-pill {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Main Container */
.main-container {
  max-width: 1050px;
  margin: -30px auto 40px;
  padding: 0 16px;
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 2;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Card */
.form-card, .summary-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  padding: 28px;
}

.card-header-styled {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 36px;
  height: 36px;
  background: #e0f2fe;
  color: #0284c7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.card-header-styled h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* Form Layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 580px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-group label span.req {
  color: var(--danger);
}

.input-control, .select-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.input-control:focus, .select-control:focus {
  outline: none;
  border-color: var(--primary-light);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* Fee Type Radio Cards */
.fee-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.fee-option-label {
  display: block;
  position: relative;
  cursor: pointer;
}

.fee-option-label input {
  position: absolute;
  opacity: 0;
}

.fee-option-box {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.fee-option-box .fee-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.fee-option-box .fee-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.fee-option-label input:checked + .fee-option-box {
  border-color: var(--accent);
  background: #ecfdf5;
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.15);
}

.fee-option-label input:checked + .fee-option-box .fee-title {
  color: #065f46;
}

/* Amount Input Highlight */
.amount-wrapper {
  position: relative;
}

.currency-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.amount-input {
  padding-left: 48px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

/* Summary Card */
.summary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-list {
  list-style: none;
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
}

.summary-item .label {
  color: var(--text-muted);
}

.summary-item .val {
  font-weight: 600;
  color: var(--text-dark);
}

.total-payable-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.total-payable-box p {
  font-size: 13px;
  color: #166534;
  font-weight: 600;
}

.total-payable-box .total-amount-display {
  font-size: 28px;
  font-weight: 800;
  color: #14532d;
}

/* SSLCommerz Brand Banner */
.sslcz-trust-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  margin-bottom: 20px;
}

.sslcz-trust-box p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sslcz-trust-box img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Submit Button */
.btn-pay-now {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-pay-now:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.35);
}

.btn-pay-now:active {
  transform: translateY(1px);
}

/* Quick Search Card */
.search-receipt-bar {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.search-receipt-bar h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.search-form-inline {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 450px;
}

.search-form-inline input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
}

.search-form-inline button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Footer */
.portal-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 20px;
  font-size: 13px;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.portal-footer a {
  color: #38bdf8;
  text-decoration: none;
}
