/**
 * Custom Styles for Platform SUV
 * MVP Version - Minimal and Clean Design
 */

/* Root variables for consistent theming */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.15s ease-in-out;
}

/* General body styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    font-size: 14px;
    line-height: 1.6;
}

/* Custom navbar styles */
.navbar-brand {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Statistics cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info,
.card.bg-danger {
    border: none;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-info:hover,
.card.bg-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
}

/* Form elements */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #087990;
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* List groups */
.list-group-item {
    border-left: none;
    border-right: none;
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
}

.table td {
    vertical-align: middle;
}

/* Dropdown menus */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
}

.dropdown-item {
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

/* Custom utilities */
.text-gradient-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.shadow-soft {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-medium {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
}

.shadow-strong {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Footer styles */
footer {
    margin-top: auto;
    background-color: var(--light-color) !important;
}

/* Telegram-style Chat */
.chat-container {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 1rem;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeInMessage 0.3s ease-out;
}

.chat-message.own-message {
    justify-content: flex-end;
}

.chat-message.other-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message-bubble.own-bubble {
    background: linear-gradient(135deg, #dcf8c6 0%, #c8e6c9 100%);
    color: #2e7d32;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-bubble.other-bubble {
    background: #ffffff;
    color: #333333;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.75rem;
}

.message-author {
    font-weight: 600;
    color: #1976d2;
}

.message-time {
    color: #666666;
    font-size: 0.7rem;
    opacity: 0.8;
}

.message-content {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.message-bubble.own-bubble .message-author {
    color: #2e7d32;
}

.message-bubble.own-bubble .message-time {
    color: #4caf50;
}

/* Highlight için son mesaj */
.chat-message.latest-message .message-bubble {
    border: 2px solid #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Sticky chat form */
.chat-form-container {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
    border-radius: 0 0 12px 12px;
    margin-top: -1rem;
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: end;
}

.chat-textarea {
    flex: 1;
    resize: none;
    border-radius: 20px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 0.9rem;
    min-height: 40px;
    max-height: 120px;
}

.chat-textarea:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    outline: none;
}

.chat-send-btn {
    background: #4caf50;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* Empty state */
.chat-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.chat-empty i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* Animatsiyalar */
@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Role badges in chat */
.message-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.65rem;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: 500;
}

.badge-assigner {
    background-color: #fff3cd;
    color: #856404;
}

.badge-assignee {
    background-color: #cff4fc;
    color: #055160;
}

/* Responsive */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
    }
    
    .chat-container {
        padding: 10px;
        max-height: 300px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* LOGIN PAGE STYLES - Video Background */

/* Login page body */
.login-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Background video */
.login-bg-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
}

/* Video overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: -1;
}

/* Main login wrapper */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 10%;
    position: relative;
    z-index: 2;
}

/* Brand section */
.brand-box {
    color: #fff;
    max-width: 520px;
    animation: slideInLeft 0.8s ease-out;
}

.brand-icon {
    margin-bottom: 2rem;
}

.brand-icon i {
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.brand-box h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.brand-box p {
    font-size: 1.25rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Login card */
.login-card {
    width: 430px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: slideInRight 0.8s ease-out;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Login card header */
.login-card-header {
    padding: 2.5rem 2rem 1.5rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card-header h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-card-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

/* Login card body */
.login-card-body {
    padding: 2rem;
}

/* Form groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group-check {
    margin-bottom: 2rem;
}

/* Form labels */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modern form controls */
.form-control-modern {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(13, 110, 253, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-control-modern::placeholder {
    color: #6c757d;
    font-size: 14px;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Modern button */
.btn-modern {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a73e7 0%, #6d4396 100%);
}

.btn-modern:active {
    transform: translateY(0);
}

/* Alert modern */
.alert-modern {
    padding: 15px 20px;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    font-size: 14px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    backdrop-filter: blur(10px);
}

/* Login footer */
.login-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    background: rgba(248, 249, 250, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE DESIGN */

/* Tablet Portrait */
@media (max-width: 991px) {
    .login-wrapper {
        flex-direction: column;
        justify-content: center;
        padding: 40px 8%;
        text-align: center;
    }
    
    .brand-box {
        max-width: none;
        margin-bottom: 3rem;
    }
    
    .brand-box h1 {
        font-size: 3rem;
    }
    
    .login-card {
        width: 100%;
        max-width: 450px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .login-wrapper {
        justify-content: center;
        padding: 20px;
    }
    
    .brand-box {
        display: none;
    }
    
    .login-card {
        width: 100%;
        max-width: 420px;
        animation: slideInUp 0.8s ease-out;
    }
    
    .login-card-header {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }
    
    .login-card-header h4 {
        font-size: 1.5rem;
    }
    
    .login-card-body {
        padding: 1.5rem;
    }
    
    .login-footer {
        padding: 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .login-card-header {
        padding: 1.5rem 1rem 1rem 1rem;
    }
    
    .login-card-body {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .login-footer {
        padding: 1rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .login-wrapper {
        padding: 80px 8%;
    }
    
    .brand-box h1 {
        font-size: 4rem;
    }
    
    .brand-box p {
        font-size: 1.35rem;
    }
    
    .login-card {
        width: 480px;
    }
    
    .login-card-header {
        padding: 3rem 2.5rem 2rem 2.5rem;
    }
    
    .login-card-body {
        padding: 2.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
}