/* Settings Page Styles */

/* Alpha notice */
.settings-alpha-notice {
    background: rgba(212, 164, 56, 0.08);
    border: 1px solid rgba(212, 164, 56, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
}
.settings-alpha-notice strong {
    color: #d4a438;
}

/* Modal (shared with butler) */
.butler-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.butler-modal {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    position: relative;
}
.butler-modal h3 {
    color: #d4a438;
    font-size: 18px;
    margin: 0 0 8px 0;
}
.butler-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.butler-modal-close:hover {
    color: #e8e8e8;
}
.butler-modal-desc {
    color: #999;
    font-size: 14px;
    margin: 0 0 16px 0;
}
.butler-modal-input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 16px;
    color: #e8e8e8;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.butler-modal-input:focus {
    outline: none;
    border-color: #d4a438;
}
.butler-modal-btn {
    width: 100%;
    background: #d4a438;
    color: #0d0d0d;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.butler-modal-btn:hover {
    background: #e5b84a;
}
.butler-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.butler-modal-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}
.butler-modal-success {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    color: #e8e8e8;
}
.butler-modal-success strong {
    color: #4ade80;
}
.butler-modal-success p {
    color: #999;
    font-size: 13px;
    margin: 4px 0 0 0;
}
.butler-modal-check {
    font-size: 28px;
    color: #4ade80;
    line-height: 1;
}

/* Oomph Balance */
.settings-oomph-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
}
.settings-oomph-total {
    font-size: 36px;
    font-weight: 700;
    color: #d4a438;
    margin-bottom: 4px;
}
.settings-oomph-label {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.settings-oomph-breakdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 13px;
    color: #888;
}
.settings-oomph-breakdown strong {
    color: #e8e8e8;
}
.settings-oomph-costs {
    margin-bottom: 16px;
}
.settings-oomph-cost-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #1a1a1a;
}
.settings-oomph-cost-row span:first-child {
    color: #ccc;
}
.settings-oomph-cost-row span:last-child {
    color: #d4a438;
    font-weight: 600;
}
.settings-oomph-buy-btn {
    display: inline-block;
    background: #d4a438;
    color: #0d0d0d;
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.settings-oomph-buy-btn:hover {
    background: #e5b84a;
}
.settings-oomph-note {
    font-size: 12px;
    color: #666;
    margin-top: 12px;
}

/* Your Services */
.settings-services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.settings-service-link {
    display: block;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 14px 16px;
    color: #e8e8e8;
    text-decoration: none;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}
.settings-service-link:hover {
    border-color: #d4a438;
    background: #1e1e1e;
}
.settings-service-link strong {
    color: #d4a438;
}
.settings-service-link span {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 4px;
    line-height: 1.5;
}

/* Connected Services */
.settings-section {
    margin-bottom: 32px;
}
.settings-section h2 {
    color: #d4a438;
    font-size: 18px;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #222;
    padding-bottom: 8px;
}
.settings-pipe-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
}
.settings-pipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.settings-pipe-name {
    font-weight: 600;
    font-size: 16px;
    color: #e8e8e8;
}
.settings-pipe-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}
.settings-pipe-status.connected {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}
.settings-pipe-status.free {
    background: rgba(212, 164, 56, 0.1);
    color: #d4a438;
}
.settings-pipe-status.exhausted {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}
.settings-pipe-credits {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}
.settings-pipe-credits strong {
    color: #e8e8e8;
}
.settings-pipe-bar {
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}
.settings-pipe-bar-fill {
    height: 100%;
    background: #d4a438;
    border-radius: 2px;
    transition: width 0.3s;
}
.settings-pipe-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.settings-pipe-btn {
    background: #d4a438;
    color: #0d0d0d;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.settings-pipe-btn:hover {
    background: #e5b84a;
}
.settings-pipe-btn.disconnect {
    background: transparent;
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}
.settings-pipe-btn.disconnect:hover {
    background: rgba(255, 107, 107, 0.1);
}
.settings-pipe-email {
    font-size: 13px;
    color: #888;
}

/* Personalization Preferences */
.settings-prefs-intro {
    font-size: 14px;
    color: #999;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.5;
}
.settings-prefs-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}
.settings-prefs-card h3 {
    color: #d4a438;
    font-size: 15px;
    margin: 0 0 16px 0;
    font-weight: 600;
}
.settings-field {
    margin-bottom: 14px;
}
.settings-field:last-child {
    margin-bottom: 0;
}
.settings-field label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}
.settings-field input[type="text"],
.settings-field select {
    width: 100%;
    max-width: 320px;
    padding: 8px 12px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.settings-field input[type="text"]:focus,
.settings-field select:focus {
    border-color: #d4a438;
}
.settings-field input[type="text"]::placeholder {
    color: #555;
}
.settings-radio-group {
    display: flex;
    gap: 0;
    max-width: 320px;
}
.settings-radio-group label {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    background: #242424;
    border: 1px solid #333;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0;
}
.settings-radio-group label:first-child {
    border-radius: 6px 0 0 6px;
}
.settings-radio-group label:last-child {
    border-radius: 0 6px 6px 0;
}
.settings-radio-group label:not(:last-child) {
    border-right: none;
}
.settings-radio-group input[type="radio"] {
    display: none;
}
.settings-radio-group input[type="radio"]:checked + span {
    color: #d4a438;
    font-weight: 600;
}
.settings-radio-group label:has(input:checked) {
    background: rgba(212, 164, 56, 0.1);
    border-color: rgba(212, 164, 56, 0.3);
}
.settings-radio-group label:has(input:checked) + label {
    border-left-color: rgba(212, 164, 56, 0.3);
}
.settings-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 500px;
}
.settings-pill {
    padding: 6px 14px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 20px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.settings-pill:hover {
    border-color: #555;
    color: #ccc;
}
.settings-pill.active {
    background: rgba(212, 164, 56, 0.15);
    border-color: rgba(212, 164, 56, 0.4);
    color: #d4a438;
    font-weight: 600;
}
.settings-prefs-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}
.settings-save-btn {
    background: #d4a438;
    color: #0d0d0d;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.settings-save-btn:hover {
    background: #e5b84a;
}
.settings-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.settings-clear-link {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    text-decoration: underline;
    transition: color 0.2s;
}
.settings-clear-link:hover {
    color: #ff6b6b;
}
.settings-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #d4a438;
    color: #0d0d0d;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Butler Personas */
.settings-persona-heading {
    color: #999;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 10px 0;
}
.settings-persona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.settings-persona-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.settings-persona-card:hover {
    border-color: #444;
    background: #1e1e1e;
}
.settings-persona-card.active {
    border-color: rgba(212, 164, 56, 0.5);
    background: rgba(212, 164, 56, 0.05);
}
.persona-check {
    position: absolute;
    top: 10px;
    right: 12px;
    color: #d4a438;
    font-size: 16px;
    font-weight: 700;
}
.persona-custom-label {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10px;
    color: #999;
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settings-persona-card.active .persona-custom-label {
    right: 34px;
}
.persona-name {
    font-size: 15px;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 4px;
}
.persona-tagline {
    font-size: 13px;
    color: #d4a438;
    font-style: italic;
    margin-bottom: 8px;
}
.persona-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.persona-actions {
    margin-top: 10px;
    display: flex;
    gap: 12px;
}
.persona-action-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
    transition: color 0.2s;
}
.persona-action-btn:hover {
    color: #d4a438;
}
.persona-action-delete:hover {
    color: #ff6b6b;
}
.settings-persona-editor {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}
.settings-persona-editor h3 {
    color: #d4a438;
    font-size: 15px;
    margin: 0 0 16px 0;
    font-weight: 600;
}
.settings-persona-editor textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e8e8e8;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    resize: vertical;
}
.settings-persona-editor textarea:focus {
    border-color: #d4a438;
}
.settings-persona-editor textarea::placeholder {
    color: #555;
}
.settings-persona-editor .settings-field input[type="text"] {
    max-width: 500px;
}
.settings-persona-helper {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

/* Your Plan Section */
.settings-plan-current {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}
.settings-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.plan-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(136, 136, 136, 0.15);
    color: #999;
}
.plan-badge-free {
    background: rgba(136, 136, 136, 0.15);
    color: #999;
}
.plan-badge-valet {
    background: rgba(212, 164, 56, 0.15);
    color: #d4a438;
}
.plan-badge-butler {
    background: rgba(212, 164, 56, 0.25);
    color: #d4a438;
    border: 1px solid rgba(212, 164, 56, 0.3);
}
.plan-price {
    font-size: 14px;
    color: #888;
}
.settings-plan-usage {
    display: flex;
    gap: 24px;
}
.settings-plan-stat {
    flex: 1;
}
.plan-stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}
.plan-stat-value {
    display: block;
    font-size: 14px;
    color: #e8e8e8;
    font-weight: 600;
    margin-bottom: 2px;
}
.settings-plan-tiers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.settings-plan-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
}
.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.plan-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #d4a438;
}
.plan-card-price {
    font-size: 14px;
    font-weight: 600;
    color: #e8e8e8;
}
.plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}
.plan-card-features li {
    font-size: 13px;
    color: #999;
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}
.plan-card-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-size: 12px;
}
.plan-card-btn {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-persona-grid { grid-template-columns: 1fr; }
    .settings-plan-tiers { grid-template-columns: 1fr; }
    .settings-plan-usage { flex-direction: column; gap: 12px; }
}
