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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #e7e4de;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
}

/* Shared brand/logo styling */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand .header-logo {
  height: 40px;
}
.logo-include {
  position: fixed;
  top: 12px;
  left: 0;
  z-index: 1000;
  padding-left: 12px;
}

.hidden-admin-link {
  position: fixed;
  bottom: 4px;
  left: 4px;
  width: 80px;
  height: 40px;
  opacity: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 100;
}

/* Small header shared styles */
.site-header{background:transparent;padding:10px 18px}
.site-header .inner{max-width:960px;margin:0 auto;display:flex;align-items:center;justify-content:space-between}
.header-logo{height:36px}
.main-nav a{margin-left:12px;color:#1a1a1a;text-decoration:none;font-weight:600}

/* Login Wrapper */
.login-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #e7e4de;
}

/* Login Container */
.login-container {
  width: 100%;
  max-width: 380px;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 40px;
  background: transparent;
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
  margin: 0 auto;
  background: transparent;
}

.logo-subtext {
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-transform: lowercase;
  color: #444;
}

.subtitle {
  font-size: 13px;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

/* Form Styling */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  position: relative;
}

input[type='text'],
input[type='password'],
input[type='email'] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dcd8d0;
  border-radius: 10px;
  font-size: 14px;
  font-family: Avenir, inherit;
  background: #ffffff;
  transition: all 0.3s ease;
  outline: none;
}

input[type='text']::placeholder,
input[type='password']::placeholder,
input[type='email']::placeholder {
  color: #aaa;
}

input[type='text']:focus,
input[type='password']:focus,
input[type='email']:focus {
  background: #ffffff;
  border-color: #cfc8be;
}

/* Button */
.btn-login {
  padding: 12px 16px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: Avenir, inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.btn-login:hover:not(:disabled) {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error Message */
.error-message {
  color: #dc2626;
  background: #fee2e2;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  display: none;
  animation: slideDown 0.3s ease-out;
}

.error-message.show {
  display: block;
}

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

/* Loading State */
.loading {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

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

/* Responsive */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 16px;
  }

  .logo-section h1 {
    font-size: 28px;
  }

  input[type='text'],
  input[type='password'] {
    padding: 10px 12px;
    font-size: 16px; /* Prevent iOS zoom */
  }

  .btn-login {
    padding: 10px 14px;
  }
}
