/* FollowupMail - Main Stylesheet */

/* Base Styles */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #c0392b;
  --text-color: #333;
  --border-color: #ddd;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

/* Header */
.main-header {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo h1 {
  font-size: 1.5rem;
  margin: 0;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 10px;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 15px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a:hover,
.main-nav li.active a {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.main-nav i {
  font-size: 1rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.username {
  font-weight: 500;
}

.logout-btn {
  color: white;
  padding: 6px 12px;
  background-color: var(--accent-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.logout-btn:hover {
  background-color: var(--danger-color);
  color: white;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.content-wrapper {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 25px;
}

/* Footer */
.main-footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  text-align: center;
  padding: 15px;
  margin-top: auto;
}

/* Page Header */
.page-header {
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

/* Cards */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Dashboard Layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  color: #666;
  font-size: 1rem;
  margin-top: 5px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  text-align: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
  color: white;
}

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

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

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #219955;
  color: white;
}

/* Login Form */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--dark-color);
}

.table tr:hover {
  background-color: #f5f7fa;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
}

/* Alerts */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid;
}

.alert-success {
  background-color: #d4edda;
  border-color: var(--success-color);
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: var(--danger-color);
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: var(--warning-color);
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #17a2b8;
  color: #0c5460;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease;
}

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

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.modal-close:hover {
  background-color: #f5f5f5;
  color: var(--dark-color);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Progress Bar */
.progress {
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin: 15px 0;
}

.progress-bar {
  height: 100%;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.progress-bar-animated {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: progressAnimation 1s linear infinite;
}

@keyframes progressAnimation {
  0% {
    background-position: 1rem 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .main-nav ul {
    gap: 5px;
  }

  .main-nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    padding: 10px;
  }

  .logo {
    margin-bottom: 10px;
  }

  .main-nav {
    width: 100%;
    margin: 10px 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

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

  .user-menu {
    margin-top: 10px;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

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

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

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