/* portal/portal.css - Üye Self-Servis Portalı Stilleri */
:root {
  --bg-main: #0a0f1d;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --bg-input: #0f172a;
  --border-color: #1e293b;
  --border-focus: #10b981;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --emerald: #10b981;
  --emerald-hover: #059669;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --blue: #3b82f6;
  --danger: #ef4444;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

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

/* Header */
.portal-header {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.portal-brand-text {
  display: flex;
  flex-direction: column;
}

.portal-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: #fff;
}

.portal-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portal-user-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.member-badge {
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--bg-card-hover);
  color: var(--danger);
  border-color: var(--danger);
}

/* Main Container */
.portal-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

/* Login View */
#login-view {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
}

.login-icon-box {
  width: 64px;
  height: 64px;
  background: var(--emerald-soft);
  color: var(--emerald);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.portal-form {
  margin-top: 1.5rem;
  text-align: left;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-secondary {
  background: var(--bg-card-hover);
  color: #fff;
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-success {
  background: var(--emerald);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

.error-msg {
  color: var(--danger);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.login-footer-hint {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Dashboard View */
.member-profile-card {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
}

.member-profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.member-avatar {
  width: 56px;
  height: 56px;
  background: var(--emerald-soft);
  color: var(--emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-info h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.assoc-title {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.member-status-tag {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
}

.member-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.text-emerald {
  color: var(--emerald);
}

.portal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.badge-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
}

.balance-display {
  text-align: right;
}

.balance-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.balance-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--emerald);
}

.dues-action-box {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.portal-table th {
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.portal-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-table-action {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-table-action:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
}

/* Announcements */
.announcement-item {
  background: var(--bg-input);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--emerald);
  margin-top: 1rem;
}

.announcement-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 0.4rem;
}

.announcement-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.75rem;
}

/* Modals */
.portal-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.portal-modal {
  max-width: 500px;
  width: 100%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.payment-summary-box {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.total-row {
  border-top: 1px solid var(--border-color);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
  font-weight: 700;
}

.ssl-guarantee {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* Receipt Paper */
.receipt-paper {
  background: #fff !important;
  color: #111827 !important;
  max-width: 580px;
}

.receipt-header {
  text-align: center;
  border-bottom: 2px dashed #d1d5db;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.receipt-header .btn-close {
  position: absolute;
  top: 0;
  right: 0;
  color: #6b7280;
}

.receipt-logo {
  color: #059669;
  margin-bottom: 0.5rem;
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.receipt-ledger-box {
  background: #f3f4f6;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
}

.ledger-code {
  word-break: break-all;
  display: block;
  font-family: monospace;
  color: #047857;
  font-weight: 600;
}

.receipt-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.receipt-footer .btn-secondary {
  background: #111827;
  color: #fff;
}

/* Footer */
.portal-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
