/* Anthaven E-Teklif Sistemi - Custom Styles */

/* ===== COUNTDOWN TIMER ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(229, 57, 53, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(229, 57, 53, 0.6);
    }
}

/* Modern Countdown Timer */
.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem;
    background: white;
    border-radius: 6px;
}

.countdown-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.countdown-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: white;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.countdown-separator {
    font-size: 1rem;
    font-weight: 700;
    color: #999;
    margin: 0 0.1rem;
    padding-bottom: 0.8rem;
}

.countdown-label {
    font-size: 0.55rem;
    font-weight: 500;
    color: #666;
    margin-top: 0.2rem;
    text-transform: capitalize;
}

/* Timer Color States */
.timer-normal .countdown-value {
    color: #4CAF50;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.timer-normal .countdown-separator {
    color: #4CAF50;
}

.timer-warning .countdown-value {
    color: #FF9800;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
}

.timer-warning .countdown-separator {
    color: #FF9800;
}

.timer-critical .countdown-value {
    color: #E53935;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    animation: pulse 1.5s infinite;
}

.timer-critical .countdown-separator {
    color: #E53935;
    animation: pulse 1.5s infinite;
}

.countdown-expired {
    text-align: center;
    padding: 1.5rem;
    color: #E53935;
    font-weight: 700;
    font-size: 1.2rem;
    animation: pulse 1s infinite;
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-radius: 12px;
}

/* Timer in Header */
.timer-header.timer-normal {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
}

.timer-header.timer-warning {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.timer-header.timer-critical {
    background: linear-gradient(135deg, #E53935 0%, #C62828 100%);
    color: white;
    animation: glow 1.5s infinite;
}

.timer-header .countdown-timer {
    background: transparent;
    gap: 0.1rem;
    padding: 0;
    justify-content: center;
}

.timer-header .countdown-value {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.3rem;
    min-width: 22px;
    box-shadow: none;
}

.timer-header .countdown-separator {
    color: white;
    font-size: 0.75rem;
    padding-bottom: 0.6rem;
}

.timer-header .countdown-label {
    font-size: 0.45rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== GENEL AYARLAR ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Tüm kartlar için max-width güvencesi */
.card, .detail-container, .container {
    max-width: 100%;
    box-sizing: border-box;
}

:root {
    --color-stone-white: #F7F6F3;
    --color-sea-blue: #7AAFC2;
    --color-dark-gray: #333333;
    --color-sand-beige: #E4DCCF;
    --color-white: #FFFFFF;
    --color-success: #4CAF50;
    --color-error: #f44336;
    --color-warning: #ff9800;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-stone-white);
    color: var(--color-dark-gray);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-dark-gray);
}

a {
    color: var(--color-sea-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-dark-gray);
}

/* ===== LAYOUT ===== */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

/* ===== HEADER / NAVBAR ===== */
.top-navbar {
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1001;
}

.logo-container img {
    height: 45px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark-gray);
}

/* Hamburger Menu Button - Sadece mobile'da görünür */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-dark-gray);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Navigation Menu Wrapper */
.nav-menu-wrapper {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
}

.nav-menu a {
    color: var(--color-dark-gray);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background-color: var(--color-sand-beige);
    color: var(--color-sea-blue);
}

.nav-menu a.active {
    background-color: var(--color-sea-blue);
    color: var(--color-white);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-sea-blue);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== KARTLAR ===== */
.card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.real-estate-card {
    display: flex;
    flex-direction: column;
}

.card-header {
    border-bottom: 2px solid var(--color-sand-beige);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark-gray);
}

/* ===== FORM ELEMANLARI ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-dark-gray);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-sand-beige);
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--color-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-sea-blue);
    box-shadow: 0 0 0 3px rgba(122, 175, 194, 0.1);
}

.form-control::placeholder {
    color: #999;
}

/* Password Toggle Button */
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--color-sea-blue);
}

.toggle-password:focus {
    outline: none;
}

/* ===== BUTONLAR ===== */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-sea-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #6a9fb2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 175, 194, 0.3);
}

.btn-secondary {
    background-color: var(--color-sand-beige);
    color: var(--color-dark-gray);
}

.btn-secondary:hover {
    background-color: #d4ccbf;
}

.btn-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.btn-danger {
    background-color: var(--color-error);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-sea-blue);
    color: var(--color-sea-blue);
}

.btn-outline:hover {
    background-color: var(--color-sea-blue);
    color: var(--color-white);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== LOGIN SAYFASI ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-stone-white) 0%, var(--color-sand-beige) 100%);
}

.login-card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-width: 450px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.login-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--color-dark-gray);
}

/* ===== DASHBOARD KARTLARI ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--color-sea-blue);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-sea-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--color-white);
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--color-sand-beige);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--color-dark-gray);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: var(--color-sand-beige);
    color: var(--color-dark-gray);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--color-sand-beige);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== TABLO ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Tablo için minimum genişlik - horizontal scroll için */
/*.table-responsive .data-table {
    min-width: 900px;
}*/

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: var(--color-sand-beige);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-dark-gray);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-sand-beige);
}

.data-table tbody tr:hover {
    background-color: var(--color-stone-white);
}

/* Modern scroll bar - Tablo için */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #F7F6F3;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #7AAFC2;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #6a9fb2;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.badge-warning {
    background-color: var(--color-warning);
    color: var(--color-white);
}

.badge-danger {
    background-color: var(--color-error);
    color: var(--color-white);
}

.badge-info {
    background-color: var(--color-sea-blue);
    color: var(--color-white);
}

/* ===== ALERT / BİLDİRİMLER ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--color-success);
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--color-error);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--color-warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--color-sea-blue);
}

/* ===== TIMER (SAYAÇ) ===== */
.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-sea-blue);
    text-align: center;
    padding: 1rem;
    background-color: var(--color-stone-white);
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}

.timer-warning {
    color: var(--color-warning);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Hamburger Menu Button - Mobile'da göster */
    .hamburger-menu {
        display: flex;
    }
    
    /* Logo Text - Mobile'da küçült */
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-container img {
        height: 35px;
    }
    
    /* Tablo - Mobil */
    .table-responsive {
        margin: -0.5rem;
        padding: 0.5rem;
        border-radius: 8px;
    }
    
    .table-responsive .data-table {
        min-width: 750px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .data-table th {
        font-size: 0.8rem;
    }
    
    /* Container padding */
    .container {
        padding: 0 0.5rem !important;
    }
    
    /* Card padding */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Butonlar mobilde küçük */
    .btn-sm {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.6rem !important;
    }
    
    /* Badge mobilde küçük */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    /* Timer table mobilde küçük */
    .timer-display-table {
        font-size: 0.85rem !important;
    }
    
    .timer-display-table .countdown-value {
        font-size: 0.8rem !important;
        padding: 0.15rem 0.3rem !important;
        min-width: 24px !important;
    }
    
    .timer-display-table .countdown-label {
        font-size: 0.5rem !important;
    }
    
    .timer-display-table .countdown-separator {
        font-size: 0.8rem !important;
    }
    
    /* Navigation Menu Wrapper - Mobile'da full screen sidebar */
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 0 1rem 0;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu-wrapper.active {
        right: 0;
    }
    
    /* Navigation Menu - Mobile'da vertical */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-sand-beige);
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 0.75rem 1.5rem;
        border-radius: 0;
        font-size: 0.9rem;
    }
    
    .nav-menu a:hover {
        background-color: var(--color-stone-white);
    }
    
    .nav-menu a.active {
        border-left: 4px solid var(--color-sea-blue);
        background-color: var(--color-stone-white);
        color: var(--color-sea-blue);
    }
    
    /* User Info - Mobile'da vertical */
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 1rem 1.5rem;
        border-top: 2px solid var(--color-sand-beige);
        margin-top: auto;
        gap: 0.75rem;
        background-color: var(--color-stone-white);
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .user-name {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        animation: fadeIn 0.3s;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ===== MODERN MODAL SYSTEM ===== */
.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modern-modal-overlay.active {
    opacity: 1;
}

.modern-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modern-modal-overlay.active .modern-modal-content {
    transform: translateY(0);
}

.modern-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E4DCCF;
}

.modern-modal-body {
    padding: 1.5rem;
}

.modern-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E4DCCF;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Modal animasyonları */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modern-modal-overlay.active .modern-modal-content {
    animation: modalFadeIn 0.3s ease;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modern-modal-content {
        max-width: 95%;
        margin: 0 1rem;
    }
    
    .modern-modal-header,
    .modern-modal-body,
    .modern-modal-footer {
        padding: 1rem;
    }
}