/*
 * BizFlow Settings Dashboard Styles
 * Complete styling for system settings and configuration
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Layout */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar (using existing styles) */
.sidebar {
    width: 220px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    padding: 1.5rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: -1px;
    margin-bottom: 0;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
    color: #000000;
    width: 100%;
    box-sizing: border-box;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-left-color: #000000;
    transform: translateX(5px);
    text-decoration: none;
}

.nav-item.active .nav-link {
    background-color: rgba(0, 0, 0, 0.15);
    border-left-color: #000000;
    transform: translateX(5px);
}

.nav-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    color: #000000;
    transition: transform 0.15s ease;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    transition: color 0.15s ease;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #000000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Settings Header */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.page-subtitle {
    color: #cccccc;
    font-size: 1rem;
    margin-bottom: 0;
}

.settings-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.3);
}

.btn-secondary {
    background: #333333;
    color: #ffffff;
    border: 1px solid #555555;
}

.btn-secondary:hover {
    background: #444444;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    font-size: 1rem;
}

/* Settings Search */
.settings-search-section {
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    max-width: 500px;
}

.search-input {
    width: 100%;
    background: #333333;
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    padding-right: 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    pointer-events: none;
    font-size: 1.1rem;
}

/* Settings Navigation */
.settings-navigation {
    margin-bottom: 2rem;
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    background: #1a1a1a;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid #333333;
    overflow-x: auto;
}

.settings-tab {
    background: none;
    border: none;
    color: #cccccc;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
}

.settings-tab:hover {
    background: #333333;
    color: #ffffff;
}

.settings-tab.active {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.2);
}

.tab-icon {
    font-size: 1rem;
}

.tab-text {
    font-weight: 500;
}

/* Settings Content */
.settings-content {
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333333;
    overflow: hidden;
    margin-bottom: 2rem;
}

.settings-tab-content {
    display: none;
    padding: 2rem;
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333333;
}

.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section h3 {
    color: #f1c40f;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Settings Grid */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: #3a3a3a;
    border-color: #666666;
}

.setting-info {
    flex: 1;
    margin-right: 1rem;
}

.setting-label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.setting-description {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.setting-control {
    flex-shrink: 0;
}

.setting-input {
    background-color: #1a1a1a;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    min-width: 150px;
    transition: all 0.3s ease;
}

.setting-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555555;
    border-radius: 30px;
    transition: 0.4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked+.toggle-slider {
    background-color: #f1c40f;
}

input:checked+.toggle-slider:before {
    transform: translateX(30px);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 1rem;
}

.theme-option {
    background: #1a1a1a;
    border: 2px solid #555555;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 80px;
}

.theme-option:hover {
    border-color: #f1c40f;
    background: #333333;
}

.theme-option.active {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.theme-preview {
    width: 40px;
    height: 30px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.theme-preview.dark {
    background: linear-gradient(135deg, #000000, #333333);
}

.theme-preview.light {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.theme-preview.auto {
    background: linear-gradient(90deg, #000000 50%, #ffffff 50%);
}

.theme-option span {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.color-option.active {
    border-color: #ffffff;
    transform: scale(1.1);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Notification Settings */
.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.notification-group h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #555555;
}

.notification-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    background: #333333;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.notification-item:hover {
    background: #3a3a3a;
}

.notification-info {
    flex: 1;
}

.notification-title {
    color: #ffffff;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.notification-desc {
    color: #cccccc;
    font-size: 0.85rem;
}

/* Security Settings */
.security-settings,
.advanced-settings,
.developer-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.security-item,
.advanced-item,
.developer-item {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.security-item:hover,
.advanced-item:hover,
.developer-item:hover {
    background: #3a3a3a;
    border-color: #666666;
}

.security-info,
.advanced-info,
.developer-info {
    flex: 1;
    margin-right: 1rem;
}

.security-info h4,
.advanced-info h4,
.developer-info h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.security-info p,
.advanced-info p,
.developer-info p {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
}

.security-control,
.advanced-control,
.developer-control {
    flex-shrink: 0;
}

.security-status {
    color: #2ecc71;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 1rem;
}

.security-status.enabled {
    color: #2ecc71;
}

.security-status.disabled {
    color: #e74c3c;
}

/* Integrations */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.integration-card {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    transition: all 0.3s ease;
}

.integration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.05);
}

.integration-card.connected {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}

.integration-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.integration-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 10px;
}

.integration-info {
    flex: 1;
}

.integration-info h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.integration-info p {
    color: #cccccc;
    font-size: 0.85rem;
    margin: 0;
}

.integration-status {
    flex-shrink: 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.connected {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.status-badge.disconnected {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
    border: 1px solid #95a5a6;
}

.integration-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* API Management */
.api-management {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.api-header p {
    color: #cccccc;
    margin: 0;
    flex: 1;
}

.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-key-item {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.api-key-info {
    flex: 1;
}

.api-key-info h4 {
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.api-key-info p {
    color: #888888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.api-key-preview {
    background: #333333;
    color: #f1c40f;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.api-key-actions {
    display: flex;
    gap: 0.5rem;
}

/* Data Settings */
.data-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-item {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-info {
    flex: 1;
    margin-right: 1rem;
}

.data-info h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.data-info p {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
}

.data-control {
    flex-shrink: 0;
}

/* Export/Import Section */
.export-import-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.export-options,
.import-section {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
}

.export-options h4,
.import-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.export-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.export-item {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #ffffff;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #555555;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: #f1c40f;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    opacity: 1;
}

.export-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.export-actions select {
    flex: 1;
}

/* Import Area */
.import-area {
    border: 2px dashed #555555;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.import-area:hover,
.import-area.dragover {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.05);
}

.import-placeholder {
    color: #cccccc;
}

.import-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.import-hint {
    color: #888888;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Storage Usage */
.storage-overview {
    background: #333333;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
}

.storage-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.storage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.storage-type {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 500;
    min-width: 150px;
}

.storage-icon {
    font-size: 1.2rem;
}

.storage-usage {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.usage-bar {
    flex: 1;
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.usage-text {
    color: #cccccc;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 100px;
}

.storage-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Danger Zone */
.danger-section {
    border: 2px solid #e74c3c;
    border-radius: 12px;
    background: rgba(231, 76, 60, 0.05);
}

.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.danger-item {
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e74c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-info {
    flex: 1;
    margin-right: 1rem;
}

.danger-info h4 {
    color: #e74c3c;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.danger-info p {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0;
}

/* Settings Footer */
.settings-footer {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.settings-info {
    color: #888888;
    font-size: 0.85rem;
}

.settings-info span {
    color: #f1c40f;
    font-weight: 500;
}

.settings-actions {
    display: flex;
    gap: 1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border: 1px solid #555555;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.modal-large {
    max-width: 700px;
}

.modal-small {
    max-width: 400px;
}

.modal-header {
    background: #333333;
    padding: 1.5rem;
    border-bottom: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    background: #333333;
    padding: 1.5rem;
    border-top: 1px solid #555555;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-input {
    width: 100%;
    background-color: #333333;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 0.75rem;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.form-input::placeholder {
    color: #888888;
}

/* Permissions List */
.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Confirmation Modal */
.confirmation-content {
    padding: 2rem;
    text-align: center;
}

.confirmation-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.confirmation-content p {
    color: #cccccc;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.confirmation-details {
    background: #333333;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #555555;
}

/* IP Restrictions */
.ip-management {
    padding: 1.5rem;
}

.ip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ip-header p {
    color: #cccccc;
    margin: 0;
    flex: 1;
}

.ip-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ip-item {
    background: #333333;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #555555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ip-address {
    color: #f1c40f;
    font-family: monospace;
    font-weight: 600;
    background: #1a1a1a;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.ip-label {
    color: #ffffff;
    font-weight: 500;
}

.ip-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ip-status.active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.ip-status.inactive {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.ip-actions {
    display: flex;
    gap: 0.5rem;
}

/* Import Preview */
.import-content {
    padding: 1.5rem;
}

.import-options {
    margin-bottom: 2rem;
}

.import-options h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.import-option {
    margin-bottom: 0.75rem;
}

.import-preview {
    background: #333333;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #555555;
    max-height: 200px;
    overflow-y: auto;
}

.preview-content {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
    position: relative;
}

.notification.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.notification.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .settings-tabs {
        overflow-x: auto;
    }

    .integrations-grid {
        grid-template-columns: 1fr;
    }

    .export-import-section {
        grid-template-columns: 1fr;
    }

    .settings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-header-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        overflow-x: auto;
        padding: 1rem 0;
    }

    .nav-menu {
        display: flex;
        white-space: nowrap;
        padding: 0 1rem;
        gap: 0.25rem;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.5rem;
        min-width: 80px;
        text-align: center;
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .nav-item:hover,
    .nav-item.active {
        border-left: none;
        border-bottom-color: #000000;
        transform: translateY(-3px);
    }

    .nav-icon {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }

    .settings-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .settings-tab {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .settings-tab-content {
        padding: 1.5rem;
    }

    .setting-item,
    .security-item,
    .advanced-item,
    .developer-item,
    .data-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .setting-info,
    .security-info,
    .advanced-info,
    .developer-info,
    .data-info {
        margin-right: 0;
        text-align: center;
    }

    .setting-control,
    .security-control,
    .advanced-control,
    .developer-control,
    .data-control {
        align-self: center;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .api-key-item,
    .ip-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .api-key-actions,
    .ip-actions {
        justify-content: center;
    }

    .settings-footer {
        flex-direction: column;
        text-align: center;
    }

    .storage-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .storage-type {
        justify-content: center;
        min-width: auto;
    }

    .danger-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .danger-info {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .settings-tabs {
        flex-direction: column;
    }

    .settings-tab {
        justify-content: center;
        width: 100%;
    }

    .theme-selector {
        justify-content: center;
        flex-wrap: wrap;
    }

    .color-picker {
        justify-content: center;
    }

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

    .storage-actions {
        flex-direction: column;
    }

    .integration-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .integration-actions {
        justify-content: center;
        width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #555555;
    border-radius: 50%;
    border-top-color: #f1c40f;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888888;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Search Highlighting */
.search-highlight {
    background: rgba(241, 196, 15, 0.3);
    border-radius: 3px;
    padding: 0.1rem 0.2rem;
}

/* Custom Scrollbar */
.settings-tab-content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.settings-tab-content::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.settings-tab-content::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 3px;
}

.settings-tab-content::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Firefox Scrollbar */
.settings-tab-content,
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #555555 #1a1a1a;
}

/* Print Styles */
@media print {

    .sidebar,
    .settings-header-actions,
    .settings-footer,
    .modal,
    .notification-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .settings-content {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {

    .setting-item,
    .security-item,
    .advanced-item,
    .developer-item,
    .data-item,
    .integration-card,
    .api-key-item,
    .ip-item {
        border-width: 2px;
    }

    .btn {
        border: 2px solid transparent;
    }

    .btn:focus {
        border-color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .setting-item,
    .security-item,
    .advanced-item,
    .developer-item,
    .data-item,
    .integration-card,
    .btn,
    .settings-tab,
    .toggle-slider,
    .usage-fill {
        transition: none;
        animation: none;
    }

    .notification {
        animation: none;
    }
}

/* Focus Management */
.modal.active .modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Accessibility Improvements */
.setting-item:focus-within,
.security-item:focus-within,
.advanced-item:focus-within,
.developer-item:focus-within,
.data-item:focus-within {
    outline: 2px solid #f1c40f;
    outline-offset: 2px;
}

.settings-tab:focus {
    outline: 2px solid #f1c40f;
    outline-offset: 2px;
}

/* Success States */
.setting-item.success {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}

.setting-item.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

/* Tooltip Support */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333333;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    margin-bottom: 0.5rem;
    border: 1px solid #555555;
}

.tooltip:hover::after {
    opacity: 1;
}