/* ====================================
   Byrne Accounting - Client Portal Styles
   Color Scheme: Navy Blue + Dark Teal
   ==================================== */

/* Import main variables from style.css */
@import url('./style.css');

/* ====================================
   Portal-Specific Variables
   ==================================== */
:root {
  --portal-bg: #f9fafb;
  --portal-nav-height: 70px;
}

/* ====================================
   Base Portal Styles
   ==================================== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--portal-bg);
  min-height: 100vh;
}

/* ====================================
   Loading Screen
   ==================================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-content .logo {
  color: #14b8a6;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.loading-content h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #14b8a6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* ====================================
   Login Screen
   ==================================== */
.login-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-container {
  width: 100%;
  max-width: 600px;
}

.login-header {
  text-align: center;
  margin-bottom: 3rem;
}

.login-header .logo {
  color: #14b8a6;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-header h1 {
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.login-header .subtitle {
  color: #14b8a6;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-content {
  background: white;
  border-radius: 1.5rem;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.welcome-message {
  text-align: center;
  margin-bottom: 2.5rem;
}

.welcome-message h2 {
  color: #1e293b;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.welcome-message p {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.login-features .feature {
  text-align: center;
}

.login-features .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.login-features h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.login-features p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 1.25rem 2rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(30, 58, 138, 0.4);
}

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

.login-note {
  text-align: center;
  margin-top: 1.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
}

.back-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: #14b8a6;
}

@media (max-width: 768px) {
  .login-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .login-content {
    padding: 2rem;
  }
}

/* ====================================
   Portal Dashboard
   ==================================== */
.portal-dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.portal-nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: var(--portal-nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-left .logo {
  color: #1e3a8a;
}

.nav-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-title .title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e3a8a;
}

.nav-title .subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9375rem;
}

.user-email {
  font-size: 0.8125rem;
  color: #6b7280;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-logout:hover {
  border-color: #1e3a8a;
  color: #1e3a8a;
  background: #f9fafb;
}

/* Main Content */
.portal-main {
  flex: 1;
  padding: 2rem 0;
}

.portal-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  color: white;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
}

.banner-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: white;
}

.banner-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.0625rem;
}

.banner-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}

.badge-icon {
  width: 3rem;
  height: 3rem;
  background: #14b8a6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-text {
  display: flex;
  flex-direction: column;
}

.badge-title {
  font-weight: 700;
  font-size: 1rem;
}

.badge-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Quick Stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e3a8a;
}

/* Section Header */
.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: #6b7280;
  font-size: 1rem;
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.app-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(30, 58, 138, 0.15);
  border-color: #1e3a8a;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.app-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}

.app-badge {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-content h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.app-content p {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.app-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4b5563;
  font-size: 0.9375rem;
}

.app-features li::before {
  content: '✓';
  color: #14b8a6;
  font-weight: 700;
  font-size: 1.125rem;
}

.app-action {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-action-text {
  font-weight: 700;
  color: #1e3a8a;
  font-size: 1rem;
}

.app-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  transition: all 0.3s;
}

.app-card:hover .app-action-icon {
  background: #1e3a8a;
  color: white;
}

/* Help Section */
.help-section {
  margin-top: 3rem;
}

.help-card {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  border: 2px solid #e5e7eb;
}

.help-icon {
  font-size: 3.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.help-content h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.help-content p {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.help-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: color 0.3s;
}

.help-links a:hover {
  color: #0d9488;
}

/* Footer */
.portal-footer {
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-content p {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #1e3a8a;
}

.footer-links span {
  color: #d1d5db;
}

.footer-tech {
  color: #9ca3af;
  font-size: 0.8125rem;
}

.footer-tech strong {
  color: #0d9488;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-content {
    padding: 0 1rem;
  }

  .portal-container {
    padding: 0 1rem;
  }

  .welcome-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .banner-content h1 {
    font-size: 1.5rem;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .user-info {
    display: none;
  }

  .help-card {
    flex-direction: column;
    text-align: center;
  }

  .help-links {
    flex-direction: column;
    align-items: center;
  }
}
