/* ===== Mobile RSCA Prototype Styles ===== */

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #212121;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mobile-app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */

.header {
  background: #00838F;
  color: #fff;
  padding: 0 8px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.header-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}

.header-back:active {
  background: rgba(255,255,255,0.15);
}

.header-title {
  flex: 1;
  min-width: 0;
}

.header-title-main {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title-sub {
  font-size: 12px;
  opacity: 0.85;
}

.header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
}

.header-icon-btn:active {
  background: rgba(255,255,255,0.15);
}

/* ===== Tabs ===== */

.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 56px;
  z-index: 99;
  flex-shrink: 0;
}

.tab {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #757575;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tab.active {
  color: #00838F;
  border-bottom-color: #00838F;
}

.tab:active {
  background: #f5f5f5;
}

/* ===== Content ===== */

.content {
  flex: 1;
  padding: 16px;
  padding-bottom: 80px;
  overflow-y: auto;
}

/* ===== Section Cards ===== */

.section-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.section-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #212121;
  margin-bottom: 12px;
}

.section-card-desc {
  font-size: 13px;
  color: #757575;
  margin-bottom: 12px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn:active {
  opacity: 0.85;
}

.btn-primary {
  background: #00838F;
  color: #fff;
  width: 100%;
}

.btn-outline {
  background: #fff;
  color: #00838F;
  border: 1.5px solid #00838F;
  width: 100%;
}

.btn-outline:active {
  background: #E0F7FA;
}

/* ===== Bottom Fixed Button ===== */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  z-index: 100;
}

/* ===== Form Elements ===== */

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

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

.form-select {
  width: 100%;
  height: 48px;
  padding: 0 36px 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #212121;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23757575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center no-repeat;
  appearance: none;
  -webkit-appearance: none;
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #212121;
  background: #fff;
  resize: vertical;
  font-family: inherit;
}

.form-textarea::placeholder {
  color: #bdbdbd;
}

/* ===== RSCA Page ===== */

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn.active {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* Progress */
.progress-section {
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.progress-label {
  font-size: 13px;
  color: #757575;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.progress-count {
  font-weight: 600;
  color: #00838F;
}

.progress-track {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #00838F;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Question Cards */
.questions-list {
  padding: 16px;
  padding-bottom: 80px;
}

.question-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #E0F7FA;
  color: #00838F;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.question-text {
  font-size: 14px;
  font-weight: 600;
  color: #212121;
  margin-bottom: 14px;
  line-height: 1.45;
}

/* Radio Options */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.radio-option {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  gap: 12px;
}

.radio-option:active {
  background: #f5f5f5;
}

.radio-option.selected {
  border-color: #00838F;
  background: #E0F7FA;
}

.radio-circle {
  width: 22px;
  height: 22px;
  border: 2px solid #bdbdbd;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.radio-option.selected .radio-circle {
  border-color: #00838F;
}

.radio-circle::after {
  content: '';
  width: 12px;
  height: 12px;
  background: #00838F;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s;
}

.radio-option.selected .radio-circle::after {
  transform: scale(1);
}

.radio-label {
  font-size: 14px;
  color: #212121;
  flex: 1;
}

/* Comment Field inside question */
.question-comment {
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  color: #212121;
  background: #fafafa;
  resize: vertical;
  font-family: inherit;
  margin-top: 2px;
}

.question-comment::placeholder {
  color: #bdbdbd;
}

.comment-label {
  font-size: 12px;
  color: #9e9e9e;
  margin-bottom: 4px;
}

/* ===== Status badge ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.pending {
  background: #FFF3E0;
  color: #E65100;
}

.status-badge.done {
  background: #E8F5E9;
  color: #2E7D32;
}

/* ===== Object Tab Content ===== */
.info-list {
  padding: 0;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.info-label {
  font-size: 12px;
  color: #9e9e9e;
  margin-bottom: 2px;
}

.info-value {
  font-size: 14px;
  color: #212121;
}

/* ===== Section Headers (collapsible) ===== */

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #00838F;
  color: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.section-header:active {
  opacity: 0.9;
}

.section-header-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.section-header-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.section-chevron {
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 4L6.5 9L11.5 4' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") center no-repeat;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.section-chevron.open {
  transform: rotate(180deg);
}

/* ===== Checkbox variant ===== */

.check-box {
  width: 22px;
  height: 22px;
  border: 2px solid #bdbdbd;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #00838F;
  transition: border-color 0.2s, background 0.2s;
}

.checkbox-option.selected .check-box {
  border-color: #00838F;
  background: #E0F7FA;
}

/* ===== "Other" text input ===== */

.other-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 13px;
  color: #212121;
  background: #fafafa;
  font-family: inherit;
}

.other-input::placeholder {
  color: #bdbdbd;
}

/* ===== Mobile Tables ===== */

.mobile-table-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

.mobile-table-title {
  font-size: 13px;
  font-weight: 600;
  color: #212121;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.mobile-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: 12px;
}

table.mobile-table th {
  background: #f5f5f5;
  color: #757575;
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

table.mobile-table td {
  padding: 8px 10px;
  color: #212121;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

table.mobile-table tr:last-child td {
  border-bottom: none;
}

.mobile-table-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #9e9e9e;
}

/* ===== Act field cards ===== */

.field-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.field-card .info-item:first-child {
  padding-top: 0;
}

.field-card .info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ===== Utility ===== */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
