/*
 * styles.css
 * 全画面共通のスタイルシート
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background-color: #f0f0f0;
  color: #333;
  font-size: 14px;
}

/* ログイン画面 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-color: #f5d5dd;
}

.login-box {
  background: white;
  padding: 50px 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 450px;
}

.login-box h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
  letter-spacing: 2px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #8bb88f;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background-color: #8bb88f;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
}

.btn-login:hover {
  background-color: #7aa67e;
}

/* メイン画面レイアウト */
.main-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* サイドバー */
.sidebar {
  width: 250px;
  background-color: #ffffff;
  color: #333;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 102;
}

.sidebar.hidden {
  transform: translateX(-250px);
}

.sidebar-header {
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  background-color: #e0e0e0;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid #ccc;
  color: #333;
  flex-shrink: 0;
}

.sidebar-menu {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
}

.menu-item:hover {
  background-color: #e8e8e8;
  color: #333;
}

.menu-item.active {
  background-color: #d5e8d6;
  color: #333;
  border-left-color: #8bb88f;
}

.menu-item .icon {
  display: inline-block;
  width: 28px;
  text-align: center;
  margin-right: 15px;
  font-size: 22px;
  color: #000;
  font-weight: 900;
  line-height: 1;
}

.menu-item.message {
  position: relative;
}

.message-badge {
  position: absolute;
  right: 20px;
  width: 8px;
  height: 8px;
  background-color: #e74c3c;
  border-radius: 50%;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #ccc;
}

.btn-logout {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
  background-color: transparent;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  justify-content: flex-start;
  font-weight: 600;
}

.btn-logout:hover {
  background-color: #e8e8e8;
  color: #333;
}

.btn-logout .icon {
  color: #000;
  font-size: 22px;
  font-weight: 900;
  width: 28px;
  display: inline-block;
  text-align: center;
  line-height: 1;
}

/* メインコンテンツ */
.main-content {
  flex: 1;
  background-color: #f0f0f0;
  overflow-y: auto;
  margin-left: 250px;
  transition: margin-left 0.3s ease;
  width: 100%;
}

.main-content.expanded {
  margin-left: 0;
}

/* トップバー */
.top-bar {
  display: flex;
  height: 60px;
  position: relative;
}

.top-bar-left {
  width: auto;
  background-color: transparent;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  position: fixed;
  left: 250px;
  height: 60px;
  z-index: 103;
  padding-left: 20px;
}

.top-bar-left.collapsed {
  left: 0;
  padding-left: 20px;
}

.top-bar-right {
  flex: 1;
  background-color: #000;
  margin-left: 250px;
  transition: margin-left 0.3s ease;
}

.top-bar-right.expanded {
  margin-left: 80px;
}

/* MENUボタン */
.menu-toggle {
  background-color: #000000;
  color: #ffffff;
  border: 1px solid #666;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-icon span {
  width: 22px;
  height: 2px;
  background-color: #ffffff;
  display: block;
}

.menu-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #ffffff;
}

.content-area {
  padding: 30px 40px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.content-header h2 {
  font-size: 28px;
  font-weight: 600;
}

.btn-add {
  background-color: #e85d5d;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-add:hover {
  background-color: #d64d4d;
}

/* 検索エリア */
.search-area {
  background-color: #8bb88f;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  cursor: pointer;
}

.search-area span {
  font-weight: 500;
}

/* テーブル */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table thead {
  background-color: #f8f8f8;
  border-bottom: 2px solid #e0e0e0;
}

.data-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #555;
}

.data-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.data-table tbody tr:hover {
  background-color: #fafafa;
}

.data-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  margin: 2px;
}

.badge-blue {
  background-color: #5b9bd5;
  color: white;
}

.badge-orange {
  background-color: #ff9f43;
  color: white;
}

.badge-gray {
  background-color: #9e9e9e;
  color: white;
}

.badge-purple {
  background-color: #b67fb4;
  color: white;
}

.badge-green {
  background-color: #8bb88f;
  color: white;
}

/* 詳細画面 */
.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.btn-back {
  background: white;
  border: 2px solid #ddd;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: #666;
}

.btn-back:hover {
  background-color: #f5f5f5;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.detail-title h2 {
  font-size: 26px;
  font-weight: 600;
}

.status-tag {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 13px;
}

.detail-info {
  color: #888;
  font-size: 13px;
  margin-top: 10px;
}

.detail-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.detail-section {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 25px;
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.btn-edit {
  background: none;
  border: 1px solid #8bb88f;
  color: #8bb88f;
  padding: 6px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-edit:hover {
  background-color: #8bb88f;
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-field {
  margin-bottom: 15px;
}

.detail-field label {
  display: block;
  color: #888;
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-field .value {
  background-color: white;
  padding: 12px 15px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  min-height: 40px;
}

.order-item {
  background-color: white;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.order-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-item-title {
  font-weight: 600;
  font-size: 14px;
}

.order-item-price {
  font-weight: 600;
  color: #333;
}

.order-item-details {
  font-size: 13px;
  color: #666;
}

/* クライアント管理 */
.client-search {
  background-color: #f8f8f8;
  padding: 25px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.client-search h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #8bb88f;
}

.search-form {
  display: grid;
  gap: 15px;
}

.search-field {
  margin-bottom: 10px;
}

.search-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 13px;
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.search-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-search {
  flex: 1;
  padding: 12px;
  background-color: #8bb88f;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.btn-search:hover {
  background-color: #7aa67e;
}

.btn-clear {
  flex: 1;
  padding: 12px;
  background-color: #e0e0e0;
  color: #666;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.btn-clear:hover {
  background-color: #d0d0d0;
}

/* メモエリア */
.memo-section {
  background-color: #f0f8f0;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #d0e8d0;
}

.memo-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.memo-content {
  background-color: white;
  padding: 15px;
  border-radius: 4px;
  min-height: 100px;
  border: 1px solid #e0e0e0;
}

/* その他操作 */
.other-actions {
  color: #8bb88f;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  margin-top: 10px;
}

.other-actions:hover {
  text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-250px);
  }
  
  .sidebar.visible {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .top-bar-left {
    left: 0;
  }
  
  .top-bar-right {
    margin-left: 80px;
  }
  
  .detail-content {
    grid-template-columns: 1fr;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
}