/* Sidebar Settings Specific Styles */

.sidebar-right {
    right: 0;
    left: auto;
    border-left: 1px solid var(--border);
    border-right: none;
}

.sidebar-right.collapsed {
    width: 48px;
}

.sidebar-right.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-right .sidebar-header {
    flex-direction: row-reverse;
}

.sidebar-section {
    padding: var(--space-3);
    padding-top: 0;
    flex-shrink: 0;
}

.sidebar-section:first-of-type {
    padding-top: var(--space-3);
}

.sidebar-section.no-scroll {
    flex: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-header.collapsible {
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.section-header.collapsible:hover {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.section-header .chevron {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform var(--transition-fast);
}

.section-header.collapsed .chevron {
    transform: rotate(-90deg);
}

.collapsible-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}

.collapsible-content.collapsed {
    display: none;
}

/* Defaults Header */
.defaults-header {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    padding: var(--space-2);
    border-top: 1px solid var(--border);
    margin-top: var(--space-2);
}

/* Settings Forms */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.setting-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.setting-group input {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.setting-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.setting-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-2) 0;
}

/* Currency Picker (Sidebar) */
.currency-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.currency-quick-picks {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-1);
}

.currency-btn {
    padding: var(--space-2);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.currency-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.currency-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.currency-full-list {
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    cursor: pointer;
    max-height: 120px;
}

/* Services */
.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: var(--space-1);
}

.service-tag {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.service-tag button {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.service-tag button:hover {
    opacity: 1;
}

.service-tag button svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.add-service-row {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.add-service-row input {
    flex: 1;
    padding: var(--space-2);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
}

.add-service-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.add-service-row button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.add-service-row button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Buttons */
.defaults-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.save-defaults-btn,
.apply-defaults-btn,
.data-btn {
    padding: var(--space-3);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.save-defaults-btn {
    background: var(--accent);
    color: white;
}

.save-defaults-btn:hover {
    filter: brightness(1.1);
}

.apply-defaults-btn {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.apply-defaults-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

/* Saved Clients List */
.clients-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.client-item:hover {
    background: var(--accent-soft);
}

.client-item-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.client-item-email {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.client-item-delete {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
}

.client-item:hover .client-item-delete {
    opacity: 1;
}

.client-item-delete:hover {
    color: #ef4444;
}

.client-item-delete svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.add-client-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
}

.add-client-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-client-btn:hover {
    filter: brightness(1.1);
}

.add-client-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.sidebar.collapsed .defaults-header,
.sidebar.collapsed .defaults-buttons {
    display: none;
}