* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #111827;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.login-card h1 {
  margin: 0 0 8px;
  text-align: center;
}

.login-card p {
  text-align: center;
  color: #64748b;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px;
  outline: none;
  background: #ffffff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #111827;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
}

.btn.secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
}

.btn.danger {
  background: #dc2626;
}

.btn.full {
  width: 100%;
}

.error {
  color: #dc2626;
  font-size: 14px;
}

.success {
  color: #047857;
  font-size: 14px;
}

.demo-box,
.warning-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
}

.warning-box {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.logo-title {
  font-weight: 800;
  font-size: 20px;
}

.logo-subtitle {
  color: #64748b;
  font-size: 14px;
}

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

.user-pill {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.sidebar,
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
}

.sidebar {
  padding: 18px;
  height: fit-content;
}

.sidebar h2 {
  margin-top: 0;
  font-size: 14px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-btn,
.sidebar-link {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  margin-bottom: 10px;
}

.customer-btn.active,
.sidebar-link.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.sidebar-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.main-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.main-title-row h2 {
  margin: 0;
  font-size: 28px;
}

.main-title-row p {
  margin: 4px 0 0;
  color: #64748b;
}

.search-row {
  display: flex;
  gap: 10px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 20px;
}

.project-card {
  transition: 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0 0 6px;
}

.muted {
  color: #64748b;
}

.path-info {
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px;
  overflow-wrap: anywhere;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-waiting {
  background: #fef3c7;
  color: #92400e;
}

.status-planning {
  background: #e5e7eb;
  color: #374151;
}

.status-done {
  background: #d1fae5;
  color: #065f46;
}

.progress-wrap {
  margin: 16px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 7px;
}

.progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress div {
  height: 100%;
  background: #111827;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 14px;
}

.project-page,
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.project-detail-grid,
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  margin-top: 18px;
}

.detail-title {
  font-size: 32px;
  margin: 4px 0 12px;
}

.history-item {
  border-left: 2px solid #e5e7eb;
  padding-left: 16px;
  margin-bottom: 18px;
  position: relative;
}

.history-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px;
  height: 12px;
  background: #111827;
  border-radius: 50%;
}

.history-item h4 {
  margin: 4px 0;
}

.photo {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 14px;
}

.photo img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  background: #e5e7eb;
}

.photo figcaption {
  padding: 12px;
  font-weight: 700;
}

.photo .photo-path {
  padding: 0 12px 12px;
  font-size: 12px;
  color: #64748b;
  overflow-wrap: anywhere;
}

.admin-box {
  margin-bottom: 18px;
}

.admin-box input,
.admin-box textarea,
.admin-box select {
  margin-bottom: 10px;
}

.customer-note {
  font-size: 13px;
  color: #64748b;
}

.table-wrap {
  overflow-x: auto;
}

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

.user-table th,
.user-table td {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px;
  vertical-align: top;
}

.user-table th {
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 850px) {
  .layout,
  .project-detail-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .main-title-row,
  .header-inner,
  .user-area {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row {
    flex-direction: column;
  }
}
