/* Modern Settings Container */
.settings-modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.settings-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

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

.header-text .page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-text .page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    overflow: hidden;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.card-title h3 {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.card-title p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Modern Forms */
.modern-form {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group-modern {
    margin-bottom: 20px;
}

.modern-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.modern-label i {
    color: #667eea;
}

.modern-input, .modern-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.modern-input:focus, .modern-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modern-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

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

.modern-btn-secondary {
    background: #10b981;
    color: white;
}

.modern-btn-secondary:hover {
    background: #059669;
    transform: translateY(-1px);
}

.modern-btn-warning {
    background: #f59e0b;
    color: white;
}

.modern-btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.modern-btn-danger {
    background: #ef4444;
    color: white;
}

.modern-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Logo Section */
.logo-section {
    padding: 24px;
    text-align: center;
}

.current-logo-display {
    margin-bottom: 24px;
}

.logo-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid #e5e7eb;
    margin-bottom: 16px;
}

.no-logo-placeholder {
    width: 120px;
    height: 120px;
    background: #f3f4f6;
    border: 4px dashed #d1d5db;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #9ca3af;
    font-size: 2rem;
}

.no-logo-placeholder span {
    font-size: 0.9rem;
    margin-top: 8px;
}

.upload-zone {
    margin-top: 16px;
}

.file-input {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px dashed #667eea;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-label i {
    font-size: 2.5rem;
    color: #667eea;
}

.upload-label span {
    font-weight: 600;
    color: #374151;
}

.upload-hint {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Account Sections */
.account-sections {
    padding: 24px;
}

.account-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
}

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

.account-section h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.account-section h4 i {
    color: #667eea;
    font-size: 1rem;
}

/* Modern Alert */
.modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    animation: slideIn 0.3s ease;
}

.modern-alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.alert-icon {
    font-size: 1.5rem;
    margin-top: 2px;
}

.alert-content strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.alert-content p {
    margin: 0;
    opacity: 0.9;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Settings Container */
.settings-container {
    margin-top: 24px;
}

.settings-single-card {
    max-width: 800px;
    margin: 0 auto;
}

/* Settings Sections */
.settings-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.settings-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.settings-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.settings-title i {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 6px;
}

.settings-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.settings-content {
    padding: 32px;
}

/* Settings Groups */
.settings-group {
    margin-bottom: 32px;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 12px 0;
    border-bottom: 2px solid #e5e7eb;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.settings-group h4 i {
    color: #667eea;
    background: #f0f9ff;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.settings-form {
    padding: 24px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form .form-group:last-child {
    margin-bottom: 0;
}

.settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.settings-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-form .input-wrapper i {
    position: absolute;
    left: 12px;
    color: #6b7280;
    z-index: 1;
    font-size: 0.9rem;
}

.settings-form input,
.settings-form select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #fafafa;
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-form input[type="file"] {
    padding: 8px;
    cursor: pointer;
}

.settings-form button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.settings-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.settings-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-form .btn-secondary {
    background: #6b7280;
    color: white;
}

.settings-form .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Settings List (like products table) */
.settings-list-container {
    padding: 0;
}

.settings-list {
    display: block;
}

.settings-list .list-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 16px;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-list .list-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    align-items: center;
}

.settings-list .list-item:hover {
    background: #f8fafc;
}

.settings-list .list-item:last-child {
    border-bottom: none;
}

.settings-list .list-col {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* Mobile settings list */
@media (max-width: 768px) {
    .settings-list .list-header,
    .settings-list .list-item {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .settings-list .list-header {
        display: none; /* Hide header on mobile, use labels */
    }
    
    .settings-list .list-item {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .settings-list .list-col {
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.85rem;
    }
    
    .settings-list .list-col:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: center;
        gap: 8px;
    }
    
    .settings-list .list-col::before {
        content: attr(data-label);
        font-weight: 600;
        color: #667eea;
        font-size: 0.75rem;
        display: block;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

.setting-name-cell {
    font-weight: 600;
    color: #1e293b;
    gap: 8px;
}

.setting-name-cell i {
    color: #667eea;
    background: #f0f9ff;
    padding: 6px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.setting-value-cell {
    color: #64748b;
    font-weight: 500;
}

.logo-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.status-cell {
    justify-content: center;
}

.action-cell {
    justify-content: center;
}

.action-cell .btn-outline {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-cell .btn-outline:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #4b5563;
}

.action-cell .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-cell .btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.action-cell .btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* Logo Upload Section */
.logo-upload-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.logo-preview {
    flex-shrink: 0;
}

.logo-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #e2e8f0;
}

.no-profile-icon {
    width: 80px;
    height: 80px;
    background: #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #d1d5db;
}

.no-profile-icon i {
    font-size: 2rem;
    color: #9ca3af;
}

.logo-info h4 {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.logo-info p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 0.9rem;
}

.upload-area {
    position: relative;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    background: #f0f9ff;
    border: 2px dashed #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.upload-label:hover {
    background: #e0f2fe;
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-label i {
    font-size: 2rem;
    color: #667eea;
}

.upload-label span {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-good {
    background: #10b981;
    color: white;
}

.status-low {
    background: #f59e0b;
    color: white;
}

.status-out {
    background: #ef4444;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .settings-modern-container {
        padding: 0 12px;
    }
    
    .settings-page-header {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .header-text .page-title {
        font-size: 1.5rem;
        justify-content: center;
        line-height: 1.2;
    }
    
    .header-text .page-subtitle {
        font-size: 0.9rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .settings-card {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modern-form {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .modern-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        justify-content: center;
        min-height: 44px;
    }
    
    .logo-section {
        padding: 16px;
    }
    
    .account-sections {
        padding: 16px;
    }
    
    .account-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .upload-label {
        padding: 20px 16px;
    }
    
    .upload-label i {
        font-size: 1.8rem;
    }
    
    .logo-image {
        width: 100px;
        height: 100px;
    }
    
    .no-logo-placeholder {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }
    
    .current-logo {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .logo-preview img {
        width: 60px;
        height: 60px;
    }
    
    .no-profile-icon {
        width: 60px;
        height: 60px;
    }
    
    .no-profile-icon i {
        font-size: 1.5rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .settings-container {
        margin-top: 12px;
    }
    
    .settings-single-card {
        margin: 0 12px;
    }
    
    .settings-header {
        padding: 12px 16px;
    }
    
    .settings-title h3 {
        font-size: 1rem;
    }
    
    .settings-content {
        padding: 20px 16px;
    }
    
    .settings-group h4 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
}