/* Location Overview Styles */

.location-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.location-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.location-card.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.location-card.has-items {
    position: relative;
}

.location-card.has-items::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.location-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.location-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #1f2937;
}

.location-stats {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin: 10px 0;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #3b82f6;
}

.stat-label {
    display: block;
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 2px;
}

.last-activity {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 10px;
}

/* Location Details */
.location-details {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.details-header h2 {
    margin: 0;
    color: #1f2937;
}

.details-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 250px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Items Table */
.items-container {
    overflow-x: auto;
}

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

.items-table th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.items-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.items-table tr:hover {
    background: #f9fafb;
}

.items-table tr.selected {
    background: #eff6ff;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-badge.status-14 {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-16 {
    background: #d1fae5;
    color: #065f46;
}

.text-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

.text-center {
    text-align: center;
}

/* Recent Movements */
.recent-movements {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.recent-movements h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.movements-list {
    max-height: 400px;
    overflow-y: auto;
}

.movement-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.movement-item:hover {
    background: #f9fafb;
}

.movement-item:last-child {
    border-bottom: none;
}

.movement-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.movement-details {
    flex: 1;
}

.movement-main {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.movement-path {
    font-size: 14px;
    color: #374151;
    margin-bottom: 4px;
}

.movement-meta {
    font-size: 12px;
    color: #6b7280;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-controls button {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-controls button:hover {
    background: #f3f4f6;
}

.pagination-controls button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content.modal-sm {
    width: 400px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 10px;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

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

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .location-cards {
        grid-template-columns: 1fr;
    }
    
    .details-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .details-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .items-table {
        font-size: 12px;
    }
    
    .items-table th,
    .items-table td {
        padding: 8px;
    }
}