/* Control Vitals Style - Professional Dark Theme */
.resus-settings-panel {
    background: linear-gradient(145deg, #1a1a1a, #1e1e1e);
    color: #e0e0e0;
    padding: 2.5rem;
    border-radius: 16px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    width: 80%;
    margin: 2rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
}

/* ===== Added: Dynamic width for all screen sizes ===== */
@media (min-width: 1921px) {
    .resus-settings-panel {
        width: 70%;
        max-width: 1600px;
        padding: 3rem;
    }
}

@media (min-width: 1441px) and (max-width: 1920px) {
    .resus-settings-panel {
        width: 75%;
        max-width: 1400px;
        padding: 2.8rem;
    }
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .resus-settings-panel {
        width: 80%;
        max-width: 1200px;
        padding: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .resus-settings-panel {
        width: 90%;
        max-width: 900px;
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .resus-settings-panel {
        width: 95%;
        padding: 1.5rem;
        border-radius: 12px;
    }
}

/* Keep the top gradient bar */
.resus-settings-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F90618, #2E3192);
}

.resus-settings-title {
    color: #ffffff;
    margin: 0 0 2rem 0;
    font-size: clamp(1.5rem, 2vw, 1.8rem);
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    letter-spacing: -0.5px;
}

.resus-settings-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #F90618, #2E3192);
    border-radius: 1px;
}

.resus-template-selector {
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.resus-select-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #e0e0e0;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    letter-spacing: 0.3px;
}

.resus-template-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #252525;
    color: #ffffff;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.resus-template-select:focus {
    outline: none;
    border-color: #2E3192;
    box-shadow: 0 0 0 2px rgba(46, 49, 146, 0.1);
    background: #2a2a2a;
}

.resus-template-select:hover {
    border-color: #4a4a4a;
}

.resus-current-values {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.resus-values-title {
    color: #ffffff;
    margin: 0 0 1.25rem 0;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 500;
    text-align: center;
    position: relative;
    letter-spacing: 0.3px;
}

.resus-values-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, #F90618, #2E3192);
}

.resus-values-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
}

.resus-table-header th {
    text-align: left;
    color: #b0b0b0;
    font-weight: 500;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #333;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    letter-spacing: 0.3px;
}

.resus-values-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #2a2a2a;
}

.resus-values-table tr:last-child td {
    border-bottom: none;
}

.resus-values-table td:nth-child(1) {
    color: #e0e0e0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.resus-values-table td:nth-child(2) {
    color: #F90618;
    text-align: right;
    padding-right: 1rem;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}

.resus-values-table td:nth-child(3) {
    color: #2E3192;
    text-align: right;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
}

.resus-controls {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
}

.resus-slider-control {
    margin-bottom: 1.5rem;
    position: relative;
}

.resus-slider-control:last-child {
    margin-bottom: 0;
}

.resus-slider-control label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #e0e0e0;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    letter-spacing: 0.3px;
}

.resus-slider-container {
    width: 100%;
    position: relative;
    margin-bottom: 0.5rem;
}

.resus-slider {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #333, #444);
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resus-slider:hover {
    background: linear-gradient(90deg, #3a3a3a, #4a4a4a);
}

.resus-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #F90618, #2E3192);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.resus-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.resus-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #F90618, #2E3192);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.resus-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.resus-slider-value {
    display: inline-block;
    min-width: 45px;
    text-align: right;
    color: white;
    margin-left: auto;
    margin-right: 0%;
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    background: rgba(46, 49, 146, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(46, 49, 146, 0.2);
    letter-spacing: 0.3px;
}

.resus-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.resus-apply-btn,
.resus-reset-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    cursor: pointer;
    flex: 1;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.resus-apply-btn::before,
.resus-reset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.resus-apply-btn {
    background: linear-gradient(135deg, #2E3192, #25287a);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 49, 146, 0.2);
}

.resus-apply-btn:hover {
    background: linear-gradient(135deg, #25287a, #1e2166);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 49, 146, 0.3);
}

.resus-reset-btn {
    background: linear-gradient(135deg, #F90618, #d40514);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 6, 24, 0.2);
}

.resus-reset-btn:hover {
    background: linear-gradient(135deg, #d40514, #b80412);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 6, 24, 0.3);
}

.resus-apply-btn:hover::before,
.resus-reset-btn:hover::before {
    left: 100%;
}

.resus-apply-btn:active,
.resus-reset-btn:active {
    transform: translateY(0);
}

/* Ultra-wide Desktop Support (kept for backward comp) */
@media (min-width: 1921px) {
    .resus-settings-panel {
        width: 70%;
    }
}

/* ================================
   GRID LAYOUT FOR CONTROL PAGE
   ================================ */
.resus-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Left and Right Panels */
.resus-left-panel,
.resus-right-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Right Panel Scrollbox (if needed for long data) */
.resus-right-panel {
  max-height: 600px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #333;
}

/* ================================
   RESPONSIVE (Stack on smaller screens)
   ================================ */
@media (max-width: 1024px) {
  .resus-settings-grid {
    grid-template-columns: 1fr;
  }
  
  .resus-right-panel {
    max-height: unset;
  }
}
