* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fafafa;
    min-height: 100vh;
    color: #333;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* ========== LOGIN ========== */
#loginPage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f5f5;
    padding: 1rem;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

#loginForm input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 14px;
}

#loginForm button {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.demo-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 2px;
    font-size: 12px;
    color: #666;
}

/* ========== MAIN LAYOUT ========== */
#mainPage {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 100%;
    max-width: 400px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.sidebar-search {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 70px;
    background: white;
    z-index: 100;
}

.sidebar-search input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
}

/* Daire Tablosu */
.apartments-sidebar-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.apartment-table {
    width: 100%;
    border-collapse: collapse;
}

.apartment-table thead {
    position: sticky;
    top: 0;
    background: #f8f8f8;
    z-index: 10;
}

.apartment-table th {
    padding: 0.6rem 0.4rem;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.apartment-table td {
    padding: 0.6rem 0.4rem;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.apartment-table tr {
    cursor: pointer;
}

.apartment-table tr.active {
    background: #f5f5f5;
}

.apartment-table .blok-col {
    font-weight: 600;
    color: #333;
    max-width: 50px;
}

.apartment-table .ada-col {
    color: #666;
    max-width: 50px;
}

.apartment-table .daire-col {
    max-width: 50px;
}

.apartment-table .owner-col {
    color: #666;
    max-width: 100px;
}

.apartment-table .status-col {
    text-align: center;
    width: 110px;
    max-width: 110px;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-size: 9px;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-badge.status-completed {
    background: #4caf50;
    color: white;
}

.status-badge.status-ongoing {
    background: #ff9800;
    color: white;
}

.status-badge.status-empty {
    background: #e0e0e0;
    color: #757575;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h2 {
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.subtitle {
    color: #999;
    font-size: 12px;
}

.header-right {
    display: flex;
    gap: 0.75rem;
}

.btn-header {
    padding: 0.5rem 0.75rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add {
    background: #bfffcd;
    border: 1px solid #e0e0e0;
    color: #333;
}

.btn-profile {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #333;
}

.btn-logout {
    background: #ef5350;
    color: white;
}

.main-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafa;
    max-height: calc(100vh - 70px);
}

.content-page {
    display: block;
}

/* Two Column Grid */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Sections */
.info-section, .documents-section, .info-card {
    background: white;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.info-section h3, .documents-section h3, .card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.documents-section h3 {
    margin-bottom: 1rem;
}

.btn-icon-small {
    background: #bfffcd;
    color: white;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}

/* Info List - Vertical */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-item-horizontal {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 0.75rem;
}

.info-item-horizontal label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.info-item-horizontal .info-input {
    margin: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 11px;
    color: #666;
    margin-bottom: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.info-input {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
}

.info-input:read-only,
.info-input:disabled {
    background: #f8f8f8;
}

.info-input[disabled] {
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-success, .btn-danger, .btn-secondary {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.btn-primary {
    background: #bfffcd;
    color: black;
}

.btn-success {
    background: #2e7d32;
    color: white;
}

.btn-danger {
    background: #d32f2f;
    color: white;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.document-card {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    padding: 0.5rem;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.document-card:hover {
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.document-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.document-actions {
    margin-top: auto;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.btn-view, .btn-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-view {
    background: #4caf50;
}

.btn-view:hover {
    background: #45a049;
}

.btn-delete {
    background: #f44336;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 11px;
    border-radius: 2px;
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
}

/* Work item sil butonu özel stili */
.work-item-row .btn-danger.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    flex: none;
    min-width: auto;
    max-width: none;
    width: fit-content;
}

.btn-control {
    cursor: pointer;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.btn-control:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-control.btn-primary {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.btn-control.btn-primary:hover {
    background: #45a049;
}

.btn-control.btn-danger {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.btn-control.btn-danger:hover {
    background: #d32f2f;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#confirmModal {
    z-index: 10000 !important;
}

.modal-content {
    background: white;
    padding: 1rem;
    border-radius: 2px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    width: 400px;
}

/* Notification Modal */
.notification-modal {
    width: 380px;
    max-width: 90%;
    padding: 2rem 1.5rem;
    text-align: center;
}

.notification-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    font-weight: 300;
}

.notification-message {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.notification-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.notification-buttons button {
    min-width: 100px;
}


.camera-modal {
    max-width: 700px;
}

.document-view-modal {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    background: transparent;
    border: none;
}

.document-view-modal .close {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 100;
}

.document-view-modal .close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.document-view-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 4px;
}

.document-view-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
}

/* Camera Modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.upload-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.tab-btn.active {
    border-bottom-color: #333;
    color: #333;
    background: #fafafa;
}

.camera-container {
    margin: 1rem 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.media-preview {
    width: 100%;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
    background: #f5f5f5;
}

#video {
    width: 100%;
    height: auto;
}

#canvas {
    display: none;
}

#capturedImg {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.preview-placeholder {
    padding: 3rem 1rem;
    text-align: center;
    color: #999;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.camera-controls {
    margin-top: 1rem;
}

.control-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.control-group.primary-controls {
    justify-content: center;
}

.control-group.secondary-controls {
    justify-content: flex-end;
}

.btn-control {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
}

.btn-control.btn-primary {
    background: #333;
    color: white;
}

.btn-control.btn-secondary {
    background: #757575;
    color: white;
}

.btn-control.btn-success {
    background: #2e7d32;
    color: white;
}

.btn-control.btn-danger {
    background: #d32f2f;
    color: white;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Form */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.status-select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

/* Eksik ekleme formu - input ve buton aynı satırda */
.deficiency-input-row {
    display: flex !important;
    gap: 0.75rem;
    align-items: flex-end !important;
    margin-bottom: 0 !important;
}

.deficiency-input-wrapper {
    flex: 1;
}

.deficiency-input-row .deficiency-input-wrapper label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.deficiency-input-row .deficiency-input-wrapper input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    background: white;
}

.deficiency-input-row .btn-primary {
    padding: 0.6rem 1.5rem;
    white-space: nowrap;
    margin-bottom: 0;
}

.status-select {
    appearance: auto;
}

/* Profile Modal */
.profile-info p {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #f8f8f8;
    border-radius: 2px;
    font-size: 13px;
}

.profile-info strong {
    color: #333;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
}

/* New Apartment Modal */
.new-apartment-modal {
    max-width: 600px;
    width: 95%;
}

.new-apartment-form {
    margin-top: 1rem;
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input::placeholder {
    color: #bbb;
}

.field-hint {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 0.25rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.modal-footer button {
    min-width: 120px;
}

/* Deficiency (Eksikler) */
.deficiency-list {
    min-height: 80px;
    max-height: 350px;
    overflow-y: auto;
}

.deficiency-item {
    padding: 0.3rem 0.5rem;
    background: #fafafa;
    border-left: 3px solid #ff9800;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
}

.deficiency-item.status-completed {
    border-left-color: #4caf50;
}

.deficiency-item.status-pending,
.deficiency-item.status-ongoing {
    border-left-color: #ff9800;
}

.mobile-deficiency {
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-deficiency:hover {
    background: #f0f0f0;
    border-left-color: #ff9800;
}

.deficiency-info-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.deficiency-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    font-size: 10px;
    font-weight: 600;
    border-radius: 2px;
    background: #f0f0f0;
    color: #666;
}

.deficiency-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.deficiency-content.deficiency-two-rows {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.deficiency-text-row {
    width: 100%;
}

.deficiency-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.deficiency-mahal-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 11px;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.deficiency-mahal-select:focus {
    outline: none;
    border-color: #4caf50;
}

.deficiency-text {
    font-size: 12px;
    color: #333;
    flex: 1;
    line-height: 1.2;
}

.deficiency-status {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 11px;
    background: white;
    cursor: pointer;
    min-width: 100px;
}

.deficiency-status:focus {
    outline: none;
    border-color: #4caf50;
}

.deficiency-mahal {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 11px;
    background: white;
    min-width: 100px;
}

.deficiency-mahal:focus {
    outline: none;
    border-color: #4caf50;
}

.deficiency-work-item {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 11px;
    background: white;
    cursor: pointer;
    min-width: 100px;
}

.deficiency-work-item:focus {
    outline: none;
    border-color: #4caf50;
}

.work-items-container {
    margin-top: 1rem;
}

.work-items-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.work-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.work-item-row span {
    font-size: 14px;
    color: #333;
}

.work-item-row .btn-danger {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    width: auto;
    min-width: auto;
    height: auto;
    line-height: 1.2;
    flex: none;
    flex-shrink: 0;
}

.card-header-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.admin-tab:hover {
    color: #333;
}

.admin-tab.active {
    color: #333;
    border-bottom-color: #4caf50;
}

.admin-tab-content {
    display: block;
}

.admin-tab-content.hidden {
    display: none;
}

.work-items-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.work-items-form .form-group {
    display: flex;
    gap: 0.75rem;
    margin: 0;
}

.work-items-form input {
    flex: 1;
}

/* Reports Page */
.reports-container {
    padding: 1rem;
}

.reports-actions {
    margin-bottom: 1rem;
}

.reports-header {
    margin-bottom: 1rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.btn-back span {
    font-size: 16px;
}

.reports-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.reports-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

.reports-table-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow-x: auto;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th {
    background: #fafafa;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    cursor: pointer;
    position: relative;
}

.reports-table th:hover {
    background: #f0f0f0;
}

.sort-icon {
    font-size: 10px;
    margin-left: 0.5rem;
    opacity: 0.5;
}

.reports-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

.reports-table tbody tr:hover {
    background: #fafafa;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    margin: 0.5rem 0;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: 2px;
    font-size: 13px;
}

.filter-option:hover {
    background: #f5f5f5;
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
}

.filter-option span {
    font-size: 13px;
    color: #333;
}

#filterModal .modal-content {
    width: 350px;
}

#filterModal h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#filterModal .modal-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

#filterModal .btn-primary, #filterModal .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 13px;
}

.deficiency-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.btn-icon-action {
    background: #ef5350;
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    font-size: 11px;
    border-radius: 2px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.btn-icon-action.btn-edit {
    background: #2196f3;
}

.btn-icon-action.btn-delete {
    background: #ef5350;
}

.btn-icon-action:active {
    opacity: 1;
}

.deficiency-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.deficiency-input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
}

.btn-icon-add {
    background: #333;
    color: white;
    border: none;
    padding: 0.6rem 0.75rem;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
}

.small-modal {
    max-width: 450px;
}

/* Confirm Modal */
.confirm-modal {
    max-width: 400px;
    text-align: center;
    padding: 2rem;
}

.confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-modal h3 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.confirm-modal p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.btn-danger {
    background: #f44336;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.empty-state {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #999;
    font-size: 12px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 0;
}

/* RESPONSIVE - Mobil Öncelikli */
@media (max-width: 768px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s;
        max-width: 90%;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-wrapper {
        width: 100%;
    }
    
    .top-header {
        padding: 0.75rem 1rem;
    }
    
    .header-left h2 {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .apartment-table th,
    .apartment-table td {
        padding: 0.5rem 0.25rem;
        font-size: 12px;
    }
    
    .apartment-table th {
        font-size: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
    
    /* Mobilde deficiency dropdownları gizle */
    .deficiency-work-item,
    .deficiency-status {
        display: none !important;
    }
    
    /* Mobilde deficiency-content'i column yap */
    .mobile-deficiency .deficiency-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .deficiency-text {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .btn-header span:last-child {
        display: none;
    }
    
    .btn-header {
        padding: 0.5rem;
        font-size: 12px;
    }
    
    /* Mobilde admin-only butonları varsayılan olarak gizle (JavaScript ile gösterilecek) */
    .btn-header.admin-only:not(.admin-user) {
        display: none;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        background: #5caac9;
        color: white;
        border: none;
        padding: 0.75rem 1rem;
        border-radius: 2px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        z-index: 1001;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }
    
    .main-content {
        padding-bottom: 5rem;
    }
}

/* Admin Modal */
.admin-modal {
    width: 600px;
}

.admin-modal h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Şifre Değiştirme Bölümü */
.admin-password-section {
    background: white;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    margin-bottom: 2rem;
}

.admin-password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-password-form .form-group {
    margin: 0;
}

.admin-password-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.admin-password-form input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 14px;
}

.admin-password-form button {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: white;
    transition: all 0.2s;
}

.admin-user-item:hover {
    background: #f9f9f9;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.admin-user-info > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.admin-user-info strong {
    font-size: 14px;
    color: #333;
}

.admin-user-id {
    font-size: 11px;
    color: #999;
    display: none; /* Minimal için gizle */
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-role-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    min-width: 110px;
    transition: all 0.2s;
}

.admin-role-select:hover {
    border-color: #4caf50;
}

.admin-role-select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.admin-badge {
    padding: 0.25rem 0.75rem;
    background: #4caf50;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Toast Messages */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast-message {
    background: #4caf50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 500;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-message.show {
    transform: translateX(0);
    opacity: 1;
}

/* Dropdown Menu */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    color: #333;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:active {
    background: #e8e8e8;
}

.dropdown-item span {
    font-size: 16px;
}

.desktop-only {
    display: none;
}

.mobile-only {
    display: block;
}

.admin-only {
    display: none !important;
}

/* Desktop: Show desktop options */
@media (min-width: 769px) {
    .desktop-only {
        display: block;
    }
    
    .mobile-only {
        display: none;
    }
    
    /* Admin-only butonlar sadece JavaScript ile gösterilecek */
    .admin-only.admin-user {
        display: flex !important;
    }
}

/* Desktop'ta da admin-only kontrolü */
@media (min-width: 769px) {
    .admin-only:not(.admin-user) {
        display: none;
    }
    
    .admin-only.admin-user {
        display: flex;
    }
    
    .admin-only.admin-user.btn-danger {
        display: flex;
    }
}
