/* Brongko Customer Page Styles */

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

:root {
  --primary-color: #222D11;
  --primary-dark: #1a2310;
  --primary-light: #3a4a22;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --border-color: #e5e5e5;
  --bg-light: #fafafa;
  --bg-page: #f5f5f5;
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --kakao-color: #FEE500;
  --naver-color: #03C75A;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Login Container */
.login-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo h1 {
  font-size: 28px;
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 2px;
}

.logo h1 span {
  color: var(--text-light);
}

.logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 25px;
}

.tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.tab:hover {
  color: var(--text-light);
}

.tab.active {
  color: var(--primary-color);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
}

/* Form Sections */
.form-section {
  display: none;
}

.form-section.active {
  display: block;
}

/* Social Login */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-btn.kakao {
  background: var(--kakao-color);
  color: #000;
}

.social-btn.naver {
  background: var(--naver-color);
  color: #fff;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  padding: 0 15px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(34, 45, 17, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Input with Button */
.input-with-btn {
  display: flex;
  gap: 10px;
}

.input-with-btn input {
  flex: 1;
}

.input-with-btn .btn-secondary {
  white-space: nowrap;
  padding: 14px 16px;
}

/* Timer Text */
.timer-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--error-color);
  text-align: right;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--border-color);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 10px 16px;
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(34, 45, 17, 0.05);
}

.btn-secondary:disabled {
  background: var(--bg-light);
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
}

.btn-outline {
  padding: 14px;
  background: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: rgba(34, 45, 17, 0.05);
}

/* Register Steps */
.register-step {
  display: none;
}

.register-step.active {
  display: block;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.step-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.step-buttons button {
  flex: 1;
}

/* Terms Section */
.terms-section {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  position: relative;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
}

.checkbox-label.all-check {
  font-weight: 600;
  font-size: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
}

.terms-list {
  padding-left: 10px;
}

.terms-list .checkbox-label {
  padding: 10px 0;
  font-size: 14px;
}

.view-terms {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 25px;
}

.back-link a {
  color: var(--text-light);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.back-link a:hover {
  color: var(--primary-color);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn-primary {
  width: 100%;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-color);
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success-color);
}

.toast.error {
  background: var(--error-color);
}

.toast.warning {
  background: var(--warning-color);
}

/* Verify Code Group Animation */
.verify-code-group {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading State */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 25px;
    border-radius: 16px;
  }

  .logo h1 {
    font-size: 24px;
  }

  .form-group input,
  .btn-primary,
  .btn-secondary {
    padding: 12px 14px;
    font-size: 14px;
  }

  .input-with-btn {
    flex-direction: column;
  }

  .input-with-btn .btn-secondary {
    width: 100%;
  }
}

/* ============================================
   Mypage Styles
   ============================================ */

body.mypage-body {
  background: var(--bg-light);
  display: block;
  padding: 0;
}

/* Header */
.mypage-header {
  background: var(--primary-color);
  color: white;
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mypage-header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mypage-header .logo {
  margin: 0;
}

.mypage-header .logo h1 {
  color: white;
  font-size: 22px;
}

.mypage-header .logo h1 span {
  color: rgba(255,255,255,0.8);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.header-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* User Info Card */
.user-info-card {
  background: white;
  margin: -30px 20px 20px;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  position: relative;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
}

.user-details h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.user-grade {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  text-align: center;
}

.stat-item {
  padding: 15px;
  background: var(--bg-light);
  border-radius: 12px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Main Content */
.mypage-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

/* Section */
.mypage-section {
  background: white;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.section-header .view-all {
  color: var(--primary-color);
  font-size: 14px;
  text-decoration: none;
}

.section-content {
  padding: 15px 20px;
}

/* Menu List */
.menu-list {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: var(--bg-light);
  margin: 0 -20px;
  padding: 15px 20px;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.menu-text {
  font-size: 15px;
  color: var(--text-color);
}

.menu-badge {
  background: var(--error-color);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.menu-arrow {
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
}

/* Item Cards */
.item-card {
  padding: 15px;
  background: var(--bg-light);
  border-radius: 12px;
  margin-bottom: 10px;
}

.item-card:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.item-title {
  font-size: 15px;
  font-weight: 600;
}

.item-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.item-status.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-color);
}

.item-status.expired {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
}

.item-status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.item-info {
  font-size: 13px;
  color: var(--text-light);
}

.item-info span {
  display: block;
  margin-bottom: 4px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}
