/* =====================================================
   Proje Takip Paneli - Modern Tasarım (Light Theme)
   ===================================================== */

:root {
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent-red: #ef4444;
    --accent-red-dark: #dc2626;
    --accent-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Ay renkleri - Excel'deki renklere benzer */
    --month-1: #ffebee;
    /* Ocak - Kırmızı */
    --month-2: #fce4ec;
    /* Şubat - Pembe */
    --month-3: #fff3e0;
    /* Mart - Turuncu */
    --month-4: #fff8e1;
    /* Nisan - Sarı */
    --month-5: #f1f8e9;
    /* Mayıs - Açık Yeşil */
    --month-6: #e8f5e9;
    /* Haziran - Yeşil */
    --month-7: #e0f7fa;
    /* Temmuz - Cyan */
    --month-8: #e3f2fd;
    /* Ağustos - Mavi */
    --month-9: #e8eaf6;
    /* Eylül - İndigo */
    --month-10: #fce4ec;
    /* Ekim - Pembe */
    --month-11: #f3e5f5;
    /* Kasım - Mor */
    --month-12: #ede7f6;
    /* Aralık - Lavanta */
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(239, 68, 68, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    z-index: -1;
}

/* =====================================================
   Header
   ===================================================== */

.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    flex: 1;
    display: flex;
    align-items: center;
}

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

.header-title {
    flex: 2;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.auth-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-btn:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.auth-btn.logout {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.auth-btn.logout:hover {
    background: #dc2626;
    color: #fff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* =====================================================
   Main Layout
   ===================================================== */

.main-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.year-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.year-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

/* User Section */
.user-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-section:last-child {
    margin-bottom: 0;
}

.user-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--user-color, #6b7280);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
}

.user-content {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 0;
    align-items: start;
}

@media (max-width: 1200px) {
    .user-content {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Calendar Grid
   ===================================================== */

.calendar-section {
    overflow: hidden;
}

.year-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-btn:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    background: var(--border-color);
}

.month-column {
    background: #ffffff;
    min-height: 200px;
}

.month-header {
    padding: 8px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Ay başlıkları için renkler */
.month-column[data-month="1"] .month-header {
    background: var(--month-1);
    color: #c62828;
}

.month-column[data-month="2"] .month-header {
    background: var(--month-2);
    color: #ad1457;
}

.month-column[data-month="3"] .month-header {
    background: var(--month-3);
    color: #ef6c00;
}

.month-column[data-month="4"] .month-header {
    background: var(--month-4);
    color: #f9a825;
}

.month-column[data-month="5"] .month-header {
    background: var(--month-5);
    color: #558b2f;
}

.month-column[data-month="6"] .month-header {
    background: var(--month-6);
    color: #2e7d32;
}

.month-column[data-month="7"] .month-header {
    background: var(--month-7);
    color: #00838f;
}

.month-column[data-month="8"] .month-header {
    background: var(--month-8);
    color: #1565c0;
}

.month-column[data-month="9"] .month-header {
    background: var(--month-9);
    color: #283593;
}

.month-column[data-month="10"] .month-header {
    background: var(--month-10);
    color: #ad1457;
}

.month-column[data-month="11"] .month-header {
    background: var(--month-11);
    color: #6a1b9a;
}

.month-column[data-month="12"] .month-header {
    background: var(--month-12);
    color: #4527a0;
}

.month-content {
    padding: 8px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Proje kartları */
.project-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.project-card:hover {
    background: #fef2f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    border-color: var(--accent-red);
}

.project-card .project-name {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.project-card .project-actions {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    gap: 4px;
}

.project-card:hover .project-actions {
    display: flex;
}

.project-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent-red);
    color: white;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-divider {
    margin: 16px 0;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.project-card .action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.08), -1px -1px 3px rgba(255, 255, 255, 0.9);
}

.project-card .action-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
    transition: all 0.2s ease;
}

.project-card .action-btn.edit {
    color: #3b82f6;
}

.project-card .action-btn.edit:hover {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.project-card .action-btn.delete {
    color: #ef4444;
}

.project-card .action-btn.delete:hover {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Hücreye tıklama alanı */
.add-project-zone {
    flex: 1;
    min-height: 50px;
    border: 2px dashed transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-size: 12px;
}

.add-project-zone:hover {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
    color: var(--accent-red);
}

/* =====================================================
   Yapım Aşamasındaki Sidebar
   ===================================================== */

.yapim-section {
    background: #fff;
    border-left: 1px solid var(--border-color);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.yapim-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
}

.yapim-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 8px;
}

.yapim-header h3::before {
    content: '🚧';
}

.yapim-list {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
}

.yapim-item {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    transition: all 0.2s;
}

.yapim-item:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateX(4px);
}

.yapim-item.dragging {
    opacity: 0.5;
}

.yapim-item .item-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.yapim-item:hover .item-actions {
    opacity: 1;
}

.yapim-item .action-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yapim-item .action-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.yapim-item .action-btn.edit {
    color: #3b82f6;
}

.yapim-item .action-btn.edit:hover {
    background: #3b82f6;
    color: white;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
}

.yapim-item .action-btn.delete {
    color: #ef4444;
}

.yapim-item .action-btn.delete:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
}

.yapim-add-btn {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.05);
    border: 2px dashed rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--accent-red);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.yapim-add-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* =====================================================
   Modal
   ===================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-red);
    background: #fff;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.modal-actions .btn {
    flex: 1;
}

/* =====================================================
   Toast Notifications
   ===================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.success::before {
    content: '✓';
    color: var(--success);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.error::before {
    content: '✕';
    color: var(--danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================================
   Loading State
   ===================================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1200px) {
    .yapim-section {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 16px;
    }

    .calendar-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .month-column {
        min-height: 200px;
    }

    .header-content {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}