/* style.css - MODERN TASARIM */

/* VARIABLES */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 10px;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* LOGIN PAGE */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    width: 100%;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-logo p {
    color: #7f8c8d;
    font-size: 14px;
}

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

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

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fee;
    color: var(--danger-color);
    border: 1px solid #fcc;
}

/* NAVBAR */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0 30px;
    height: 90px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    padding: 15px 20px !important;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 5px;
}

.navbar-nav .nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    background: var(--primary-color);
    color: white !important;
}

/* MAIN CONTENT */
.main-container {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
}

.content-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* TABLES */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background: var(--secondary-color);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* FILTER */
.filter-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-nav .nav-link {
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.filter-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-nav .nav-link:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* STATUS BADGES */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-resolved {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }
    
    .main-container {
        padding: 15px;
    }
    
    .content-card {
        padding: 20px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
    }
    
    .filter-nav {
        flex-direction: column;
    }
}

/* CONTENT SPECIFIC STYLES */
.content-preview {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* MODAL STYLES */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 30px;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px 30px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* TABLE IMPROVEMENTS */
.data-table td {
    vertical-align: middle;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* PREVIEW BADGE */
.badge {
    font-weight: 500;
    padding: 5px 10px;
}

/* RICH TEXT EDITOR */
.ql-toolbar {
    border-radius: 8px 8px 0 0 !important;
    border-color: #e0e0e0 !important;
}

.ql-container {
    border-radius: 0 0 8px 8px !important;
    border-color: #e0e0e0 !important;
    min-height: 200px;
    font-family: inherit;
}

.ql-editor {
    min-height: 200px;
    font-size: 16px;
}

/* CONTENT EDITOR STYLES */
.ql-toolbar.ql-snow {
    border-color: #dee2e6;
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
}

.ql-container.ql-snow {
    border-color: #dee2e6;
    border-radius: 0 0 8px 8px;
    min-height: 300px;
}

.ql-editor {
    min-height: 300px;
    font-size: 16px;
    line-height: 1.6;
}

.ql-editor.ql-blank::before {
    font-style: normal;
    color: #6c757d;
    opacity: 0.7;
}

/* FORM LAYOUT */
.form-control-lg {
    font-size: 1.25rem;
    padding: 12px 16px;
}

.card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,.125);
    padding: 1rem 1.25rem;
}

.card .card-header h5 {
    font-weight: 600;
    color: #2c3e50;
}

/* COPY BUTTON STYLES */
.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
}

/* DRAFT SAVING INDICATOR */
.draft-saving {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.draft-saving.show {
    display: block;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 992px) {
    .ql-editor {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .ql-editor {
        min-height: 200px;
    }
    
    .form-control-lg {
        font-size: 1.125rem;
    }
}

/* VALIDATION STYLES */
.was-validated .form-control:valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}