/* Coordino - Proje Yönetim Sistemi */
:root {
    --primary-color: #242441;
    --primary-light: #2d2d52;
    --primary-dark: #1a1a2e;
    --secondary-color: #4a90e2;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

/* Form element resets */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
}

input, select, textarea {
    box-sizing: border-box;
}

/* Force proper alignment for all form elements */
.form-group,
.form-group *,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-light);
    font-size: 14px;
}

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    min-height: 70px;
    overflow: visible;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 30px;
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 45px;
    margin-right: 12px;
}

.logo h1 {
    font-size: 26px;
    font-weight: 600;
}

/* Navigation */
.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    overflow: visible;
}

.nav-item {
    position: relative;
    overflow: visible;
}

.nav-link {
    display: block;
    padding: 18px 15px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-light);
    border-bottom-color: var(--secondary-color);
}

/* Dropdown Navigation */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 0;
    display: block;
    border: 1px solid #e0e0e0;
}

.dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
    background: white !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

.dropdown-item i {
    width: 16px;
    color: inherit;
}

/* Scrollable dropdown for long lists */
.scrollable-dropdown {
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.scrollable-dropdown::-webkit-scrollbar {
    width: 6px;
}

.scrollable-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scrollable-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.scrollable-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: #357abd;
    transform: scale(1.05);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
    display: none;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.user-dropdown-role {
    color: var(--text-secondary);
    font-size: 12px;
}

.user-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.user-dropdown-item i {
    width: 16px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 50px;
    min-height: calc(100vh - 80px);
    background: #fafbfc;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    position: relative;
}

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

.card + .card {
    margin-top: 25px;
}

/* Özel kart boşlukları */
.row .card {
    margin-bottom: 35px;
}

.row .col:last-child .card {
    margin-bottom: 35px;
}

/* Dashboard kartları için özel spacing */
.row:first-child .card {
    margin-bottom: 45px;
}

.row:first-child .col .card {
    margin-bottom: 45px;
}

/* Alt satır kartları için daha fazla boşluk */
.row:not(:first-child) .card {
    margin-bottom: 50px;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30px;
    height: 1px;
    background: var(--primary-color);
    border-radius: 0.5px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.2px;
}

/* Dashboard Status Links */
.status-count-link {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(0,123,255,0.3);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-block;
}

.status-count-link:hover {
    background-color: rgba(0,123,255,0.1);
    text-decoration-color: var(--primary-color);
    border-color: rgba(0,123,255,0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.status-count-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,123,255,0.2);
}

/* Custom Searchable Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 1000;
}

/* Force dropdown to be above everything when open */
.custom-dropdown.open {
    z-index: 99999 !important;
    position: relative;
}

/* Ensure form groups don't interfere with dropdown z-index */
.form-group:has(.custom-dropdown.open) {
    z-index: 99998 !important;
    position: relative;
}

/* Alternative selector for older browsers */
.form-group .custom-dropdown.open {
    z-index: 99999 !important;
}

.form-group .custom-dropdown.open ~ * {
    z-index: 1 !important;
}

.custom-dropdown-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.custom-dropdown-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.custom-dropdown-input::placeholder {
    color: #999;
    font-style: italic;
}

.custom-dropdown-input[data-selected="true"] {
    background: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.3);
    font-weight: 500;
}

.custom-dropdown-input[data-selected="true"]:focus {
    background: white;
    font-weight: normal;
}

/* Notes section styling */
.notes-section {
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 15px;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.notes-container {
    flex: 1;
    overflow-y: auto;
}

.note-item {
    transition: all 0.2s ease;
}

.note-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.note-item .btn-xs {
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 5px;
}

.note-content {
    line-height: 1.4;
    word-wrap: break-word;
}

.note-meta {
    font-size: 11px;
}

/* Notes container scrollbar styling */
.notes-container::-webkit-scrollbar {
    width: 6px;
}

.notes-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notes-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notes-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.custom-dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.custom-dropdown.open .custom-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 99999 !important;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-dropdown.open .custom-dropdown-list {
    display: block;
}

.custom-dropdown-group {
    border-bottom: 1px solid #f0f0f0;
}

.custom-dropdown-group:last-child {
    border-bottom: none;
}

.custom-dropdown-group-label {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.custom-dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-dropdown-option:last-child {
    border-bottom: none;
}

.custom-dropdown-option:hover {
    background: #f8f9fa;
}

.custom-dropdown-option.selected {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.custom-dropdown-option.hidden {
    display: none;
}

.custom-dropdown-option-name {
    font-weight: 500;
    color: #333;
}

.custom-dropdown-option-role {
    color: #666;
    font-size: 12px;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
}

.custom-dropdown-option-team {
    color: #888;
    font-size: 11px;
    margin-left: auto;
}

.custom-dropdown-no-results {
    padding: 15px 12px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    letter-spacing: -0.1px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

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

.btn-secondary:hover {
    background: #357abd;
}

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

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

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

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

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}



/* Multiple select stilleri */
select[multiple] {
    min-height: 100px;
}

select[multiple] option {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

select[multiple] option:checked {
    background: var(--primary-color);
    color: white;
}

select[multiple] option:hover {
    background: rgba(36, 36, 65, 0.1);
}

.field-error {
    display: none;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* Status tables container */
.status-tables-container {
    display: flex;
    gap: 12px;
}

/* Status table input styles */
.status-table {
    flex: 1;
}

.status-table .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 12px;
    min-height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Compact input styles for status table */
.status-table .form-control {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.status-table .date-col .form-control {
    padding: 6px 6px;
    font-size: 11px;
}

.status-table .cost-col .form-control {
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
}

.status-table .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(36, 36, 65, 0.1);
}

/* Status table styles */
.status-table {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.status-table-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 12px;
    color: #495057;
}

.status-table-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    padding: 8px 0;
}

.status-table-row:last-child {
    border-bottom: none;
}

.status-table-row:hover {
    background: #fafbfc;
}

.status-col {
    flex: 0 0 120px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.date-col {
    flex: 1;
    padding: 0 6px;
    min-width: 100px;
}

.cost-col {
    flex: 0 0 90px;
    padding: 0 6px;
    min-width: 80px;
}

.status-table-header .status-col,
.status-table-header .date-col,
.status-table-header .cost-col {
    padding: 12px 10px;
    text-align: center;
}

/* Responsive table */
@media (max-width: 768px) {
    .status-tables-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .status-table {
        font-size: 11px;
    }
    
    .status-table-header {
        font-size: 10px;
    }
    
    .status-col {
        flex: 0 0 80px;
        padding: 0 4px;
        min-width: 70px;
    }
    
    .date-col {
        flex: 1;
        padding: 0 3px;
        min-width: 80px;
    }
    
    .cost-col {
        flex: 0 0 70px;
        padding: 0 3px;
        min-width: 60px;
    }
    
    .status-table .form-control {
        padding: 4px 6px;
        font-size: 11px;
        min-height: 28px;
    }
    
    .status-table .date-col .form-control {
        padding: 4px 4px;
        font-size: 10px;
    }
    
    .status-table .cost-col .form-control {
        padding: 4px 2px;
        font-size: 10px;
        text-align: center;
    }
    
    .status-badge {
        padding: 3px 6px;
        font-size: 10px;
        max-width: 70px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .status-col {
        flex: 0 0 70px;
        padding: 0 3px;
        min-width: 60px;
    }
    
    .date-col {
        flex: 1;
        padding: 0 2px;
        min-width: 70px;
    }
    
    .cost-col {
        flex: 0 0 60px;
        padding: 0 2px;
        min-width: 50px;
    }
    
    .status-table .form-control {
        padding: 3px 4px;
        font-size: 10px;
        min-height: 26px;
    }
    
    .status-badge {
        padding: 2px 4px;
        font-size: 9px;
        max-width: 60px;
    }
    
    .status-table-header {
        font-size: 9px;
    }
}

/* Toastr Custom Styles */
#toast-container {
    z-index: 9999;
}

#toast-container > .toast {
    background-image: none !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    padding: 16px 20px;
}

#toast-container > .toast-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

#toast-container > .toast-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

#toast-container > .toast-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

#toast-container > .toast-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

#toast-container > .toast .toast-close-button {
    color: inherit;
    opacity: 0.7;
    font-size: 18px;
    font-weight: bold;
}

#toast-container > .toast .toast-close-button:hover {
    opacity: 1;
}

#toast-container > .toast .toast-progress {
    background-color: rgba(255, 255, 255, 0.3);
}

#toast-container > .toast.toast-success .toast-progress {
    background-color: rgba(40, 167, 69, 0.3);
}

#toast-container > .toast.toast-error .toast-progress {
    background-color: rgba(220, 53, 69, 0.3);
}

#toast-container > .toast.toast-warning .toast-progress {
    background-color: rgba(255, 193, 7, 0.3);
}

#toast-container > .toast.toast-info .toast-progress {
    background-color: rgba(23, 162, 184, 0.3);
}





.status-badge {
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    max-width: 110px;
    white-space: nowrap;
    display: inline-block;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.page-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.form-actions-container {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Form Layout Improvements */
.form-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

.form-group + .form-group {
    margin-top: 0;
}

/* Ensure proper alignment for all form elements */
.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Form control improvements */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    background: #fff;
    line-height: 1.4;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.08);
}

/* Textarea specific styles */
textarea.form-control {
    min-height: 40px;
    resize: vertical;
}

/* Make textarea same height as other inputs when in same row */
.row .col-md-6 textarea.form-control {
    min-height: 40px;
    height: 40px;
}

/* Select specific styles */
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Placeholder styles */
.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-size: 11px;
}

.form-control::-webkit-input-placeholder {
    color: #9ca3af;
    opacity: 1;
    font-size: 11px;
}

.form-control::-moz-placeholder {
    color: #9ca3af;
    opacity: 1;
    font-size: 11px;
}

.form-control:-ms-input-placeholder {
    color: #9ca3af;
    opacity: 1;
    font-size: 11px;
}

/* Status section specific placeholder */
.status-section .form-control::placeholder {
    font-size: 10px;
}

.status-section .form-control::-webkit-input-placeholder {
    font-size: 10px;
}

.status-section .form-control::-moz-placeholder {
    font-size: 10px;
}

.status-section .form-control:-ms-input-placeholder {
    font-size: 10px;
}

/* Required field indicator */
.form-group label[for*="required"]::after,
.form-group label:has(+ .form-control[required])::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Card spacing improvements */
.card + .card {
    margin-top: 25px;
}

.card-body {
    padding: 25px;
}

/* Card body form elements */
.card-body .form-group {
    width: 100%;
    margin-bottom: 20px;
}

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

.card-body .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* Row form group spacing */
.row .form-group {
    margin-bottom: 20px;
    width: 100%;
}

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

/* Column spacing for form groups */
.col-md-4 .form-group,
.col-md-6 .form-group,
.col-md-8 .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.col-md-4 .form-group:last-child,
.col-md-6 .form-group:last-child,
.col-md-8 .form-group:last-child {
    margin-bottom: 0;
}

/* Ensure columns have proper width */
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.col-md-4 > *,
.col-md-6 > *,
.col-md-8 > *,
.col-md-12 > * {
    width: 100%;
}

/* Specific form alignment fixes */
#projectAddForm .form-group {
    width: 100%;
    margin-bottom: 20px;
}

#projectAddForm .form-control {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

#projectAddForm .row .col-md-6 .form-group {
    width: 100%;
    margin-bottom: 20px;
}

#projectAddForm .row .col-md-6 .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* Team option styles */
.team-option {
    display: none;
}

.team-option.show {
    display: block;
}

/* Main content spacing */
.main-content {
    padding: 30px;
    background: #fafbfc;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
}



/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    margin-top: 15px;
    border: 1px solid rgba(0,0,0,0.04);
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 13px;
}

.table th {
    background: #f8f9fa;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: #fafbfc;
    transition: background 0.15s ease;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-open { background: #e8e8e8; color: #333; }
.badge-analysis { background: #17A2B8; color: white; }
.badge-technical_design { background: #6F42C1; color: white; }
.badge-development { background: #186FFD; color: white; }
.badge-internal_test { background: #FEC106; color: #333; }
.badge-integration { background: #DC3545; color: white; }
.badge-demo { background: #20C997; color: white; }
.badge-functional { background: #FD7E14; color: white; }
.badge-uat { background: #6C757D; color: white; }
.badge-regression { background: #21252A; color: white; }
.badge-production { background: #198754; color: white; }

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -20px;
}

.col {
    flex: 1;
    padding: 0 20px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* Bootstrap-like grid classes */
.col-md-1 { flex: 0 0 8.333333%; }
.col-md-2 { flex: 0 0 16.666667%; }
.col-md-3 { flex: 0 0 25%; }
.col-md-4 { flex: 0 0 33.333333%; }
.col-md-6 { flex: 0 0 50%; }
.col-md-8 { flex: 0 0 66.666667%; }
.col-md-9 { flex: 0 0 75%; }
.col-md-12 { flex: 0 0 100%; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-container {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 400px;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 400px;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 20px;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.modal-header button[data-close-modal] {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header button[data-close-modal]:hover {
    color: var(--danger-color);
}

.modal-header .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .btn-close:hover {
    color: var(--danger-color);
}

.modal-footer {
    margin-top: 25px;
    text-align: right;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

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

/* Responsive */
@media (max-width: 1400px) {
    .container {
        max-width: 95%;
        padding: 0 35px;
    }
    
    .row {
        margin: 0 -25px;
    }
    
    .col {
        padding: 0 25px;
    }
    
    .card {
        padding: 25px;
        margin-bottom: 45px;
    }
}

@media (max-width: 1200px) {
    .nav-link {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .container {
        max-width: 98%;
        padding: 0 30px;
    }
    
    .row {
        margin: 0 -22px;
    }
    
    .col {
        padding: 0 22px;
    }
    
    .card {
        padding: 22px;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 10px 20px;
    }
    
    .nav {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .main-content {
        margin-top: 150px;
        padding: 30px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 25px;
    }
    
    .row {
        margin: 0 -15px;
    }
    
    .col {
        flex: 0 0 100%;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .logo img {
        height: 35px;
    }
}

/* Scroll Styles */
.scrollable-content {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Project History Scroll */
.project-history-scroll {
    max-height: 400px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.project-history-scroll::-webkit-scrollbar {
    width: 6px;
}

.project-history-scroll::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.project-history-scroll::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.project-history-scroll::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Override card-body styles for project history */
.card .card-body.project-history-scroll,
div[class*="card-body"][class*="project-history-scroll"] {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
}

/* Project Detail Layout - Balanced spacing */
.col-md-9 {
    padding-right: 15px;
}

.col-md-3 {
    padding-left: 15px;
}

/* Tab Styles */
.tab-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

.tab-button:hover {
    background: rgba(74, 144, 226, 0.1);
    color: var(--secondary-color);
}

.tab-button.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 0;
}

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

.tab-content .card {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.tab-content .card-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.tab-content .card-body {
    padding: 20px;
}

/* Responsive tab adjustments */
@media (max-width: 768px) {
    .tab-button {
        min-width: 100px;
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .tab-header {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Türkçe Tarih Input Stilleri */
input[type="date"] {
    font-family: inherit;
    position: relative;
}

/* Date input'un Türkçe görünümü için */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23666" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM4 21V8h16v13H4z"/></svg>');
    opacity: 0.6;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Date input için placeholder benzeri görünüm */
input[type="date"]:invalid:not(:focus):not(:placeholder-shown) {
    color: #999;
}

input[type="date"]:before {
    content: attr(placeholder) !important;
    color: #999;
    margin-right: 0.5em;
}

input[type="date"]:valid:before {
    display: none;
}

/* Türkçe tarih formatını desteklemek için */
input[type="date"][lang="tr-TR"] {
    text-align: left;
    direction: ltr;
}

/* Date input focus durumunda */
input[type="date"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -1px;
}
