/* Google-like styling for account pages */

:root {
  --google-blue: #1a73e8;
  --google-blue-hover: #1557b0;
  --google-blue-light: #e8f0fe;
  --google-red: #d93025;
  --google-green: #1e8e3e;
  --google-grey-50: #f8f9fa;
  --google-grey-100: #f1f3f4;
  --google-grey-200: #e8eaed;
  --google-grey-300: #dadce0;
  --google-grey-400: #bdc1c6;
  --google-grey-500: #9aa0a6;
  --google-grey-600: #80868b;
  --google-grey-700: #5f6368;
  --google-grey-800: #3c4043;
  --google-grey-900: #202124;
  --border-radius: 8px;
  --box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --box-shadow-hover: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  --page-bg: var(--google-grey-50);
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-muted: var(--google-grey-50);
  --text-primary: var(--google-grey-900);
  --text-secondary: var(--google-grey-600);
  --border-color: var(--google-grey-200);
  --input-bg: #ffffff;
  --divider-color: var(--google-grey-300);
  --message-success-bg: #e6f4ea;
  --message-success-text: #137333;
  --message-error-bg: #fce8e6;
  --message-error-text: #c5221f;
  --message-warning-bg: #fef7e0;
  --message-warning-text: #b45309;
  --message-info-bg: var(--google-blue-light);
  --message-info-text: #185abc;
}

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

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--page-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color-scheme: light;
}

/* Material Icons */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
}

/* Header */
.account-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  box-shadow: var(--box-shadow);
}

.account-header .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-header .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 500;
}

.account-header .logo .material-icons {
  color: var(--google-blue);
  font-size: 28px;
}

.account-header .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.account-header .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.account-header .nav-links a:hover {
  color: var(--google-blue);
}

/* Main Content Container */
.account-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.account-card {
  background: var(--surface-elevated);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 48px 40px;
  max-width: 450px;
  width: 100%;
  animation: fadeIn 0.3s ease-in;
}

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

/* Card Header */
.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.card-header .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--google-blue) 0%, #1557b0 100%);
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.card-header .logo-icon .material-icons {
  font-size: 48px;
  color: white;
}

.card-header h1 {
  font-size: 24px;
  font-weight: 400;
  color: var(--google-grey-900);
  margin-bottom: 8px;
}

.card-header p {
  font-size: 14px;
  color: var(--google-grey-600);
}

/* Messages/Alerts */
.messages {
  list-style: none;
  margin-bottom: 24px;
}

.message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  animation: slideIn 0.3s ease-out;
}

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

.message::before {
  font-family: 'Material Icons';
  font-size: 20px;
}

.message.success {
  background: var(--message-success-bg);
  color: var(--message-success-text);
  border-left: 4px solid var(--google-green);
}

.message.success::before {
  content: 'check_circle';
  color: var(--google-green);
}

.message.error {
  background: var(--message-error-bg);
  color: var(--message-error-text);
  border-left: 4px solid var(--google-red);
}

.message.error::before {
  content: 'error';
  color: var(--google-red);
}

.message.warning {
  background: var(--message-warning-bg);
  color: var(--message-warning-text);
  border-left: 4px solid #f9ab00;
}

.message.warning::before {
  content: 'warning';
  color: #f9ab00;
}

.message.info {
  background: var(--message-info-bg);
  color: var(--message-info-text);
  border-left: 4px solid var(--google-blue);
}

.message.info::before {
  content: 'info';
  color: var(--google-blue);
}

/* Forms */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label .material-icons {
  font-size: 18px;
  color: var(--google-grey-500);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--input-bg);
  transition: all 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--google-blue);
  box-shadow: 0 0 0 3px var(--google-blue-light);
}

.form-group input::placeholder {
  color: var(--google-grey-400);
}

.form-group .helptext {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Checkbox and Radio */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--google-blue);
}

.form-group.checkbox-group,
.form-group.radio-group {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-group.checkbox-group label,
.form-group.radio-group label {
  margin: 0;
  cursor: pointer;
  font-weight: 400;
}

/* Error Lists */
.errorlist {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 0;
}

.errorlist li {
  font-size: 12px;
  color: var(--google-red);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.errorlist li::before {
  content: '•';
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: var(--google-red);
}

/* Buttons */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  text-align: center;
}

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

.btn-primary {
  background: var(--google-blue);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: var(--google-blue-hover);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--google-blue);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: var(--border-color);
}

.btn-danger {
  background: var(--google-red);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #b31412;
}

.btn-google {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-google:hover:not(:disabled) {
  background: var(--surface-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.btn-block {
  width: 100%;
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
}

/* Form Actions */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.form-actions .secondary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.form-actions a {
  color: var(--google-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.form-actions a:hover {
  color: var(--google-blue-hover);
  text-decoration: underline;
}

/* Social Login */
.social-login {
  margin: 24px 0;
}

.social-login .divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--google-grey-500);
  font-size: 13px;
}

.social-login .divider::before,
.social-login .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--divider-color);
}

.social-login .divider::before {
  margin-right: 16px;
}

.social-login .divider::after {
  margin-left: 16px;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card Footer */
.card-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.card-footer a {
  color: var(--google-blue);
  text-decoration: none;
  font-weight: 500;
}

.card-footer a:hover {
  text-decoration: underline;
}

/* Account Connections List */
.connections-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s;
}

.connection-item:hover {
  background: var(--surface);
  box-shadow: var(--box-shadow-hover);
}

.connection-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
}

.connection-icon img {
  width: 24px;
  height: 24px;
}

.connection-icon .material-icons {
  color: var(--google-blue);
}

.connection-details h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--google-grey-900);
  margin-bottom: 2px;
}

.connection-details p {
  font-size: 12px;
  color: var(--google-grey-600);
}

/* Footer */
.account-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 24px;
  margin-top: auto;
}

.account-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--google-grey-600);
}

.account-footer .footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.account-footer a {
  color: var(--google-grey-600);
  text-decoration: none;
  transition: color 0.2s;
}

.account-footer a:hover {
  color: var(--google-grey-900);
}

/* Responsive */
@media (max-width: 640px) {
  .account-card {
    padding: 32px 24px;
  }

  .card-header h1 {
    font-size: 20px;
  }

  .form-actions .secondary-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .account-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .account-footer .footer-links {
    justify-content: center;
  }
}

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

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

.btn .spinner {
  margin-right: 8px;
}

/* Password Strength Indicator */
.password-strength {
  height: 4px;
  background: var(--google-grey-200);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  transition: all 0.3s;
  border-radius: 2px;
}

.password-strength-bar.weak {
  width: 33%;
  background: var(--google-red);
}

.password-strength-bar.medium {
  width: 66%;
  background: #f9ab00;
}

.password-strength-bar.strong {
  width: 100%;
  background: var(--google-green);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .material-icons {
  font-size: 64px;
  color: var(--google-grey-400);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 400;
  color: var(--google-grey-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--google-grey-600);
  margin-bottom: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --google-blue: #8ab4f8;
    --google-blue-hover: #aec8ff;
    --google-blue-light: rgba(138, 180, 248, 0.16);
    --google-red: #f28b82;
    --google-green: #81c995;
    --google-grey-50: #0b1321;
    --google-grey-100: #0f172a;
    --google-grey-200: #1a2333;
    --google-grey-300: #253040;
    --google-grey-400: #354154;
    --google-grey-500: #556274;
    --google-grey-600: #8a95a3;
    --google-grey-700: #b6c2d1;
    --google-grey-800: #dfe6ef;
    --google-grey-900: #eef1f4;
    --page-bg: #0b1321;
    --surface: #0f172a;
    --surface-elevated: #131c2e;
    --surface-muted: #0f172a;
    --text-primary: #eef1f4;
    --text-secondary: #c5d0dc;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: #0b1321;
    --divider-color: rgba(255, 255, 255, 0.12);
    --box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.55);
    --message-success-bg: rgba(129, 201, 149, 0.12);
    --message-success-text: #81c995;
    --message-error-bg: rgba(242, 139, 130, 0.12);
    --message-error-text: #f28b82;
    --message-warning-bg: rgba(251, 188, 5, 0.12);
    --message-warning-text: #fbbc05;
    --message-info-bg: rgba(138, 180, 248, 0.12);
    --message-info-text: #8ab4f8;
  }

  body {
    color-scheme: dark;
  }
}

