/* Settings Page Styles */
.settings {
    min-height: 100vh;
    background-color: #f8fafc;
    padding-top: 80px;
}

.settings .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Settings Header */
.settings-header {
    margin-bottom: 2rem;
}

.settings-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.settings-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
}

/* Settings Navigation */
.settings-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.settings-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.settings-tab:hover {
    color: #5850ec;
}

.settings-tab.active {
    color: #5850ec;
    border-bottom-color: #5850ec;
}

/* Settings Content */
.settings-content {
    position: relative;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

/* Panel Header */
.panel-header {
    margin-bottom: 2rem;
}

.panel-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.panel-description {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .settings-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Setting Card */
.setting-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.setting-header {
    margin-bottom: 1.5rem;
}

.setting-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.setting-description {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Form Styles */
.setting-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5850ec;
    box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.1);
}

.form-group input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #5850ec;
}

.checkbox-group label {
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
}

/* Buttons */
.btn-save,
.btn-primary {
    padding: 0.75rem 1.5rem;
    background-color: #5850ec;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-save:hover,
.btn-primary:hover {
    background-color: #4338ca;
}

.btn-copy {
    padding: 0.75rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-copy:hover {
    background-color: #e5e7eb;
}

.btn-edit,
.btn-connect {
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-edit:hover,
.btn-connect:hover {
    background-color: #e5e7eb;
}

.btn-delete,
.btn-remove,
.btn-cancel,
.btn-disconnect {
    padding: 0.5rem 1rem;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-delete:hover,
.btn-remove:hover,
.btn-cancel:hover,
.btn-disconnect:hover {
    background-color: #fee2e2;
}

.btn-resend,
.btn-upgrade {
    padding: 0.5rem 1rem;
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-resend:hover,
.btn-upgrade:hover {
    background-color: #dbeafe;
}

.btn-download {
    padding: 0.5rem 1rem;
    background-color: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-download:hover {
    background-color: #f3f4f6;
}

/* Compliance Status */
.compliance-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-icon.success {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-text {
    font-size: 0.875rem;
    color: #374151;
}

/* Goals Section */
.goals-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.goals-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

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

.goal-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .goal-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.goal-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.goal-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.goal-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.goal-conversions {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.goal-rate {
    font-size: 0.75rem;
    color: #64748b;
}

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

/* Team Section */
.team-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.team-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

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

.team-member {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.team-member.pending {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .team-member {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #5850ec;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.member-details h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.member-details p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-badge.owner {
    background-color: #fef3c7;
    color: #d97706;
}

.role-badge.pending {
    background-color: #e0e7ff;
    color: #3730a3;
}

.role-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.75rem;
    background-color: white;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.member-status {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 500;
}

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

.integration-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.integration-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.integration-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.integration-icon.google {
    background-color: #4285f4;
}

.integration-icon.slack {
    background-color: #4a154b;
}

.integration-icon.webhook {
    background-color: #6b7280;
}

.integration-icon.zapier {
    background-color: #ff4a00;
}

.integration-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.integration-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.integration-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.connected {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-badge.available {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Billing Section */
.billing-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-plan {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

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

.plan-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.plan-badge {
    padding: 0.5rem 1rem;
    background-color: #fef3c7;
    color: #d97706;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-details {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .plan-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.period {
    font-size: 0.875rem;
    color: #64748b;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    color: #16a34a;
    font-weight: 600;
}

.feature-text {
    font-size: 0.875rem;
    color: #374151;
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-stats {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.usage-stats h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.usage-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.usage-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.usage-bar {
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.usage-progress {
    height: 100%;
    background-color: #5850ec;
    transition: width 0.3s ease;
}

.billing-history {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.billing-history h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.invoice-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .invoice-item {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
    }
    
    .invoice-item > *:nth-child(n+3) {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

.invoice-date {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.invoice-description {
    font-size: 0.875rem;
    color: #374151;
}

.invoice-amount {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.invoice-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.invoice-status.paid {
    background-color: #dcfce7;
    color: #16a34a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings .container {
        padding: 1rem;
    }
    
    .settings-title {
        font-size: 2rem;
    }
    
    .settings-nav {
        gap: 0.25rem;
    }
    
    .settings-tab {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .setting-card {
        padding: 1rem;
    }
    
    .goals-header,
    .team-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}