/* ============================================
   Modern Form Portal - Main CSS
   Tenant Color & Logo Support
   ============================================ */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --secondary: #8b5cf6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Tenant color ile gradient arka plan */
    background: linear-gradient(135deg, var(--tenant-color), var(--tenant-color-dark));
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tenant-color), var(--tenant-color-dark));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--tenant-color);
}

/* ============================================
   Animated Background (Tenant Color)
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, var(--tenant-color-light), transparent 50%),
        radial-gradient(circle at 80% 80%, var(--tenant-color-medium), transparent 50%),
        radial-gradient(circle at 40% 20%, var(--tenant-color-lighter), transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.container {
    position: relative;
    z-index: 1;
}

/* ============================================
   Navbar (Tenant Logo + Color)
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--gray-900) !important;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.navbar-brand i {
    font-size: 1.5rem;
    color: var(--tenant-color);
}

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--tenant-color) !important;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.05);
}

footer a {
    color: var(--gray-600) !important;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--tenant-color) !important;
}

/* ============================================
   Form Cards
   ============================================ */
.form-card {
    border: none !important;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    height: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.form-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.form-card:hover::before {
    opacity: 1;
}

.form-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.form-card:hover .form-icon {
    transform: scale(1.1) rotate(5deg);
}

.stats-container {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--gray-100);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-form {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s;
    border: none;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.btn-form::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn-form:hover::before {
    width: 300px;
    height: 300px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.last-update {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.last-update i {
    margin-right: 0.375rem;
}

/* ============================================
   Badges
   ============================================ */
.badge-modern {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.badge-inactive {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* ============================================
   Page Headers (Tenant Color Border)
   ============================================ */
.page-header-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--tenant-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-description {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* ============================================
   Search & Filter Section
   ============================================ */
.search-filter-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.search-input, .filter-select {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
    background: white;
}

.search-input:focus, .filter-select:focus {
    border-color: var(--tenant-color);
    box-shadow: 0 0 0 4px var(--tenant-color-light);
    outline: none;
}

/* ============================================
   No Results
   ============================================ */
.no-results {
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.no-results i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

/* ============================================
   Form Detail Page - Stats Cards
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--tenant-color), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tenant-color), var(--tenant-color-dark));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--tenant-color);
}

/* ============================================
   Form Progress Bar
   ============================================ */
.form-progress-container {
    margin: 1.5rem 0 2rem;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.form-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.form-progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-progress-percentage {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--tenant-color);
}

.form-progress-bar-wrapper {
    position: relative;
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: hidden;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tenant-color), var(--tenant-color-dark));
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.form-progress-text {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    text-align: center;
}

/* ============================================
   Form Detail Page - Hero Header (Tenant Color)
   ============================================ */
.hero-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--tenant-color);
}

.hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   Form Detail Page - Form Card (Tenant Color Header)
   ============================================ */
.form-detail-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.form-header {
    background: linear-gradient(135deg, var(--tenant-color), var(--tenant-color-dark));
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-header-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    backdrop-filter: blur(10px);
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.form-header p {
    opacity: 0.9;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.form-body {
    padding: 2.5rem;
}

/* ============================================
   Form Inputs (Tenant Color Focus)
   ============================================ */
.form-label {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-label i {
    font-size: 1rem;
    color: var(--tenant-color);
}

.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:hover {
    border-color: var(--gray-300);
}

.form-control:focus, .form-select:focus {
    border-color: var(--tenant-color);
    box-shadow: 0 0 0 4px var(--tenant-color-light);
    outline: none;
    background: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Submit Button (Tenant Color Gradient)
   ============================================ */
.btn-submit {
    background: linear-gradient(135deg, var(--tenant-color), var(--tenant-color-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 3rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   Sidebar Cards
   ============================================ */
.sidebar-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sidebar-card h6 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card h6 i {
    font-size: 1.25rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.info-value {
    color: var(--gray-900);
    font-weight: 600;
    font-size: 0.875rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    background: white;
}

.quick-action-btn:hover {
    border-color: var(--tenant-color);
    color: var(--tenant-color);
    background: var(--tenant-color-light);
    transform: translateX(4px);
}

.quick-action-btn i {
    font-size: 1.25rem;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.form-item:nth-child(1) { animation-delay: 0.05s; }
.form-item:nth-child(2) { animation-delay: 0.1s; }
.form-item:nth-child(3) { animation-delay: 0.15s; }
.form-item:nth-child(4) { animation-delay: 0.2s; }
.form-item:nth-child(5) { animation-delay: 0.25s; }
.form-item:nth-child(6) { animation-delay: 0.3s; }
.form-item:nth-child(7) { animation-delay: 0.35s; }
.form-item:nth-child(8) { animation-delay: 0.4s; }
.form-item:nth-child(9) { animation-delay: 0.45s; }

.animate-in {
    animation: fadeInUp 0.6s ease-out backwards;
}

.animate-in-1 { animation-delay: 0.1s; }
.animate-in-2 { animation-delay: 0.2s; }
.animate-in-3 { animation-delay: 0.3s; }
.animate-in-4 { animation-delay: 0.4s; }
.animate-in-5 { animation-delay: 0.5s; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .page-header-section,
    .hero-header {
        padding: 2rem 1.5rem;
    }

    .form-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .hero-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .form-body {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar-logo {
        height: 32px;
    }
}
