/* MEDYAJANS - DYNAMIC FEATURE MANAGEMENT STYLES */
/* Mevcut sistem tasarımına uygun modern özellik yönetimi */

.feature-management-container {
    padding: 20px;
    width: 100%; /* Ana kutu genişliğinde */
    max-width: 100%; /* Ana kutu sınırında */
    margin: 0 auto;
    background: linear-gradient(135deg, #1e1e2f 0%, #252545 100%);
    border-radius: 15px;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    box-sizing: border-box; /* Padding dahil */
}

.feature-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%);
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.feature-management-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-management-title i {
    color: #4facfe;
    font-size: clamp(20px, 4vw, 24px);
    filter: drop-shadow(0 2px 4px rgba(79, 172, 254, 0.3));
}

.feature-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.feature-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-stat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Feature Cards Grid */
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 10px;
}

/* Yeni Özellik Ekleme Kartı */
.feature-card.add-new {
    background: linear-gradient(135deg, #2a2a4f 0%, #1e1e2f 100%);
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card.add-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card.add-new:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
    background: linear-gradient(135deg, #2a2a4f 0%, #252545 100%);
}

.feature-card.add-new:hover::before {
    opacity: 1;
}

.add-new-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.8;
    color: #4facfe;
    filter: drop-shadow(0 2px 4px rgba(79, 172, 254, 0.3));
}

.add-new-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #e2e8f0;
}

.add-new-subtitle {
    font-size: 12px;
    opacity: 0.7;
    color: #94a3b8;
}

/* Normal Feature Cards */
.feature-card {
    background: linear-gradient(135deg, #1e1e2f 0%, #252545 100%);
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
    background: linear-gradient(135deg, #1e1e2f 0%, #2a2a4f 100%);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.feature-icon-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.feature-icon.gps { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.feature-icon.payroll { background: linear-gradient(135deg, #f39c12, #e67e22); }
.feature-icon.inventory { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.feature-icon.general { background: linear-gradient(135deg, #34495e, #2c3e50); }

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
    flex: 1;
}

.feature-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.feature-status.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.feature-status.inactive {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.feature-description {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 60px;
    flex: 1;
    opacity: 0.9;
}

.feature-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-stat-item {
    text-align: center;
}

.feature-stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
}

.feature-stat-label {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.feature-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 15px;
    flex-wrap: wrap;
}

.feature-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.feature-btn.primary {
    background: #3498db;
    color: white;
}

.feature-btn.primary:hover {
    background: #2980b9;
}

.feature-btn.success {
    background: #27ae60;
    color: white;
}

.feature-btn.success:hover {
    background: #219a52;
}

.feature-btn.warning {
    background: #f39c12;
    color: white;
}

.feature-btn.warning:hover {
    background: #e67e22;
}

.feature-btn.danger {
    background: #e74c3c;
    color: white;
}

.feature-btn.danger:hover {
    background: #c0392b;
}

/* Wizard Modal */
.feature-wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-wizard-modal.active {
    display: flex;
    visibility: visible;
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.wizard-content {
    background: linear-gradient(135deg, #1e1e2f 0%, #252545 100%);
    border: 1px solid #334155;
    border-radius: 20px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-wizard-modal.show .wizard-content {
    transform: scale(1) translateY(0);
}

.wizard-header {
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%);
    color: #e2e8f0;
    padding: 25px 30px;
    text-align: center;
    border-bottom: 1px solid #334155;
}

.wizard-title {
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.wizard-step {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
}

.wizard-step.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.wizard-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.3s ease;
}

.wizard-step.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.wizard-body {
    padding: 30px;
    min-height: 400px;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
    color: #e2e8f0;
}

/* Wizard body scroll styling */
.wizard-body::-webkit-scrollbar {
    width: 8px;
}

.wizard-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.wizard-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
}

.wizard-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3a8bfd 0%, #00d4fe 100%);
}

.wizard-footer {
    padding: 25px 30px;
    border-top: 1px solid #334155;
    background: linear-gradient(135deg, #1a1a2e 0%, #252545 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.wizard-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wizard-btn.secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #e2e8f0;
    border: 1px solid #475569;
}

.wizard-btn.secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(100, 116, 139, 0.3);
}

.wizard-btn.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wizard-btn.primary:hover {
    background: linear-gradient(135deg, #3a8bfd 0%, #00d4fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.wizard-btn:active {
    transform: translateY(0);
}

/* Template Selection */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.template-card {
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.template-card:hover {
    border-color: #4facfe;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.2);
}

.template-card.selected {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.15);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
}

.template-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.template-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.template-description {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Company Selection */
.company-selection {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.company-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.company-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.company-checkbox {
    width: 16px;
    height: 16px;
}

.company-info {
    flex: 1;
}

.company-name {
    font-weight: 600;
    color: #e2e8f0;
}

.company-subdomain {
    font-size: 12px;
    color: #94a3b8;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e1e8ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styling for Wizard */
.wizard-body input,
.wizard-body select,
.wizard-body textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wizard-body input:focus,
.wizard-body select:focus,
.wizard-body textarea:focus {
    outline: none;
    border-color: #4facfe;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.wizard-body label {
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.wizard-body h4 {
    color: #e2e8f0;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 20px;
}

.wizard-body h5 {
    color: #4facfe;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.wizard-body small {
    color: #94a3b8;
    font-size: 12px;
}

/* Field Row Styling */
.field-row {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.field-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .feature-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .feature-management-container {
        padding: 15px;
        border-radius: 10px;
        margin: 10px 0; /* Yatayda margin yok - ana kutu genişliğinde */
        width: 100%; /* Ana kutu tam genişlik */
    }
    
    .feature-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .feature-management-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .feature-stats {
        justify-content: center;
        gap: 10px;
    }
    
    .wizard-content {
        width: 95%;
        max-width: 100%;
        margin: 10px;
        border-radius: 15px;
    }
    
    .wizard-header {
        padding: 20px 15px;
    }
    
    .wizard-body {
        padding: 20px 15px;
        min-height: 300px;
    }
    
    .wizard-footer {
        padding: 15px;
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .wizard-btn {
        width: 100%;
        min-width: unset;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .field-row {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .feature-management-title {
        font-size: 20px;
    }
    
    .feature-card {
        min-height: 180px;
        padding: 18px;
    }
    
    .feature-card.add-new {
        min-height: 140px;
    }
    
    .add-new-icon {
        font-size: 30px;
    }
    
    .add-new-text {
        font-size: 14px;
    }
    
    .add-new-subtitle {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .feature-management-container {
        padding: 10px;
        margin: 5px 0; /* Yatayda margin yok - ana kutu genişliğinde */
        width: 100%; /* Ana kutu tam genişlik */
    }
    
    .feature-card {
        min-height: 320px;
        padding: 20px;
    }
    
    .feature-actions {
        gap: 6px;
        padding-top: 20px;
    }
    
    .feature-btn {
        padding: 8px 10px;
        font-size: 11px;
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }
    
    .wizard-body {
        padding: 15px 10px;
    }
    
    .feature-management-header {
        padding: 12px;
    }
    
    .feature-stats {
        font-size: 12px;
        gap: 8px;
    }
    
    .feature-stat {
        padding: 4px 8px;
        font-size: 11px;
    }
}