:root {
    --primary: #4361ee;
    --secondary: #c937a3;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body { 
    background: #031e2c30; 
    color: var(--dark);
    line-height: 1.6;
}

/* Header & Navigation */
.header {
    background:#ffffffdf;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
}

.logo i {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: rgb(32, 13, 82);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #f72585;  
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Period Selector */
.period-selector {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.period-badge {
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.period-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.period-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.target { background: rgba(67, 97, 238, 0.1); color: var(--primary); }
.stat-icon.sales { background: rgba(76, 201, 240, 0.1); color: var(--success); }
.stat-icon.performance { background: rgba(248, 150, 30, 0.1); color: var(--warning); }

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background:#303337;
    color: white;
}

.btn-primary:hover {
    background:#505051;
    transform: translateY(-2px);
}

.btn-success {
    background:#303337;
    color: white;
}

.btn-success:hover {
    background: #505051;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #e01e6f;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #e0861b;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Buton aktif durumları */
.btn:active,
.btn.active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

thead {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
}

tbody tr {
    transition: background 0.3s ease;
}

tbody tr:hover {
    background: #f8fafc;
}

/* Status badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-met {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-exceeded {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.status-not-met {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Inline forms in table */
.inline-form {
    display: flex;
    gap: 5px;
    align-items: center;
}

.inline-input {
    width: 100px;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.inline-btn {
    padding: 8px;
    width: auto;
    border-radius: 6px;
}

/* Tabs */
.tabs {
    background: white;
    border-radius: 6px;
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

/* Mobil Tablo Stilleri */
@media (max-width: 768px) {
    .table-container {
        border: 1px solid #ddd;
        border-radius: 8px;
        background: white;
    }
    
    table {
        min-width: unset;
        width: 100%;
        display: block;
        overflow-x: visible;
    }
    
    thead {
        display: none;
    }
    
    tbody, tr, td {
        display: block;
        width: 100%;
    }
    
    tr {
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid #eee;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    td {
        padding: 0.75rem 0.5rem;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 45%;
        text-align: right;
    }
    
    td:last-child {
        border-bottom: none;
        text-align: center;
        padding-left: 0.5rem;
    }
    
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: var(--primary);
        text-align: left;
        width: 40%;
    }
    
    /* Mobil buton grupları */
    .btn-group-mobile {
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-group-mobile .btn,
    .btn-group-mobile .inline-form {
        flex: 1;
        min-width: 120px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* Form içindeki butonlar için */
    .btn-group-mobile .inline-form {
        display: flex;
        margin: 0;
    }
    
    .btn-group-mobile .inline-form .btn {
        width: 100%;
        margin: 0;
    }
     
    .inline-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .inline-input {
        width: 100% !important;
        text-align: center;
    }
     
    .status-badge {
        display: inline-block;
        margin: 0.25rem 0;
    }
     
    tbody tr:hover {
        background: white;
        transform: none;
    }
}
 
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .period-selector {
        padding: 1rem;
    }
    
    .period-form {
        flex-direction: column;
        width: 100%;
    }
    
    .period-select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .btn-group-mobile {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .btn-group-mobile .btn,
    .btn-group-mobile .inline-form {
        min-width: 100%;
        font-size: 0.8rem;
    }
    
    .mobile-text {
        display: inline-block;
    }
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

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

    .card {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .period-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .period-form {
        width: 100%;
    }

    .period-select {
        flex: 1;
    }

    .tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        overflow-x: visible;
        white-space: normal;
        padding: 0.5rem;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-bottom: none;
        margin-bottom: 1rem;
    }

    .tab {
        flex: 1;
        padding: 12px 8px;
        font-size: 0.8rem;
        text-align: center;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        background: #f8f9fa;
        transition: all 0.3s ease;
        white-space: normal;
        word-break: break-word;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
}
 
@media (max-width: 768px) {
    .btn, input, select, textarea {
        min-height: 44px;
    }
    
    .btn-group-mobile .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-group-mobile .btn {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
     
    .btn-group-mobile .btn i {
        margin-right: 4px;
    }
     
    .btn-group-mobile form {
        display: flex;
        flex: 1;
    }
    
    .btn-group-mobile form .btn {
        flex: 1;
    }
}
 
@media (max-width: 480px) {
    .mobile-text {
        display: none;
    }
    
    .btn-group-mobile .btn {
        min-width: 80px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s;
}

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

.modal-header {
    background: linear-gradient(135deg, #4361ee, #c937a3);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Alert content for custom alerts */
.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-content i {
    font-size: 1.2em;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.loading-spinner i {
    color: var(--primary);
}

/* Utilities */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1rem; }
.hidden { display: none; }
.text-muted { color: #28a745; font-weight: bolder; }
 
.view-sales-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.view-sales-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
}

 @media (max-width: 768px) {
    .btn-group-mobile .btn {
        border: 2px solid transparent;
    }
    
    .btn-group-mobile .btn:active {
        border-color: rgba(255,255,255,0.5);
    }
    
     .view-sales-btn {
        background: #17a2b8;
    }
}