/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f5f5f5;
}

/* Login Screen Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #00b900 0%, #008f00 100%);
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
}

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

.login-logo {
  height: 60px;
  width: auto;
  margin-bottom: 8px;
}

.login-logo-text {
  font-size: 48px;
  font-weight: bold;
  color: #555;
  margin: 0 0 8px 0;
  letter-spacing: 2px;
}

.login-header p {
  color: #666;
  font-size: 16px;
}

.login-form {
  margin-bottom: 30px;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #f5c6cb;
}

.login-btn {
  width: 100%;
  background-color: #00b900;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn:hover:not(:disabled) {
  background-color: #009900;
  transform: translateY(-1px);
}

.login-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

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

.forgot-link {
  color: #00b900;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #009900;
  text-decoration: underline;
}

.demo-info {
  margin-top: 30px;
  padding: 15px;
  background-color: #e8f5e8;
  border-radius: 6px;
  border: 1px solid #b8e6b8;
}

.demo-info h4 {
  color: #00b900;
  margin-bottom: 8px;
  font-size: 14px;
}

.demo-info p {
  margin: 4px 0;
  font-size: 13px;
  color: #666;
  font-family: monospace;
}

/* Main App Layout */
.app {
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main";
  grid-template-columns: 250px 1fr;
  grid-template-rows: 60px 1fr;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.app-header {
  grid-area: header;
  background-color: #00b900;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-left: auto;
  gap: 16px;
}

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

.header-logo-text {
  font-size: 28px;
  font-weight: bold;
  color: white;
  margin: 0;
  letter-spacing: 2px;
}

.header-account-selector {
  margin-left: auto;
}

.header-account-selector .account-select {
  min-width: 200px;
  padding: 8px 32px 8px 12px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  background-repeat: no-repeat;
  background-position: right 10px center;
  appearance: none;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar {
  grid-area: sidebar;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.nav-menu {
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 25px;
  border: none;
  background: none;
  text-align: left;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
}

.nav-item:hover {
  background-color: #f8f9fa;
  color: #00b900;
}

.nav-item:hover .nav-icon {
  color: #00b900;
}

.nav-item.active {
  background-color: #e8f5e8;
  color: #00b900;
  border-left-color: #00b900;
  font-weight: 500;
}

.nav-item.active .nav-icon {
  color: #00b900;
}

.main-content {
  grid-area: main;
  padding: 30px;
  overflow-y: auto;
}

/* Common Styles */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-title {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
  font-weight: 600;
}

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

.header-actions {
  display: flex;
  gap: 15px;
}

.step-page-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.card-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: #00b900;
  color: white;
}

.btn-primary:hover {
  background-color: #009900;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-outline {
  background-color: transparent;
  color: #00b900;
  border: 1px solid #00b900;
}

.btn-outline:hover {
  background-color: #00b900;
  color: white;
}

.btn-outline:disabled {
  background-color: transparent;
  color: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
}

.btn-large {
  padding: 15px 40px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Broadcast Status Toggle */
.broadcast-status-toggle {
  display: flex;
  gap: 0;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.broadcast-status-btn {
  padding: 10px 20px;
  border: none;
  background: white;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid #e0e0e0;
}

.broadcast-status-btn:last-child {
  border-right: none;
}

.broadcast-status-btn:hover {
  background: #f8f9fa;
}

.broadcast-status-btn.active {
  background: #00b900;
  color: white;
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.2s ease;
  background-color: #fff;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

.form-input:disabled {
  background-color: #f8f9fa;
  opacity: 0.7;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.2;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  margin: 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  margin: 0;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

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

.table th {
  background-color: #f8f9fa;
  color: #333;
  font-weight: 600;
}

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

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

/* Status Badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

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

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
}

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

.status-pending {
  background-color: #f0f0f0;
  color: #666;
}

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

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: #00b900;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 14px;
}

.stat-trend {
  color: #00b900;
  font-size: 14px;
  font-weight: 500;
  margin-top: 5px;
}

/* Dashboard Specific */
.dashboard-account-selector {
  margin-bottom: 30px;
}

.account-selector-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-label {
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.account-select {
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: #333;
  border: 2px solid #e1e5e9;
  padding: 12px 40px 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  appearance: none;
  min-width: 250px;
  font-weight: 500;
}

.account-select:hover {
  border-color: #00b900;
  background-color: #f8f9fa;
}

.account-select:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.action-btn:hover {
  border-color: #00b900;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 185, 0, 0.15);
}

.action-icon {
  font-size: 24px;
  color: #00b900;
}

.action-text h3 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 16px;
}

.action-text p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

/* Broadcast Form */
.broadcast-form {
  max-width: 800px;
}

.broadcast-section {
  margin-bottom: 32px;
}

.broadcast-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #00b900;
  margin-bottom: 12px;
  padding-left: 16px;
  border-left: 4px solid #00b900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.broadcast-section .card {
  border-left: 3px solid #b8e6b8;
  margin-bottom: 0;
}

.form-actions {
  margin-top: 40px;
  text-align: center;
}

/* Settings Page Actions */
.settings-actions {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: flex-start;
}

#settings-save-cancel-group {
  display: flex;
  gap: 10px;
}

/* Step Delivery */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

/* Scenario Detail Page */
.scenario-detail-content {
  max-width: 900px;
}

.scenario-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #666;
  min-width: 100px;
}

.info-value {
  color: #333;
  font-size: 16px;
}

.info-value-editable {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.info-value-editable .info-value {
  flex: 1;
}

.info-value-editable .btn-icon {
  opacity: 0.6;
  transition: opacity 0.2s;
}

.info-value-editable:hover .btn-icon {
  opacity: 1;
}

.card-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header-with-action .card-title {
  margin-bottom: 0;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #00b900;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.step-item:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 185, 0, 0.1);
}

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

.step-number {
  font-size: 14px;
  font-weight: 600;
  color: #00b900;
}

.step-timing-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.step-message {
  color: #333;
  line-height: 1.6;
  padding: 12px;
  background: white;
  border-radius: 6px;
  white-space: pre-wrap;
}

.step-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.step-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.step-messages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-message-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s;
}

.step-message-item:hover {
  border-color: #00b900;
  box-shadow: 0 2px 4px rgba(0, 185, 0, 0.1);
}

.step-message-content {
  flex: 1;
  color: #333;
  line-height: 1.2;
  white-space: pre-wrap;
  word-break: break-word;
}

.step-message-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.scenario-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

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

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

.scenario-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.scenario-description {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

.scenario-stats {
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.stat-label {
  color: #666;
}

.stat-value {
  color: #333;
  font-weight: 500;
}

.scenario-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Individual Support - 3 Column Layout */
#individual-page {
  max-width: none !important;
}

#individual-page .main-content {
  padding-left: 0;
  padding-right: 0;
}

.individual-layout {
  display: grid;
  grid-template-columns: 280px 2fr 280px;
  gap: 10px;
  height: calc(100vh - 100px);
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.individual-left-column {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.individual-center-column {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.individual-right-column {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0;
}

.user-info-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  padding: 20px 24px;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.friends-header {
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.friends-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.search-filters {
  display: flex;
  gap: 15px;
  flex: 1;
}

.search-box {
  flex: 1;
  max-width: 300px;
}

.friends-count {
  color: #666;
  font-size: 13px;
  padding: 0 4px;
}

.filter-select-container {
  margin: 8px 0;
}

.filter-select-container .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.filter-select-container .form-select:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

.friends-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
  cursor: pointer;
}

.friend-item:hover {
  background-color: #f8f9fa;
}

.friend-item.selected {
  background-color: #e8f5e9;
}

.friend-item:last-child {
  border-bottom: none;
}

.friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00b900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

.friend-info {
  flex: 1;
  min-width: 0;
  padding-right: 40px;
}

.friend-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.friend-bookmark-icon {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 12px;
  color: #00b900;
  transition: all 0.2s;
}

.unread-badge {
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.friend-id {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.last-message {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friend-time {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #999;
  font-size: 10px;
  text-align: center;
}

.message-text {
  color: #222222;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.message-preview {
  color: #666;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.message-time {
  color: #999;
  font-size: 12px;
  flex-shrink: 0;
}

.friend-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* User Info Panel (Right Column) */
/* Tab Navigation */
.right-column-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  background: white;
  border-radius: 8px 8px 0 0;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
  color: #333;
  background: #f8f9fa;
}

.tab-btn.active {
  color: #00b900;
  border-bottom-color: #00b900;
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-text {
  font-size: 14px;
  line-height: 1;
}

/* Tab Content */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.user-info-header {
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
  background: white;
}

.user-info-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.user-info-content {
  overflow-y: auto;
  flex: 1;
  padding: 24px;
}

.user-info-content .empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  text-align: center;
  padding: 40px 20px;
}

.user-info-item {
  margin-bottom: 20px;
}

.user-info-label {
  font-size: 12px;
  color: #000;
  margin-bottom: 6px;
  font-weight: 700;
}

.user-info-value {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

.user-info-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #00b900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin: 0 auto 20px;
}

.user-info-divider {
  border-top: 1px solid #e0e0e0;
  margin: 20px 0;
}

.user-info-memo {
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  min-height: 40px;
  transition: all 0.2s;
  white-space: pre-line;
  line-height: 1.2;
  display: flex;
  align-items: flex-start;
}

.user-info-memo:hover {
  background: #e8f5e9;
  border-color: #00b900;
}

/* Empty State */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  text-align: center;
  padding: 40px 20px;
}

.empty-state p {
  margin: 0;
  line-height: 1.6;
}

.empty-state-small {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.empty-state-small p {
  margin: 0;
}

/* Tags Tab */
.tags-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.tags-section {
  margin-bottom: 32px;
}

.tags-section:last-child {
  margin-bottom: 0;
}

.section-title {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.folder-list,
.tag-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-item,
.tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.folder-item:hover,
.tag-item:hover {
  background: #f8f9fa;
  border-color: #00b900;
}

.folder-icon,
.tag-icon {
  font-size: 18px;
}

.folder-name,
.tag-name {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.folder-count,
.tag-count {
  font-size: 12px;
  color: #999;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Data Management Page */
.data-management-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.data-management-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0;
}

.data-tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.data-tab-btn:hover {
  color: #00b900;
  background: #f8f9fa;
}

.data-tab-btn.active {
  color: #00b900;
  border-bottom-color: #00b900;
}

.data-management-content {
  flex: 1;
}

.data-tab-content {
  display: none;
}

.data-tab-content.active {
  display: block;
}

/* Tag Management */
.tag-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

/* Color Palette */
.color-palette-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
}

/* Color Picker */
.color-picker-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.color-picker-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.color-picker-input {
  width: 60px;
  height: 44px;
  border: 3px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 2px;
}

.color-picker-input:hover {
  border-color: #00b900;
  transform: scale(1.05);
}

.color-picker-input:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

.color-option {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
  border-color: #00b900;
  border-width: 3px;
  box-shadow: 0 0 0 2px #00b900, 0 4px 12px rgba(0, 185, 0, 0.3);
  transform: scale(1.1);
  position: relative;
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #00b900;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-option.transparent {
  background-color: white;
  border: 3px solid #e0e0e0;
  background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
                    linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
}

.color-option.transparent i {
  color: #999;
  font-size: 20px;
}

.color-option.transparent.selected {
  border-color: #00b900;
  border-width: 3px;
  box-shadow: 0 0 0 2px #00b900, 0 4px 12px rgba(0, 185, 0, 0.3);
}

.color-option.transparent.selected i {
  color: #00b900;
}

.color-option.transparent.selected::after {
  display: none;
}


.tag-management-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tag-management-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s;
}

.tag-management-item:hover {
  background: white;
  border-color: #00b900;
  box-shadow: 0 2px 4px rgba(0, 185, 0, 0.1);
}

.tag-badge {
  display: inline-block;
  padding: 6px 14px;
  color: white;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
}

.tag-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  padding: 6px 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f8f9fa;
  border-color: #00b900;
  transform: translateY(-1px);
}

/* URL Management */
.url-management-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.url-management-item {
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s;
}

.url-management-item:hover {
  background: white;
  border-color: #00b900;
  box-shadow: 0 2px 4px rgba(0, 185, 0, 0.1);
}

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

.url-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.url-actions {
  display: flex;
  gap: 8px;
}

.url-link {
  margin-bottom: 8px;
}

.url-link a {
  color: #00b900;
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}

.url-link a:hover {
  text-decoration: underline;
}

.url-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.url-created-at {
  color: #999;
  font-size: 12px;
}

.url-info-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.url-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.url-info-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.url-info-value a {
  color: #00b900;
  text-decoration: none;
  word-break: break-all;
  flex: 1;
}

.url-info-value a:hover {
  text-decoration: underline;
}

.short-url-text {
  color: #00b900;
  font-weight: 500;
  flex: 1;
}

/* Step Delivery List */
.step-delivery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-delivery-item {
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
}

/* Friend List Management */
.friend-list-search-container {
  margin-bottom: 20px;
}

.friend-list-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

  /* Search Form (Friend page) */
  .search {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
  }

  .search-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
  }

  .search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .search-field label {
    color: #333;
    font-size: 14px;
    font-weight: 500;
  }

  .search-field input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #f5f5f5;
    transition: all 0.2s ease;
    outline: none;
  }

  .search-field input:hover {
    border-color: #b0b0b0;
    background: #fafafa;
  }

  .search-field input:focus {
    border-color: #00b900;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
  }

  @media (max-width: 640px) {
    .search-group {
      flex-direction: column;
      align-items: stretch;
    }
  }

.friend-list-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.friend-list-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #e0e0e0;
}

.friend-list-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.friend-list-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #666;
}

.friend-list-row:hover {
  background: #f8f9fa;
}

.friend-list-row:last-child td {
  border-bottom: none;
}

.friend-list-name {
  font-weight: 600;
  color: #333;
}

.friend-list-uuid {
  font-family: monospace;
  font-size: 13px;
  color: #666;
}

.friend-list-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.friend-list-tags .tag-badge {
  font-size: 12px;
  padding: 4px 10px;
}

.friend-list-date {
  color: #999;
  font-size: 13px;
}

/* Tag Selection in Individual Chat */
.tag-selection-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tag-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}

.tag-checkbox-item:hover {
  opacity: 0.8;
}

.tag-checkbox-item input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.tag-checkbox-item .tag-badge {
  flex: 1;
  font-size: 13px;
}

.tags-save-button-container {
  margin-top: 16px;
  text-align: right;
}

.tags-save-button-container .btn {
  min-width: 120px;
  transition: background-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .individual-layout {
    grid-template-columns: 280px 1fr 0;
    gap: 8px;
  }

  .individual-right-column {
    display: none;
  }
}

@media (max-width: 768px) {
  .app {
    grid-template-areas:
      "header"
      "main";
    grid-template-columns: 1fr;
    grid-template-rows: 60px 1fr;
  }

  .sidebar {
    display: none;
  }

  .individual-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 50% 50%;
    gap: 8px;
  }

  .individual-left-column {
    border-radius: 8px 8px 0 0;
  }

  .individual-center-column {
    border-radius: 0 0 8px 8px;
  }

  .individual-right-column {
    display: none;
  }

  #individual-page .main-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .quick-actions {
    grid-template-columns: 1fr;
  }

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

  .friends-header {
    flex-direction: column;
    align-items: stretch;
  }

  .friend-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .friend-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  /* Chat Modal Mobile Styles */
  .chat-modal-content {
    width: 95%;
    height: 85vh;
    margin: 20px;
  }

  .chat-header {
    padding: 15px;
  }

  .chat-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .chat-user-name {
    font-size: 16px;
  }

  .chat-user-id {
    font-size: 12px;
  }

  .chat-messages {
    padding: 15px;
    gap: 12px;
  }

  .message {
    max-width: 85%;
  }

  .chat-input-area {
    padding: 15px;
  }
}

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

.chat-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  height: 80vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Center Column Chat Header */
.individual-center-column .chat-header {
  padding: 5px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #00b900;
  color: white;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #00b900;
  color: white;
  border-radius: 12px 12px 0 0;
}

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

.chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}

.chat-user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-user-name {
  font-size: 18px;
  font-weight: 600;
}

.chat-user-id {
  font-size: 14px;
  opacity: 0.8;
}

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

.bookmark-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.bookmark-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.bookmark-btn.bookmarked .bookmark-icon {
  animation: bookmark-pop 0.3s ease;
  color: white;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

@keyframes bookmark-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Broadcast Tag Selection */
.tag-selection-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tag-selection-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 80px;
}

.broadcast-tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.broadcast-tag-item:hover {
  opacity: 0.8;
}

.broadcast-tag-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.broadcast-tag-item input[type="checkbox"]:checked + .tag-badge {
  background: #06c755;
  color: white;
}

.broadcast-tag-item .tag-user-count {
  font-size: 13px;
  color: #666;
  margin-left: 4px;
}

.tag-selection-count {
  padding: 12px 16px;
  background: #e8f5e9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2e7d32;
}

#tagged-friends-count {
  font-size: 18px;
  color: #06c755;
}

/* Delivery Timing Settings */
.datetime-inputs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.datetime-inputs input[type="date"],
.datetime-inputs input[type="time"],
input[type="datetime-local"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.datetime-inputs input[type="date"]:focus,
.datetime-inputs input[type="time"]:focus,
input[type="datetime-local"]:focus {
  outline: none;
  border-color: #06c755;
  box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.1);
}

.chat-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Center Column Chat Messages */
.individual-center-column .chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #ffffff;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  max-width: 70%;
}

.message-received {
  align-self: flex-start;
}

.message-sent {
  align-self: flex-end;
}

.message-content {
  background: #f0f0f0;
  border-radius: 18px;
  padding: 12px 16px;
  position: relative;
}

.message-sent .message-content {
  background: #f8f8f8;
  color: #333;
}

.message-text {
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 4px;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  text-align: left;
}

.message-time {
  font-size: 12px;
  opacity: 0.7;
  text-align: right;
}

.message-received .message-time {
  color: #666;
}

.message-sent .message-time {
  color: rgba(0, 0, 0, 0.6);
}

/* Center Column Chat Input */
.individual-center-column .chat-input-area {
  border-top: 1px solid #e0e0e0;
  padding: 24px;
  background: white;
}

.chat-input-area {
  border-top: 1px solid #e0e0e0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 0 0 12px 12px;
}

/* Read Status Buttons */
.read-status-buttons {
  display: flex;
  align-self: flex-end;
}

.read-status-btn {
  padding: 10px 14px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  color: #00b900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.read-status-btn:hover {
  background: #f0f0f0;
  border-color: #00b900;
  transform: scale(1.05);
}

.read-status-btn.unread {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.read-status-btn.unread:hover {
  background: #fff5f5;
  border-color: #ff6b6b;
}

/* Unread Indicator */
.unread-indicator {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #ff0000;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.friend-item {
  position: relative;
}

.chat-input-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 12px 16px;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
  height: 44px;
  max-height: 200px;
  line-height: 20px;
  overflow-y: auto;
}

.chat-input:focus {
  border-color: #00b900;
}

.chat-send-btn {
  background: #00b900;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send-btn:hover {
  background: #008f00;
}

.chat-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

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

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #00b900;
  color: white;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}

.modal-body .card {
  margin-bottom: 20px;
}

.modal-body .card:last-child {
  margin-bottom: 0;
}

.modal-body .card-title {
  font-size: 16px;
  margin-bottom: 15px;
  color: #333;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  background: #f9f9f9;
}

.modal-footer .btn {
  min-width: 100px;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 85vh;
    margin: 20px;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-close-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Scenario Timing Input Styles */
.form-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.timing-inputs {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.timing-input-group {
  flex: 1;
  position: relative;
}

.input-suffix {
  color: #666;
  font-size: 14px;
  margin-left: 8px;
}

.timing-preview {
  background: #f8f9fa;
  padding: 12px 15px;
  border-radius: 6px;
  border-left: 4px solid #00b900;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.timing-preview span {
  color: #00b900;
  font-weight: 600;
}

/* Timing Preview with Inline Input */
.timing-preview-input {
  background: #f8f9fa;
  padding: 16px 20px;
  border-radius: 6px;
  border-left: 4px solid #00b900;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inline-number-input {
  width: 70px;
  padding: 6px 10px;
  border: 2px solid #00b900;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #00b900;
  background: white;
  transition: all 0.2s;
}

.inline-number-input:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

.inline-time-input {
  padding: 6px 10px;
  border: 2px solid #00b900;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #00b900;
  background: white;
  transition: all 0.2s;
}

.inline-time-input:focus {
  outline: none;
  border-color: #00b900;
  box-shadow: 0 0 0 3px rgba(0, 185, 0, 0.1);
}

/* Step timing modal specific width */
#step-timing-modal .modal-content {
  max-width: 750px;
}

/* Responsive styles for timing inputs */
@media (max-width: 768px) {
  .timing-inputs {
    flex-direction: column;
    gap: 15px;
  }
}

/* Friend Selection UI Styles */
.friend-selection-container {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
}

.friend-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 15px;
  gap: 15px;
}

.friend-selection-header .search-box {
  flex: 1;
  max-width: 300px;
}

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

.selected-count {
  background: #e8f5e8;
  color: #00b900;
  padding: 10px 15px;
  border-radius: 6px;
  border-left: 4px solid #00b900;
  font-weight: 500;
  margin-bottom: 15px;
}

.friends-selection-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
}

.friend-selection-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.friend-selection-item:hover {
  background-color: #f8f9fa;
}

.friend-selection-item:last-child {
  border-bottom: none;
}

.friend-selection-item.selected {
  background-color: #e8f5e8;
  border-left: 3px solid #00b900;
}

.friend-checkbox {
  margin-right: 12px;
  cursor: pointer;
}

.friend-selection-info {
  flex: 1;
  min-width: 0;
}

.friend-selection-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.friend-selection-id {
  color: #666;
  font-size: 14px;
}

.friend-selection-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #00b900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Responsive styles for friend selection */
@media (max-width: 768px) {
  .friend-selection-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .friend-selection-header .search-box {
    max-width: none;
  }

  .selection-actions {
    justify-content: flex-start;
  }

  .friend-selection-item {
    padding: 10px 12px;
  }

  .friend-selection-avatar {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* Broadcast Detail Page Styles */
.broadcast-detail-content {
  max-width: 900px;
}

/* Broadcast Preview Modal */
.modal-preview-size {
  max-width: 700px;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-info-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.preview-info-item:last-child {
  border-bottom: none;
}

.preview-info-label {
  font-weight: 600;
  color: #666;
  min-width: 120px;
  font-size: 14px;
}

.preview-info-value {
  color: #333;
  font-size: 14px;
  flex: 1;
}

.message-preview-container {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  min-height: 200px;
}

.message-preview-chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-preview-chat .message {
  display: flex;
  max-width: 80%;
  animation: fadeIn 0.3s ease;
}

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

.message-preview-chat .message-sent {
  align-self: flex-end;
}

.message-preview-chat .message-content {
  background: #f8f8f8;
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-preview-chat .message-text {
  font-size: 15px;
  line-height: 1.2;
  color: #333;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: left;
}

/* Responsive styles for broadcast preview */
@media (max-width: 768px) {
  .modal-preview-size {
    width: 95%;
    max-width: none;
  }

  .preview-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .preview-info-label {
    min-width: auto;
  }

  .message-preview-container {
    padding: 15px;
  }
}



/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination a {
  color: #525252;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.pagination a:hover:not(.disabled):not(.active) {
  background: rgba(82, 82, 82, 0.15);
}

.pagination a:focus {
  outline: 2px solid #525252;
  outline-offset: 2px;
}

.pagination .active {
  background: #525252;
  color: #fff;
  font-weight: 700;
}

.pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}



.preview-step-timing{
  margin-left: 10px;
}
.preview-step-messages{
  margin-left: 10px;
  margin-bottom: 15px;
}
.preview-step-messages li {
  list-style: none;
}

/* 一行省略表示（...） */
.one-line-ellipsis {
  display: inline-block;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* 選択中シナリオの配信対象を一行省略 */
#selected-scenario-target {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* 設定中バッジ（ミニ） */
.badge-default-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.badge-default-mini i {
  font-size: 11px;
}