/* ========== Auth & Publish Pages ========== */

/* Auth Card (login / register) */
.auth-wrap {
  max-width: 460px;
  margin: 40px auto 60px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 35px 40px;
}
.auth-title {
  text-align: center;
  font-size: 22px;
  color: #2c2c2c;
  font-weight: bold;
  margin-bottom: 8px;
}
.auth-sub {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 25px;
}
.auth-form .form-item {
  margin-bottom: 18px;
}
.auth-form .form-item label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  font-weight: bold;
}
.auth-form .form-item label .req {
  color: #f00;
  margin-right: 2px;
}
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form input[type="email"] {
  width: 100%;
  height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.auth-form input:focus {
  border-color: #ff7f00;
}
.auth-form .btn-primary {
  width: 100%;
  height: 44px;
  background: #ff7f00;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}
.auth-form .btn-primary:hover {
  background: #e8720a;
}
.auth-links {
  margin-top: 15px;
  text-align: center;
  font-size: 13px;
  color: #999;
}
.auth-links a {
  color: #ff7f00;
  margin: 0 5px;
}
.auth-error {
  display: none;
  background: #fff0f0;
  border: 1px solid #ffcccc;
  color: #d32f2f;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
}
.auth-success {
  display: none;
  background: #f0fff4;
  border: 1px solid #c8f7c5;
  color: #2e7d32;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Agreement checkbox */
.agree-row {
  margin-bottom: 18px;
  font-size: 13px;
  color: #666;
}
.agree-row input {
  vertical-align: -2px;
  margin-right: 5px;
}
.agree-row a {
  color: #ff7f00;
}

/* Legal Page (privacy / agreement) */
.legal-wrap {
  max-width: 900px;
  margin: 40px auto 60px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 35px 45px;
}
.legal-wrap h1 {
  font-size: 22px;
  text-align: center;
  color: #2c2c2c;
  margin-bottom: 10px;
}
.legal-wrap .legal-updated {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}
.legal-wrap h2 {
  font-size: 16px;
  color: #2c2c2c;
  margin: 25px 0 10px;
}
.legal-wrap p {
  font-size: 14px;
  color: #555;
  line-height: 1.9;
  margin-bottom: 10px;
  text-indent: 2em;
}
.legal-wrap .legal-footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  text-align: center;
}

/* Publish Page */
.publish-wrap {
  max-width: 900px;
  margin: 40px auto 60px;
}
.login-required {
  background: #fff;
  border: 1px solid #ffe4b5;
  border-radius: 8px;
  padding: 50px 30px;
  text-align: center;
}
.login-required .lock-icon {
  font-size: 56px;
  margin-bottom: 15px;
  color: #ff7f00;
}
.login-required h2 {
  font-size: 20px;
  color: #2c2c2c;
  margin-bottom: 10px;
}
.login-required p {
  font-size: 14px;
  color: #999;
  margin-bottom: 25px;
}
.login-required .btn-row {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.login-required .btn {
  display: inline-block;
  padding: 10px 38px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}
.login-required .btn-login {
  background: #ff7f00;
  color: #fff;
}
.login-required .btn-login:hover {
  background: #e8720a;
}
.login-required .btn-reg {
  border: 1px solid #ff7f00;
  color: #ff7f00;
}
.login-required .btn-reg:hover {
  background: #fff5e6;
}

.publish-form {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 30px 35px;
}
.publish-form h2 {
  font-size: 20px;
  color: #2c2c2c;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.publish-form .form-item {
  margin-bottom: 18px;
}
.publish-form .form-item label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 6px;
}
.publish-form .form-item label .req {
  color: #f00;
}
.publish-form input[type="text"],
.publish-form input[type="tel"],
.publish-form select,
.publish-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus {
  border-color: #ff7f00;
}
.publish-form textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.8;
}
.publish-form .btn-primary {
  padding: 12px 45px;
  background: #ff7f00;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}
.publish-form .btn-primary:hover {
  background: #e8720a;
}

/* My posts list */
.my-posts {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-top: 25px;
  padding: 25px 30px;
}
.my-posts h2 {
  font-size: 18px;
  color: #2c2c2c;
  margin-bottom: 15px;
}
.my-posts ul li {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.my-posts ul li:last-child {
  border-bottom: none;
}
.my-posts .post-title {
  font-size: 14px;
  color: #333;
  font-weight: bold;
  flex: 1;
}
.my-posts .post-meta {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
.my-posts .post-del {
  color: #999;
  font-size: 12px;
  cursor: pointer;
}
.my-posts .post-del:hover {
  color: #f00;
}
.my-posts .empty-tip {
  text-align: center;
  color: #bbb;
  font-size: 13px;
  padding: 20px 0;
}

/* Logged-in top bar state */
.top-left .user-box {
  margin-left: 10px;
  color: #ff7f00;
}
.top-left .user-box .sep {
  color: #555;
  margin: 0 8px;
}
.top-left .user-box a {
  color: #ccc;
}
.top-left .user-box a:hover {
  color: #ff7f00;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-wrap { margin: 20px 10px 40px; padding: 25px 20px; }
  .legal-wrap { margin: 20px 10px 40px; padding: 25px 20px; }
  .publish-wrap { margin: 20px 10px 40px; }
  .my-posts ul li { flex-direction: column; align-items: flex-start; gap: 5px; }
}
