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

:root {
  --primary-color: #C21E1B;
  --primary-dark: #9a1816;
  --primary-light: #d63835;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --sidebar-width: 260px;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* Main Container */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header */
.top-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.header-left h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
}

.main-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-light);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

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

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

/* Content Area */
.content {
  flex: 1;
  padding: 32px;
  background-color: var(--bg-light);
}

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

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.add-project-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-project-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Project Card */
.project-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.project-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  background-color: #4CAF50;
  color: white;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
}

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-right: 80px;
}

.project-info {
  margin-bottom: 16px;
}

.project-info-item {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.5;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.project-cost {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 600;
}

.project-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background-color: var(--bg-light);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.action-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.action-btn:hover {
  background-color: var(--border-color);
  transform: scale(1.05);
}

.view-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background-color: var(--bg-light);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.modal-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-dark);
}

.close-modal {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: var(--text-dark);
}

#addProjectForm {
  padding: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-dark);
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.cancel-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn:hover {
  background-color: var(--bg-light);
}

.submit-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
  .top-header {
    padding: 16px 20px;
  }

  .content {
    padding: 20px;
  }
  
  .checkbox-container span {
    display: none;
  }
}
