/* Özel Teklif Portalı - Yeni Toprak Tonları Paleti */

/* CSS Variables - Yeni Renk Paleti */
:root {
    --primary-dark: #5B4636;      /* Koyu kahve */
    --primary-warm: #B66E41;      /* Sıcak kahve */
    --bg-cream: #E4D4C0;          /* Krem arka plan */
    --accent-beige: #C1B7A2;      /* Bej accent */
    --accent-green: #7D7F3B;      /* Toprak yeşil */
    
    /* Derived colors */
    --text-primary: #2c2418;
    --text-muted: #6b6154;
    --border-soft: rgba(91, 70, 54, 0.2);
    --shadow-soft: rgba(91, 70, 54, 0.1);
    --success: var(--accent-green);
    --warning: var(--primary-warm);
    --error: #B85A42;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-cream) 0%, #f2e8d8 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Container */
.otp-portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

/* Header - Invoice Style */
.otp-portal-header,
.otp-detail-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.otp-portal-header::before,
.otp-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-warm), var(--accent-green));
}

.header-nav {
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-warm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--primary-warm);
    color: white;
    transform: translateX(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(182, 110, 65, 0.3);
}

.header-title h1 {
    margin: 0 0 16px;
    color: var(--primary-dark);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.teklif-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
    background: rgba(193, 183, 162, 0.2);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
}

.meta-divider {
    color: var(--accent-beige);
    font-weight: bold;
}

.header-status {
    margin-top: 20px;
}

/* Status Badges - Professional */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 2px solid transparent;
    box-shadow: 0 4px 12px var(--shadow-soft);
}

.status-beklemede {
    background: linear-gradient(135deg, rgba(91, 70, 54, 0.15), rgba(91, 70, 54, 0.25));
    color: var(--primary-dark);
    border-color: var(--border-soft);
}

.status-onaylandi {
    background: linear-gradient(135deg, rgba(125, 127, 59, 0.15), rgba(125, 127, 59, 0.25));
    color: var(--accent-green);
    border-color: rgba(125, 127, 59, 0.3);
}

.status-revize {
    background: linear-gradient(135deg, rgba(182, 110, 65, 0.15), rgba(182, 110, 65, 0.25));
    color: var(--primary-warm);
    border-color: rgba(182, 110, 65, 0.3);
}

/* Stats Grid - Card Layout */
.otp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-soft);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-warm), var(--accent-green));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(91, 70, 54, 0.2);
    border-color: var(--primary-warm);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 12px;
    filter: grayscale(20%);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Content Sections - Invoice Style */
.otp-content-section,
.content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--shadow-soft);
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent-beige);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-warm), var(--accent-green));
}

.section-header h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 700;
}

.refresh-btn {
    background: linear-gradient(135deg, var(--primary-warm), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(182, 110, 65, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(182, 110, 65, 0.4);
}

/* Content Box */
.content-box {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 24px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Services Table - Professional */
.services-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-soft);
    box-shadow: 0 4px 16px var(--shadow-soft);
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 700px;
}

.services-table thead {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-warm));
    color: white;
}

.services-table th {
    padding: 20px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.services-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    font-size: 14px;
}

.services-table tbody tr:hover {
    background: rgba(182, 110, 65, 0.05);
}

.services-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 600;
}

/* Price Summary - Invoice Style */
.price-summary {
    background: linear-gradient(135deg, var(--bg-cream), #f0e3d0);
    border: 2px solid var(--accent-beige);
    border-radius: 16px;
    padding: 28px;
    max-width: 450px;
    margin-left: auto;
    box-shadow: 0 8px 24px var(--shadow-soft);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border-soft);
}

.price-row:last-child {
    border-bottom: none;
}

.price-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-warm), var(--accent-green));
    margin: 20px 0;
}

.price-row.total {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark);
    padding-top: 20px;
    margin-top: 12px;
    border-top: 2px solid var(--primary-warm);
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    margin: 16px -12px -12px;
    border-radius: 12px;
}

/* Offers Grid - Card Layout */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.offer-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px var(--shadow-soft);
    position: relative;
}

.offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-warm), var(--accent-green));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.offer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(91, 70, 54, 0.2);
    border-color: var(--primary-warm);
}

.offer-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-cream), var(--accent-beige));
    padding: 24px;
    border-bottom: 1px solid var(--border-soft);
}

.card-header h3 {
    margin: 0 0 12px;
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 700;
}

.offer-status {
    font-size: 13px;
    font-weight: 500;
}

.card-body {
    padding: 24px;
}

.offer-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.offer-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(193, 183, 162, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-soft);
}

.price-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
}

/* Buttons - Professional */
.card-actions,
.action-buttons {
    padding: 20px 24px;
    background: rgba(228, 212, 192, 0.3);
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary,
.btn-success,
.btn-warning,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-shadow: 0 4px 12px var(--shadow-soft);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-warm), var(--primary-dark));
    color: white;
    border-color: var(--primary-warm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #4a3429);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 110, 65, 0.4);
    text-decoration: none;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #6b6d32);
    color: white;
    border-color: var(--accent-green);
}

.btn-success:hover {
    background: linear-gradient(135deg, #6b6d32, #5a5c2a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(125, 127, 59, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--primary-warm), #a85e37);
    color: white;
    border-color: var(--primary-warm);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #a85e37, #965530);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 110, 65, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    border-color: var(--border-soft);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-warm);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-soft);
    text-decoration: none;
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-warm);
    border-color: var(--primary-warm);
}

.btn-outline:hover {
    background: var(--primary-warm);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Action Buttons Row */
.action-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.action-buttons .btn-primary,
.action-buttons .btn-success,
.action-buttons .btn-warning {
    flex: 1;
    min-width: 140px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 80px;
    opacity: 0.4;
    margin-bottom: 20px;
    filter: grayscale(50%);
}

.empty-state h3 {
    color: var(--primary-dark);
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
}

.empty-state p {
    margin: 0 0 32px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-warm), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(182, 110, 65, 0.3);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(182, 110, 65, 0.4);
    text-decoration: none;
    color: white;
}

/* Messages */
.success-message,
.info-message {
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 2px solid transparent;
}

.success-message {
    background: linear-gradient(135deg, rgba(125, 127, 59, 0.15), rgba(125, 127, 59, 0.25));
    color: var(--accent-green);
    border-color: rgba(125, 127, 59, 0.3);
}

.info-message {
    background: linear-gradient(135deg, rgba(182, 110, 65, 0.15), rgba(182, 110, 65, 0.25));
    color: var(--primary-warm);
    border-color: rgba(182, 110, 65, 0.3);
}

/* Login Page - Professional */
.otp-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-cream) 0%, #f2e8d8 100%);
}

.otp-login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 16px 48px var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.otp-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-warm), var(--accent-green));
}

.otp-header {
    text-align: center;
    margin-bottom: 32px;
}

.otp-header h1 {
    color: var(--primary-dark);
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 800;
}

.otp-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 15px;
}

.otp-login-content h2 {
    color: var(--primary-dark);
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.otp-form {
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    font-size: 16px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-warm);
    box-shadow: 0 0 0 4px rgba(182, 110, 65, 0.1);
    background: white;
}

.otp-btn-primary {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-warm), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(182, 110, 65, 0.3);
}

.otp-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #4a3429);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(182, 110, 65, 0.4);
}

.otp-info-box {
    background: rgba(193, 183, 162, 0.2);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.otp-info-box h3 {
    margin: 0 0 16px;
    color: var(--primary-dark);
    font-size: 16px;
    font-weight: 700;
}

.otp-info-box ol {
    margin: 0 0 16px;
    padding-left: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.security-note {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Success/Error Messages */
.otp-success {
    background: linear-gradient(135deg, rgba(125, 127, 59, 0.15), rgba(125, 127, 59, 0.25));
    color: var(--accent-green);
    border: 2px solid rgba(125, 127, 59, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-weight: 600;
}

.otp-error {
    background: linear-gradient(135deg, rgba(184, 90, 66, 0.15), rgba(184, 90, 66, 0.25));
    color: var(--error);
    border: 2px solid rgba(184, 90, 66, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .otp-portal-container {
        padding: 16px;
    }
    
    .otp-portal-header,
    .otp-detail-header {
        padding: 24px;
    }
    
    .header-title h1 {
        font-size: 24px;
    }
    
    .teklif-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .otp-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .content-section {
        padding: 24px;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .price-summary {
        max-width: 100%;
        margin-left: 0;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .services-table-wrapper {
        margin: -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 480px) {
    .otp-portal-container {
        padding: 12px;
    }
    
    .otp-portal-header,
    .otp-detail-header {
        padding: 20px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .services-table th,
    .services-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .otp-login-card {
        padding: 28px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 600;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .otp-portal-header,
    .content-section {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .btn-primary,
    .btn-success,
    .btn-warning {
        background: #666 !important;
        color: white !important;
    }
}