/* 
   CABINET.CSS
   Styles specific to the client and admin dashboards (Cabinet)
*/

:root {
  --db-sidebar-width: 380px;
}

body {
  font-family: "Manrope", sans-serif;
}

h1, h2, h3, h4 {
  font-family: "Onest", sans-serif;
}

.dashboard-hero {
  padding: 60px 0 40px;
  text-align: left;
}

.dashboard-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 8px;
}

.dashboard-hero p {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 500;
}

.dashboard-container {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 80px;
}

/* Left Side: Intake */
.intake-section {
  flex: 1;
}

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

.section-header h2 {
  font-size: 24px;
  font-weight: 800;
}

.progress-info {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-emerald);
  background: rgba(46, 139, 87, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
}

.intake-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.intake-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 32px;
  border-radius: 32px;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.intake-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  border-color: var(--color-emerald);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(46, 139, 87, 0.08);
  color: var(--color-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.status-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
}

.status-pending {
  background: rgba(0,0,0,0.05);
  color: var(--text-secondary);
}

.status-done {
  background: var(--color-emerald);
  color: white;
}

.intake-card h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.intake-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Sidebar: Deliverables */
.deliverables-sidebar {
  width: var(--db-sidebar-width);
  position: sticky;
  top: 100px;
}

.vault-card {
  padding: 40px;
  border-radius: 40px;
  background: var(--color-dark);
  color: white;
  box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

.vault-card h2 {
  font-size: 28px;
  margin-bottom: 8px;
  color: white;
}

.vault-card p.subtitle {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 32px;
  font-size: 15px;
}

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

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-emerald);
  transform: scale(1.02);
}

.file-icon {
  width: 44px;
  height: 44px;
  background: rgba(46, 139, 87, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-emerald);
}

.file-info {
  flex: 1;
}

.file-info .name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.file-info .meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  text-transform: uppercase;
}

.download-icon {
  color: rgba(255, 255, 255, 0.3);
  font-size: 20px;
}

/* Privacy Banner */
.privacy-box {
  margin-top: 32px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.privacy-box .icon {
  color: var(--color-emerald);
  font-size: 24px;
}

.privacy-box p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 1100px) {
  .dashboard-container {
    flex-direction: column;
  }
  .deliverables-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 768px) {
  .intake-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero h1 {
    font-size: 32px !important;
  }
  .vault-card {
    padding: 32px 24px;
  }
}

/* --- STATE INTAKE FORM (MODAL) STYLES --- */
.intake-step {
  display: none;
  padding: 32px;
}
.intake-step.active {
  display: block;
  animation: fadeInStep 0.4s ease forwards;
}

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

.range-slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-emerald);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-value {
  font-weight: 700;
  font-size: 18px;
  color: var(--color-emerald);
  min-width: 32px;
  text-align: center;
}

.conditional-field {
  display: none;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--color-emerald);
}

.conditional-field.active {
  display: block;
  animation: fadeInStep 0.3s ease;
}

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

/* Updated check and radio tiles */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.option-tile {
  display: block;
  position: relative;
  cursor: pointer;
}

.option-tile input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.option-tile-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  height: 100%;
}

.option-tile:hover .option-tile-content {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0,0,0,0.2);
}

.option-tile input:checked ~ .option-tile-content {
  background: var(--color-emerald);
  color: white;
  border-color: var(--color-emerald);
  box-shadow: 0 4px 12px rgba(46, 139, 87, 0.2);
}

/* Time input styling */
input[type="time"].form-input {
  font-family: inherit;
}

/* =================================================================
   DOSHA TEST — REDESIGNED
   Palette: matte/tactile, aligned with site's "Our Services" block
   Vата: sage green   #8B9E8A
   Питта: terracotta  #B07B63
   Капха: steel blue  #7A9BB5
================================================================= */

/* --- Modal container/scrolling --- */
#doshaStepContainer {
    overflow-y: auto;
    max-height: calc(85dvh - 80px);
    padding: 0 4px 12px;
    scroll-behavior: smooth;
}

/* --- Block header inside modal --- */
.dosha-modal-header {
    padding: 32px 32px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 8px;
}

.dosha-block-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-emerald);
    background: rgba(46,139,87,0.08);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.dosha-block-badge .iconify { font-size: 14px; }

.dosha-modal-header .modal-unified-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.dosha-block-hint {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    gap: 12px;
}

.dosha-count-hint {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-emerald);
    background: rgba(46,139,87,0.1);
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

/* --- Question list and items --- */
.dosha-questions-list {
    padding: 0 32px;
}

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

.dosha-question-item {
    margin-bottom: 28px;
    animation: doshaQuestionIn 0.35s ease both;
    border-radius: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dosha-question-item.dosha-question-error {
    border-color: rgba(176, 123, 99, 0.5);
    box-shadow: 0 0 0 3px rgba(176, 123, 99, 0.12);
    animation: doshaShake 0.4s ease;
}

@keyframes doshaShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

.dosha-question-text {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--color-dark);
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.dosha-q-num {
    min-width: 24px;
    height: 24px;
    background: rgba(46,139,87,0.1);
    color: var(--color-emerald);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
}

/* --- Options grid (3 columns) --- */
.dosha-options-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* --- Option tile (matte, tactile) --- */
.dosha-option-tile {
    cursor: pointer;
    display: block;
}

.dosha-option-tile input { display: none; }

.dosha-option-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 14px;
    background: rgba(246, 244, 239, 0.8);   /* warm off-white matte */
    border: 1.5px solid rgba(0,0,0,0.07);
    transition: all 0.22s cubic-bezier(0.2,1,0.3,1);
    height: 100%;
}

.dosha-option-tile:hover .dosha-option-inner {
    background: rgba(240, 238, 232, 0.95);
    border-color: rgba(46,139,87,0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.dosha-option-tile.selected .dosha-option-inner {
    background: rgba(46,139,87,0.1);
    border-color: var(--color-emerald);
    box-shadow: 0 4px 12px rgba(46,139,87,0.15);
}

.dosha-dosha-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(0,0,0,0.25);
    transition: color 0.22s ease;
}

.dosha-option-tile.selected .dosha-dosha-label { color: var(--color-emerald); }

.dosha-opt-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-dark);
    line-height: 1.4;
}

/* --- Navigation buttons --- */
.dosha-nav-actions {
    display: flex;
    gap: 12px;
    padding: 20px 32px 28px;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 8px;
    justify-content: space-between;
}

.dosha-next-btn { flex: 1; max-width: 260px; }

/* =================================================================
   DOSHA RESULTS PAGE
================================================================= */

@keyframes doshaResultIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.dosha-result-wrap {
    padding: 32px 32px 28px;
    animation: doshaResultIn 0.4s cubic-bezier(0.2,1,0.3,1) both;
}

.dosha-result-header {
    text-align: center;
    margin-bottom: 36px;
}

.dosha-result-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.6;
    letter-spacing: -2px;
}

.dosha-result-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 12px;
    font-family: 'Onest', sans-serif;
}

.dosha-constitution-badge {
    display: inline-block;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-emerald);
    background: rgba(46,139,87,0.08);
    border: 1px solid rgba(46,139,87,0.2);
    padding: 8px 24px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.dosha-result-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 0;
}

/* --- Result bars (matte palette) --- */
.dosha-result-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 480px;
    margin: 0 auto 32px;
}

.dosha-result-bar-row { display: flex; flex-direction: column; gap: 8px; }

.dosha-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dosha-bar-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.dosha-bar-name.vata  { color: #7A9569; }   /* matte sage */
.dosha-bar-name.pitta { color: #B07B63; }   /* matte terracotta */
.dosha-bar-name.kapha { color: #6B8FAD; }   /* matte steel blue */

.dosha-bar-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.dosha-bar-track {
    height: 10px;
    background: rgba(0,0,0,0.06);
    border-radius: 5px;
    overflow: hidden;
}

.dosha-bar-fill {
    height: 100%;
    border-radius: 5px;
    width: 0;
    transition: width 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.vata-fill  { background: linear-gradient(90deg, #93a682, #7A9569); }
.pitta-fill { background: linear-gradient(90deg, #c4917a, #B07B63); }
.kapha-fill { background: linear-gradient(90deg, #83a4c0, #6B8FAD); }

/* --- Note & watermark --- */
.dosha-result-note {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    background: rgba(246, 244, 239, 0.8);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 12px;
    text-align: center;
}

.dosha-result-watermark {
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.15);
    margin-bottom: 28px;
}

.dosha-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.dosha-result-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =================================================================
   MOBILE — Dosha Test
================================================================= */
@media (max-width: 768px) {
    .dosha-modal-header {
        padding: 20px 20px 12px;
    }

    .dosha-questions-list {
        padding: 0 16px;
    }

    .dosha-question-item {
        padding: 16px;
        margin-bottom: 20px;
    }

    .dosha-options-3 {
        grid-template-columns: 1fr;
    }

    .dosha-option-inner {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
    }

    .dosha-dosha-label {
        min-width: 20px;
        text-align: center;
    }

    .dosha-nav-actions {
        padding: 16px 20px 24px;
        flex-wrap: wrap;
    }

    .dosha-next-btn { max-width: 100%; flex: 1 1 100%; order: -1; }

    .dosha-result-wrap { padding: 24px 20px 24px; }

    .dosha-result-title { font-size: 22px; }

    .dosha-result-bars { max-width: 100%; }

    .dosha-result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dosha-result-actions .btn { justify-content: center; }
}

@media (max-width: 480px) {
    .dosha-block-hint {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .dosha-modal-header .modal-unified-title { font-size: 18px; }

    .dosha-bar-track { height: 12px; }
}

/* Keep old option-tile styles intact for state form */
.dosha-question-item { margin-bottom: 28px; }

