/* eCourtCase - Global Styles */
/* Theme Colors: #eb6c21 (Orange), #191b4a (Dark Blue) */

:root {
  --primary-orange: #eb6c21;
  --primary-dark: #191b4a;
  --primary-orange-light: #ff7f3a;
  --primary-dark-light: #2a2d6b;
  --light-bg: #f5f7fa;
  --card-bg: #ffffff;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--light-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

body.dashboard-page {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--light-bg);
}

/* Login Container */
.login-container {
  width: 100%;
  max-width: 360px;
}

/* Brand Header */
.brand-header {
  text-align: center;
  margin-bottom: 16px;
}

.brand-header h1 {
  color: var(--primary-dark);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
}

.brand-header .brand-name {
  color: var(--primary-orange);
}

.brand-header p {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 400;
}

/* Login Card */
.login-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 24px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.login-title {
  color: var(--primary-dark);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}

/* Form Elements */
.form-label {
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.form-control {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: var(--primary-dark);
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(235, 108, 33, 0.08);
  outline: none;
}

.form-control::placeholder {
  color: #9ca3af;
}

/* Password Field */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}

.password-toggle:hover {
  color: var(--primary-orange);
}

/* Checkbox */
.form-check {
  margin: 14px 0;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-orange);
  border-color: var(--primary-orange);
}

.form-check-label {
  color: var(--primary-dark);
  font-size: 0.8rem;
  margin-left: 6px;
  cursor: pointer;
}

/* Buttons */
.btn-primary-custom {
  background: var(--primary-orange);
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  width: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background: var(--primary-orange-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(235, 108, 33, 0.3);
}

.btn-primary-custom:active {
  transform: translateY(0);
}

.btn-outline-custom {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  width: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-outline-custom:hover {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
  background: rgba(235, 108, 33, 0.03);
}

.btn-outline-custom img {
  width: 16px;
  height: 16px;
}

.btn-outline-custom i {
  font-size: 1rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 18px 0 16px;
  color: #9ca3af;
  font-size: 0.7rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.divider span {
  padding: 0 10px;
}

/* Forgot Password */
.forgot-password {
  text-align: right;
  margin-top: -6px;
  margin-bottom: 14px;
}

.forgot-password a {
  color: var(--primary-orange);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
}

.forgot-password a:hover {
  text-decoration: underline;
}

/* Signup Link */
.signup-link {
  text-align: center;
  margin-top: 18px;
  color: var(--primary-dark);
  font-size: 0.8rem;
}

.signup-link a {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover {
  text-decoration: underline;
}

/* OTP Login Pages */
.back-button-wrapper {
  margin-top: 20px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.back-button {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--primary-orange);
}

.back-button i {
  font-size: 0.85rem;
}

.login-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 16px;
  margin-top: -8px;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(235, 108, 33, 0.1);
}

.country-code {
  background: #f9fafb;
  padding: 10px 14px;
  border-right: 1px solid #e5e7eb;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.phone-input {
  border: none !important;
  box-shadow: none !important;
  padding-left: 12px;
}

.phone-input:focus {
  outline: none;
  box-shadow: none !important;
}

.form-text {
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 6px;
  display: block;
}

/* Text Utilities */
.text-muted {
  color: #6b7280 !important;
}

.text-small {
  font-size: 0.8rem;
}

.text-link-orange {
  color: var(--primary-orange);
  text-decoration: none;
}

.text-link-orange:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 576px) {
  .login-card {
    padding: 20px 18px;
  }

  .brand-header h1 {
    font-size: 1.3rem;
  }

  .login-title {
    font-size: 1.2rem;
  }
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 16px;
  display: flex;
  align-items: start;
  gap: 12px;
  border-left: 4px solid;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
  min-width: 320px;
  position: relative;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: #3b82f6;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.toast.success .toast-icon {
  background: #d1fae5;
  color: #10b981;
}

.toast.error .toast-icon {
  background: #fee2e2;
  color: #ef4444;
}

.toast.warning .toast-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.toast.info .toast-icon {
  background: #dbeafe;
  color: #3b82f6;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 4px 0;
}

.toast-message {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: var(--light-bg);
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .toast-container {
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}
