/**
 * Sales Competency Service - Styles
 * Version: 1.0.3
 * Light theme matching Account Profile dashboard
 */

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 40px;
  width: auto;
}

.header-title {
  font-size: 1.8em;
  font-weight: 600;
  color: white;
}

.version-tag {
  font-size: 0.9em;
  opacity: 0.9;
  font-weight: normal;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  text-align: right;
}

.user-name {
  font-size: 1.1em;
  font-weight: 600;
  color: #ecf0f1;
}

.user-email {
  font-size: 0.9em;
  color: #bdc3c7;
}

.btn-logout {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.3s ease;
}

.btn-logout:hover {
  background: #c0392b;
}

/* Main Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-section h2 {
  font-size: 2.2em;
  color: #2c3e50;
  margin-bottom: 15px;
}

.welcome-section p {
  color: #666;
  font-size: 1.1em;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  margin-bottom: 25px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e9ecef;
  background: #f8f9fa;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover:not(.active) {
  background: #e9ecef;
}

.tab-btn.active {
  background: #2a2a2a;
  color: white;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Section Title */
.section-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 20px;
  color: #2c3e50;
}

/* Tile Grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Tile Card - Matching Account Profile dossier-card */
.tile {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-left: 5px solid #6c757d;
}

.tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.tile.completed {
  border-left-color: #28a745;
}

.tile.in-progress {
  border-left-color: #ffc107;
}

.tile.not-started {
  border-left-color: #6c757d;
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.tile-number {
  background: none;
  color: #222;
  font-weight: 700;
  font-size: 1.05em;
  white-space: nowrap;
}

.tile-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

.tile-description {
  color: #666;
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 20px;
}

.tile-status {
  margin-bottom: 15px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  display: inline-block;
}

.status-badge.not-started {
  background: #e9ecef;
  color: #6c757d;
}

.status-badge.in-progress {
  background: #fff3cd;
  color: #856404;
}

.status-badge.complete,
.status-badge.completed {
  background: #d4edda;
  color: #155724;
}

.status-badge.available {
  background: #d4edda;
  color: #155724;
}

.tile-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3498db;
  font-weight: 500;
  font-size: 0.95em;
}

.tile-action svg {
  transition: transform 0.3s ease;
}

.tile:hover .tile-action svg {
  transform: translateX(4px);
}

/* Tool Actions (Start / New + View Reports) */
.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tool-actions .tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tool-actions .start-btn {
  background: #2563eb;
  color: white;
}
.tool-actions .start-btn:hover {
  background: #1d4ed8;
}
.tool-actions .new-btn {
  background: #16a34a;
  color: white;
}
.tool-actions .new-btn:hover {
  background: #15803d;
}
.tool-actions .reports-btn {
  background: #f0f4f8;
  color: #334155;
  border: 1px solid #d0d5dd;
}
.tool-actions .reports-btn:hover {
  background: #e2e8f0;
}

/* Tile Progress Visuals */
.tile-progress-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.tile-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.tile-progress-label {
  font-size: 0.78em;
  color: #64748b;
  font-weight: 600;
}
.tile-mini-radar {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}
.tile-score-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
}
.tile-score-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1em;
  color: white;
  flex-shrink: 0;
}
.tile-score-detail {
  font-size: 0.82em;
  color: #64748b;
  line-height: 1.4;
}

/* Disabled Tile */
.tile.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-left-color: #dee2e6;
}

.tile.disabled:hover {
  transform: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

/* Loading Spinner */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #e9ecef;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Progress Summary - matching Account Profile */
.progress-summary {
  background: white;
  border-radius: 15px;
  padding: 18px 22px;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.progress-summary h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.4em;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px solid #e9ecef;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .header-left {
    flex-direction: column;
  }
  
  .header-right {
    flex-direction: column;
  }
  
  .tab-nav {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 1 100%;
  }
  
  .container {
    padding: 15px;
  }
  
  .tile-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Login Page Styles */
.login-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  max-width: 450px;
  width: 100%;
  margin: auto;
}

.login-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.login-header h1 {
  font-size: 2em;
  margin-bottom: 10px;
  font-weight: 300;
}

.login-header p {
  font-size: 1.1em;
  opacity: 0.9;
}

.login-content {
  padding: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo img {
  max-width: 150px;
  height: auto;
}

.login-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  text-align: center;
}

.login-description {
  color: #666;
  margin-bottom: 2rem;
  text-align: center;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #2a2a2a;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.btn-login:hover {
  background: #714D4D;
}

.login-footer {
  margin-top: 2rem;
  color: #6c757d;
  font-size: 0.85rem;
  text-align: center;
}
